rchPacketMode (Function) |
|
This function changes the mode for handling data packets received with rchReceivePacket. This function works similarly to gwPacketMode. There are two modes:
Buffered mode (default) •rchSendPacket sends the data and waits for a reply from the receiver. •The data packet received is placed into an internal buffer in control of the firmware. A reply is automatically returned to the sender. •rchReceivePacket will fetch the data from the internal buffer and release it for new packets. •rchReceivePacketDone will do nothing and is therefore not necessary to call.
Unbuffered mode
•rchSendPacket sends the data and waits for a reply from the receiver. •The data packet is placed directly into the applications buffer, and a reply is not automatically sent back to the sender. •rchReceivePacket will deliver the data packet to the application. •rchReceivePacketDone will send a user-defined reply back to the sender.
Input: mode : SINT (0/1) (Default 0) The data packet receiver mode.
Returns: INT
Declaration: FUNCTION rchPacketMode : INT;
Example: INCLUDE rtcu.inc |