Skip to content

Commit

Permalink
Print UUID when connected to Websocket Server
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Mar 15, 2024
1 parent 441fd2c commit 50fdb9f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions app/rpi/common/include/car/system/messaging/MessagingSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ namespace car::system::messaging

nod::signal<void(const std::string, const rapidjson::Value&)>& getCommandSignal() { return this->command_signal; }
nod::signal<void(const std::string)>& getMessageSignal() { return this->message_signal; }
nod::signal<void()>& getConnectSignal() { return this->on_connect_signal; }
nod::signal<void(const std::string)>& getDisconnectSignal() { return this->on_disconnect_signal; }

void onMessageCallback(const ix::WebSocketMessagePtr& msg) const;
Expand All @@ -49,7 +48,6 @@ namespace car::system::messaging

const bool isConnected() const { return this->connected; }

nod::signal<void()> on_connect_signal;
nod::signal<void(std::string)> on_disconnect_signal;

nod::signal<void(const std::string)> message_signal;
Expand Down
6 changes: 0 additions & 6 deletions app/rpi/common/src/car/system/messaging/MessagingSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ namespace car::system::messaging
{
switch (msg->type)
{
case ix::WebSocketMessageType::Open:
{
spdlog::info("Connected to the Websocket Server.");
this->on_connect_signal();
break;
}
case ix::WebSocketMessageType::Close:
{
spdlog::info("Disconnected from the Websocket Server; Reason: {}", msg->closeInfo.reason);
Expand Down
2 changes: 1 addition & 1 deletion app/rpi/daemon/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class rpi_daemon : public daemon
}
else
{
dlog::info("Connected to the WS Server.");
dlog::notice(fmt::format(R"(Connected to the Websocket Server; UUID: "{}")", this->car_system->getMessagingSystem()->getUUID()));
}
this->last_connected = now;
}
Expand Down

0 comments on commit 50fdb9f

Please sign in to comment.