packet_rx
最終更新
最終更新
This class is a wrapper class for TWENET's tsRxDataApp
structure.
This class object is a wrapper class for callback function or by .
In packet_rx
, in particular, the data payload of the packet can be handled by the smplbuf
container, and utility functions such as expand_bytes()
simplify the payload interpretation description.
Get the data payload of the packet.
Obtain the receiving structure of the TWENET C library.
Returns the data length of the payload. The value is the same as .get_payload().size()
.
Obtain the LQI value (Link Quality Indicator).
Get the address of the sender.
get_addr_src_long()
is the serial number of the sender and MSB(bit31) is always 1.
get_addr_src_lid()
is the logical ID of the sender and takes values from 0x00
-0xFE
(the logical ID specified by <NWK_SIMPLE>
).
Gets the destination address.
The destination address is specified by the source, and the range of values varies depending on the type of destination.
MSB (bit31) is set.
0x00
-0xFF
Logical ID (8bit) is specified as the destination.
0x00
-0xFF
Returns true
for encrypted packets and false
for plaintext.
Returns network type of the packet identified by Network BEHAVIOR.
mwx::NETWORK::LAYERED
packets from <NWK_LAYERED>
mwx::NETWORK::SIMPLE
packets from <NWK_SIMPLE>
mwx::NETWORK::NONE
neworkless packets
others
error or unknow packet type