![]() |
Roboid Control for C#
|
A participant is used for communcation between things.
Public Member Functions | |
| Participant () | |
| Create a porticiapnt. | |
| Participant (int port) | |
| Create a participant with the give UDP port. | |
| Participant (string ipAddress="0.0.0.0", int port=7681) | |
| Create a new participant for a site at the given address and port. | |
| Participant (UdpClient udpClient, int port) | |
| Create a participant using the given udp client. | |
| RemoteParticipant | GetParticipant (string ipAddress, int port) |
| RemoteParticipant | AddParticipant (string ipAddress, int port) |
| delegate Thing | ThingConstructor (byte networkId, byte thingId) |
| void | Register (byte thingType, ThingConstructor constr) |
| void | Register< ThingClass > (Thing.Type thingType) |
| void | Register< ThingClass > (byte thingType) |
| virtual void | Update (ulong currentTimeMS=0) |
| virtual void | Publish () |
| void | SendThingInfo (RemoteParticipant remoteParticipant, Thing thing) |
| bool | Send (IMessage msg) |
| bool | Send (RemoteParticipant remoteParticipant, IMessage msg) |
| void | PublishThingInfo (Thing thing) |
| bool | Publish (IMessage msg) |
| bool | SendBuffer (int bufferSize) |
| bool | PublishBuffer (int bufferSize) |
| void | ReceiveData (byte[] data, RemoteParticipant remoteParticipant) |
| Thing | Get (byte networkId, byte thingId) |
| Get a thing with the given ids. | |
| void | Add (Thing thing, bool invokeEvent=true) |
| Add a new thing for this participant. | |
Public Attributes | |
| byte[] | buffer = new byte[1024] |
| ulong | publishInterval = 3000 |
| string | name = "Participant" |
| IPEndPoint | endPoint = null |
| UdpClient | udpClient = null |
| string | broadcastIpAddress = "255.255.255.255" |
| readonly ConcurrentQueue< IMessage > | messageQueue = new ConcurrentQueue<IMessage>() |
| List< RemoteParticipant > | senders = new List<RemoteParticipant>() |
| string | ipAddress = "0.0.0.0" |
| The internet address of the participant. | |
| int | port = 0 |
| The UDP port on which the participant can be reached. | |
| byte | networkId |
| The network ID of the participant. | |
Protected Member Functions | |
| void | ReceiveUDP (IAsyncResult result) |
| virtual void | Process (RemoteParticipant sender, ParticipantMsg msg) |
| virtual void | Process (RemoteParticipant sender, NetworkIdMsg msg) |
| virtual void | Process (InvestigateMsg msg) |
| virtual void | Process (RemoteParticipant sender, ThingMsg msg) |
| virtual void | Process (RemoteParticipant sender, NameMsg msg) |
| virtual void | Process (RemoteParticipant sender, ModelUrlMsg msg) |
| virtual void | Process (PoseMsg msg) |
| virtual void | Process (RemoteParticipant sender, BinaryMsg msg) |
| virtual void | Process (TextMsg temsgxt) |
| virtual void | Process (DestroyMsg msg) |
Protected Attributes | |
| readonly Dictionary< byte, Func< byte, byte, Thing > > | thingMsgProcessors = new Dictionary<byte, Func<byte, byte, Thing>>() |
| ulong | nextPublishMe = 0 |
| readonly List< Thing > | things = new List<Thing>() |
| The things reported by this participant. | |
| Passer.RoboidControl.Participant.Participant | ( | int | port | ) |
Create a participant with the give UDP port.
| port | The port number on which to communicate |
| Passer.RoboidControl.Participant.Participant | ( | string | ipAddress = "0.0.0.0", |
| int | port = 7681 |
||
| ) |
Create a new participant for a site at the given address and port.
| ipAddress | The ip address of the site server |
| port | The port number of the site server |
| Passer.RoboidControl.Participant.Participant | ( | UdpClient | udpClient, |
| int | port | ||
| ) |
Create a participant using the given udp client.
| udpClient | UDP client to use for communication |
| port | The port number on which to communicate |
| void Passer.RoboidControl.Participant.Register< ThingClass > | ( | Thing::Type | thingType | ) |
| ThingClass | : | Thing |
| void Passer.RoboidControl.Participant.Register< ThingClass > | ( | byte | thingType | ) |
| ThingClass | : | Thing |
|
inherited |
Get a thing with the given ids.
| networkId | The networkId of the thing |
| thingId | The ID of the thing |
|
inherited |
Add a new thing for this participant.
| thing | The thing to add |
| invokeEvent | Invoke an notification event when the thing has been added |