When using the SFB packet reflex system, arriving packets are read into memory automatically, and are 'dispatched' to the sketch for processing.
So in the common case, by the time the sketch becomes involved, a packet-read-from-a-face is already complete and sitting in memory, ready to be accessed however the sketch wishes to do so.
Basic functions for accessing received packets:
- packetLength() The number of bytes in a packet
- packetSource() The face (e.g., NORTH) from which a packet was received.
- packetRead() Read a number or byte from a packet in a variety of format specified by a code.
- packetReadEOF() Have we read to the end of the packet?
- zpacketPrefix() Does the given packet begin with the given string?
Intermediate functions for accessing received packets:
Advanced, low-level, or internal functions for accessing received packets: