#pragma once #include "../LocalParticipant.h" #if defined(HAS_WIFI) #include #endif namespace RoboidControl { namespace Arduino { class LocalParticipant : public RoboidControl::LocalParticipant { public: void Setup(int localPort, const char* remoteIpAddress, int remotePort); void Receive(); bool Send(Participant* remoteParticipant, int bufferSize); bool Publish(IMessage* msg); protected: #if defined(HAS_WIFI) const char* remoteIpAddress = nullptr; unsigned short remotePort = 0; char* broadcastIpAddress = nullptr; WiFiUDP udp; #endif void GetBroadcastAddress(); }; } // namespace Arduino } // namespace RoboidControl