diff --git a/include/villas/nodes/webrtc.hpp b/include/villas/nodes/webrtc.hpp index 0cabb6397..788af6b15 100644 --- a/include/villas/nodes/webrtc.hpp +++ b/include/villas/nodes/webrtc.hpp @@ -2,7 +2,9 @@ * * @file * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ diff --git a/include/villas/nodes/webrtc/peer_connection.hpp b/include/villas/nodes/webrtc/peer_connection.hpp index 757f5716f..6dd8f94cb 100644 --- a/include/villas/nodes/webrtc/peer_connection.hpp +++ b/include/villas/nodes/webrtc/peer_connection.hpp @@ -2,7 +2,9 @@ * * @file * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ diff --git a/include/villas/nodes/webrtc/signaling_client.hpp b/include/villas/nodes/webrtc/signaling_client.hpp index 608b45aab..6e54df87e 100644 --- a/include/villas/nodes/webrtc/signaling_client.hpp +++ b/include/villas/nodes/webrtc/signaling_client.hpp @@ -2,7 +2,9 @@ * * @file * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ diff --git a/include/villas/nodes/webrtc/signaling_message.hpp b/include/villas/nodes/webrtc/signaling_message.hpp index ac9b93539..711bdac56 100644 --- a/include/villas/nodes/webrtc/signaling_message.hpp +++ b/include/villas/nodes/webrtc/signaling_message.hpp @@ -2,7 +2,9 @@ * * @file * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ @@ -52,7 +54,6 @@ struct SignalingMessage { std::string toString() const; }; - } /* namespace webrtc */ } /* namespace node */ } /* namespace villas */ diff --git a/lib/nodes/webrtc.cpp b/lib/nodes/webrtc.cpp index c30ecaab7..28ced7c30 100644 --- a/lib/nodes/webrtc.cpp +++ b/lib/nodes/webrtc.cpp @@ -1,7 +1,9 @@ /** Node-type: webrtc * * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ diff --git a/lib/nodes/webrtc/peer_connection.cpp b/lib/nodes/webrtc/peer_connection.cpp index df9e575f8..dbbf9f44f 100644 --- a/lib/nodes/webrtc/peer_connection.cpp +++ b/lib/nodes/webrtc/peer_connection.cpp @@ -2,7 +2,9 @@ * * @file * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ @@ -137,7 +139,7 @@ void PeerConnection::setupDataChannel(std::shared_ptr dc) chan->onClosed([this](){ this->onDataChannelClosed(); }); chan->onError([this](auto err){ this->onDataChannelError(std::move(err)); }); - // if this node has it's data channel set up, don't accept any new ones + // If this node has it's data channel set up, don't accept any new ones conn->onDataChannel(nullptr); } diff --git a/lib/nodes/webrtc/signaling_client.cpp b/lib/nodes/webrtc/signaling_client.cpp index e5864df3b..4bb8ba49e 100644 --- a/lib/nodes/webrtc/signaling_client.cpp +++ b/lib/nodes/webrtc/signaling_client.cpp @@ -1,7 +1,9 @@ /** WebRTC signaling client * * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ @@ -73,9 +75,9 @@ void SignalingClient::connect() void SignalingClient::disconnect() { running = false; - // TODO - // wait for connectStatic to exit - // close LWS connection + // TODO: + // - wait for connectStatic to exit + // - close LWS connection if (wsi) lws_callback_on_writable(wsi); } diff --git a/lib/nodes/webrtc/signaling_message.cpp b/lib/nodes/webrtc/signaling_message.cpp index fa2380bf6..ddbee7e67 100644 --- a/lib/nodes/webrtc/signaling_message.cpp +++ b/lib/nodes/webrtc/signaling_message.cpp @@ -1,7 +1,9 @@ /** WebRTC signaling messages. * * @author Steffen Vogel + * @author Philipp Jungkamp * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC + * @copyright 2023, OPAL-RT Germany GmbH * @license Apache 2.0 *********************************************************************************/ @@ -15,14 +17,13 @@ using namespace villas; using namespace villas::node; using namespace villas::node::webrtc; - json_t * Connection::toJSON() const { return json_pack("{ s:i, s:s, s:s, s:s }", "id", id, "remote", remote.c_str(), "user_agent", userAgent.c_str(), - "created", "" // TODO + "created", "" // TODO: create json timestamp ); } @@ -74,8 +75,8 @@ RelayMessage::RelayMessage(json_t *json) server.username = user; server.password = pass; - // TODO warn about unsupported realm - // TODO log info expires time + // TODO: warn about unsupported realm + // TODO: log info about expires time } } @@ -167,14 +168,14 @@ SignalingMessage SignalingMessage::fromJSON(json_t *json) { auto self = SignalingMessage { std::monostate() }; - // relay message + // Relay message json_t *rlys = nullptr; - // control message + // Control message json_t *ctrl = nullptr; - // candidate message + // Candidate message const char *cand = nullptr; const char *mid = nullptr; - // description message + // Description message const char *desc = nullptr; const char *typ = nullptr; @@ -189,7 +190,7 @@ SignalingMessage SignalingMessage::fromJSON(json_t *json) "type", &typ ); - // exactly 1 field may be specified + // Exactly 1 field may be specified const void *fields[] = { ctrl, cand, desc }; if (ret || std::count(std::begin(fields), std::end(fields), nullptr) < std::make_signed_t(std::size(fields)) - 1) throw RuntimeError("Failed to decode signaling message");