![]() |
Roboid Control for Python
|
A participant is a device which manages things.
It can communicate with other participant to synchronise the state of things. This class is used to register the things the participant is managing. It also maintains the communcation information to contact the participant. It is used as a basis for the local participant, but also as a reference to remote participants.
Public Member Functions | |
__init__ (self, ip_address, port) | |
Create a new participant with the given communcation info. | |
Add (self, thing, check_id=True) | |
Add a new thing for this participant. | |
Get (self, network_id, thing_id) | |
Find a thing managed by this participant. | |
Remove (self, thing) | |
Remove a thig for this participant. | |
Update (self, currentTimeMs) | |
Update all things. | |
Public Attributes | |
ip_address | |
The Ip Address of a participant. | |
port | |
The port number for UDP communication with the participant. | |
networkId | |
The network Id to identify the participant. | |
things | |
The things managed by this participant. | |
__init__ | ( | self, | |
ip_address, | |||
port | |||
) |
Create a new participant with the given communcation info.
Reimplemented in LocalParticipant, and SiteServer.
Add | ( | self, | |
thing, | |||
check_id = True |
|||
) |
Add a new thing for this participant.
thing | The thing to add |
check_id | When true, the thing ID of the thing is checked. If it is 0, a new thing Id will be assigned. |
Get | ( | self, | |
network_id, | |||
thing_id | |||
) |
Find a thing managed by this participant.
network_id | The network ID for the thing |
thing_id | The ID of the thing |
Remove | ( | self, | |
thing | |||
) |
Remove a thig for this participant.
thing | The thing to remove |
Update | ( | self, | |
currentTimeMs | |||
) |
Update all things.
Reimplemented in LocalParticipant.
ip_address |
The Ip Address of a participant.
When the participant is local, this contains 0.0.0.0
port |
The port number for UDP communication with the participant.
This is 0 for isolated participants.
networkId |
The network Id to identify the participant.