35 lines
732 B
C++
35 lines
732 B
C++
#pragma once
|
|
|
|
#include "Participants/ParticipantUDP.h"
|
|
|
|
// #if defined(ARDUINO_ARCH_ESP8266) || defined(ESP32) || defined(UNO_R4) || \
|
|
// defined(ARDUINO_ARCH_RP2040)
|
|
// #define HAS_WIFI 1
|
|
// #endif
|
|
|
|
// #if defined(HAS_WIFI)
|
|
// #include <WiFiUdp.h>
|
|
// #endif
|
|
|
|
namespace RoboidControl {
|
|
namespace Arduino {
|
|
|
|
class ParticipantUDP : public RoboidControl::ParticipantUDP {
|
|
public:
|
|
void Setup(); // const char* remoteIpAddress, int remotePort);
|
|
void Receive();
|
|
bool Send(Participant* remoteParticipant, int bufferSize);
|
|
bool Publish(IMessage* msg);
|
|
|
|
protected:
|
|
//#if defined(HAS_WIFI)
|
|
char* broadcastIpAddress = nullptr;
|
|
|
|
//#endif
|
|
|
|
void GetBroadcastAddress();
|
|
};
|
|
|
|
} // namespace Arduino
|
|
} // namespace RoboidControl
|