-
Notifications
You must be signed in to change notification settings - Fork 5
PDUProcessor
huggins edited this page May 10, 2023
·
1 revision
A class to handle receiving PDUs and triggers the appropriate events
class PDUProcessor
: PDUProcessorInterface
Access | Type | Name | Description | |
---|---|---|---|---|
Private | readonly | MessageDelegate | _pduDelegate | The message delegate that gets called when a new UDP packet is received. |
Private | readonly | ConcurrentQueue<Pdu> | _pduMessageQueue | The message queue that contains new UDP packets. |
Access | Name | Description |
---|---|---|
Public | PDUProcessor(MessageDelegate pduDelegate) | Constructor that takes in the Message Delegate to call when a new UDP packet is received. |
Access | Return | Name | Description | |
---|---|---|---|---|
Public | void | CheckForUpdate() | Function that checks the _pduMessageQueue for new UDP messages. | |
Public | void | OnUDPPacketReceived(byte[] bytes, UDPReceiverMulti.UDPReceiverMulti udpReceiverMulti) | Called when a new UDP packet is received. |
private readonly MessageDelegate _pduDelegate
The message delegate that gets called when a new UDP packet is received.
private readonly ConcurrentQueue<Pdu> _pduMessageQueue
The message queue that contains new UDP packets.
public PDUProcessor
(
MessageDelegate pduDelegate
)
Constructor that takes in the Message Delegate to call when a new UDP packet is received.
Parameter | Description |
---|---|
pduDelegate | The message delegate that should get called when a new UDP packet is received. |
public void CheckForUpdate()
Function that checks the _pduMessageQueue for new UDP messages.
public void OnUDPPacketReceived
(
byte[] receivedBytes,
UDPReceiverMulti.UDPReceiverMulti udpReceiverMulti
)
Called when a new UDP packet is received.
Parameter | Description |
---|---|
receivedBytes | The contents of the UDP packet represented as a byte array. |
udpReceiverMulti | The UDPReceiveMulti that received the UDP packet. |