Roboid Control for C++
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RoboidControl::ParticipantRegistry Class Reference

Detailed Description

class which manages all known participants

#include <Participant.h>

Public Member Functions

ParticipantGet (const char *ipAddress, unsigned int port)
 Retrieve a participant by its address.
 
ParticipantGet (unsigned char networkID)
 Retrieve a participant by its network ID.
 
ParticipantAdd (const char *ipAddress, unsigned int port)
 Add a participant with the given details.
 
void Add (Participant *participant)
 Add a participant.
 
void Remove (Participant *participant)
 Remove a participant.
 
const std::list< Participant * > & GetAll () const
 Get all participants.
 

Member Function Documentation

◆ Get() [1/2]

Participant * RoboidControl::ParticipantRegistry::Get ( const char *  ipAddress,
unsigned int  port 
)

Retrieve a participant by its address.

Parameters
ipAddressThe IP address of the participant
portThe port number of the participant
Returns
The participant or a nullptr when it could not be found

◆ Get() [2/2]

Participant * RoboidControl::ParticipantRegistry::Get ( unsigned char  networkID)

Retrieve a participant by its network ID.

Parameters
networkIDThe network ID of the participant
Returns
The participant or a nullptr when it could not be found

◆ Add() [1/2]

Participant * RoboidControl::ParticipantRegistry::Add ( const char *  ipAddress,
unsigned int  port 
)

Add a participant with the given details.

Parameters
ipAddressThe IP address of the participant
portThe port number of the participant
Returns
The added participant

◆ Add() [2/2]

void RoboidControl::ParticipantRegistry::Add ( Participant participant)

Add a participant.

Parameters
participantThe participant to add

◆ Remove()

void RoboidControl::ParticipantRegistry::Remove ( Participant participant)

Remove a participant.

Parameters
participantThe participant to remove

◆ GetAll()

const std::list< Participant * > & RoboidControl::ParticipantRegistry::GetAll ( ) const

Get all participants.

Returns
All participants