gwPacketMode (Function) |
Top Previous Next |
This function changes the mode for handling data packets received with gwReceivePacket. There are two modes:
Buffered mode (default) •gwSendPacket 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. •gwReceivePacket will fetch the data from the internal buffer and release it for new packets. •gwReceivePacketDone will do nothing and is therefore not necessary to call.
Unbuffered mode
•gwSendPacket 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. •gwReceivePacket will deliver the data packet to the application. •gwReceivePacketDone 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 gwPacketMode : INT;
Example: INCLUDE rtcu.inc |