4#include "Messages/ParticipantMsg.h"
5#include "Messages/BinaryMsg.h"
6#include "Messages/InvestigateMsg.h"
7#include "Messages/ModelUrlMsg.h"
8#include "Messages/NameMsg.h"
9#include "Messages/NetworkIdMsg.h"
10#include "Messages/PoseMsg.h"
11#include "Messages/ThingMsg.h"
12#include "RemoteParticipant.h"
16#if defined(_WIN32) || defined(_WIN64)
18#elif defined(__unix__) || defined(__APPLE__)
20#include <netinet/in.h>
21#include <sys/socket.h>
28namespace RoboidControl {
34 long publishInterval = 3000;
37 const char *name =
"Participant";
44 const char *remoteIpAddress =
nullptr;
45 unsigned short remotePort = 0;
46 char *broadcastIpAddress =
nullptr;
51#if defined(_WIN32) || defined(_WIN64)
53#elif defined(__unix__) || defined(__APPLE__)
56 sockaddr_in remote_addr;
57 sockaddr_in server_addr;
58 sockaddr_in broadcast_addr;
67 bool connected =
false;
69 virtual void Update(
unsigned long currentTimeMs = 0);
78 void PublishThingInfo(
Thing *thing);
86 std::list<Participant *> senders;
88 unsigned long nextPublishMe = 0;
90 void SetupUDP(
int localPort,
const char *remoteIpAddress,
int remotePort);
108using namespace Passer::RoboidControl;
Root structure for all communcation messages.
Definition Messages.h:12
Message to request details for a Thing.
Definition InvestigateMsg.h:7
Message for communicating the name of a thing.
Definition NameMsg.h:7
A message communicating the network ID for that participant.
Definition NetworkIdMsg.h:7
A participant is device which can communicate with other participants.
Definition Participant.h:31
A participant messages notifies other participants of its presence When received by another participa...
Definition ParticipantMsg.h:11
Message to communicate the pose of the thing The pose is in local space relative to the parent....
Definition PoseMsg.h:9
A reference to a participant, possibly on a remote location.
Definition RemoteParticipant.h:8
int port
The UDP port on which the participant can be reached.
Definition RemoteParticipant.h:13
const char * ipAddress
The internet address of the participant.
Definition RemoteParticipant.h:11
A thing is the primitive building block.
Definition Thing.h:17
Message providing generic information about a Thing.
Definition ThingMsg.h:7