ARP/Ping: ITcIoArpPingProtocol(Recv)
The interfaces ITcIoArpPingProtocol and ITcIoArpPingProtocolRecv enable sending of ARP and Ping messages from the real-time environment.
A project that uses this interface contains a pointer to an ITcIoArpPingProtocol object and implements ITcIoArpPingProtocolRecv itself. ITcIoArpPingProtocolRecv serves as callback interface for receiving data from the TCP/UDP RT module within the application.
ITcIoArpPingProtocolRecv methods:
Name | Description |
---|---|
Callback function that is invoked when an ArpReply message is received. | |
Callback function that is invoked when an PingReply message is received. |
If these methods return S_OK, the packet is regarded as processed and is not forwarded to the operating system. If necessary, S_FALSE should be returned.
ITcIoArpPingProtocol methods:
Name | Description |
---|---|
Sends an ArpRequest | |
Sends a PingRequest | |
Registering at the TCP/UDP RT module for receiving data. | |
Unregistering at the TCP/UDP RT module for receiving data. | |
Must be called cyclically; ArpReply and PingReply are used as callback in the context of this method |
To receive ARP or Ping data, registration is required by calling RegisterReceiver. This can be done in SetObjStateSO().
Data is provided by a callback of method ArpReceive or PingReceive from ITcIoArpPingProtocolRecv.
During the shutdown, all modules should unregister via UnregisterReceiver. This can be done in SetObjStateOS().