Shared Networking API¶
Order of Inheritance¶
The RadioMixin
and NetworkMixin
classes are not documented directly. Instead, this
documentation follows the OSI (Open Systems Interconnection) model. This is done to mimic how the
TMRh20 C++ libraries and documentation are structured.
Consequentially, all functions and members inherited from the NetworkMixin
class are
documented here as part of the RF24Network
class. Note that the RF24MeshNoMaster
, RF24Mesh
,
and RF24NetworkRoutingOnly
classes all share the same API inherited from the NetworkMixin
class.
Accessible RF24 API¶
The purpose of the RadioMixin
class is
to provide a networking layer its own instantiated
RF24
objectto prevent applications from changing the radio’s configuration in a way that breaks the networking layer’s behavior
The following list of RF24
functions and attributes are exposed in the
RF24Network API and RF24Mesh API.
-
For the
print_details()
function, an additional keyword parameter namednetwork_only
can be used to filter out all the core details from theRF24
object. Thedump_pipes
parameter still exists and defaults toFalse
. Usage is as follows:>>> # the following command is the same as `nrf.print_details(0, 1)` >>> nrf.print_details(dump_pipes=False, network_only=True) Network frame_buf contents: Header is from 0o7777 to 0o0 type 0 id 1 reserved 0. Message contains: an empty buffer Return on system messages__False Allow network multicasts___True Multicast relay____________Disabled Network fragmentation______Enabled Network max message length_144 bytes Network TX timeout_________25 milliseconds Network Routing timeout___75 milliseconds Network node address_______0o0
Note
The address
0o7777
(seen in output above) is an invalid address used as a sentinel when the frame is unpopulated with a properfrom_node
address.
External Systems API¶
The following attributes are exposed in the RF24Network
and RF24Mesh
API for
extensibility via external applications or systems.
- RF24Network.address_prefix = b"\xCC"¶
The base case for all pipes’ address’ bytes before mutating with
address_suffix
.See Also
The usage of this attribute is more explained in the Topology page
- RF24Network.address_suffix = b"\xC3\x3C\x33\xCE\x3E\xE3"¶
Each byte in this
bytearray
corresponds to the unique byte per pipe and child node.See Also
The usage of this attribute is more explained in the Topology page
- RF24Network.frame_buf¶
A buffer containing the last frame handled by the network node
- RF24Network.queue : FrameQueueFrag | FrameQueue¶
The queue (FIFO) of received frames for this node
This attribute will be an instantiated
FrameQueue
orFrameQueueFrag
object depending on the state of thefragmentation
attribute.