Shared Networking API

Order of Inheritence

digraph inheritence {
    bgcolor="#323232A1"
    fontcolor="#FEF9A9"
    fontsize=16
    fontname="Roboto"
    style="rounded,bold"
    color="#FFFFFF00"
    newrank=true
    node [
        style="filled"
        fillcolor="#0E6902"
        color="#FEFEFE"
        fontcolor="#FEFEFE"
        fontsize=16
        fontname="Roboto"
    ]
    edge [
        color="white"
        penwidth=1.5
    ]

    subgraph cluster_rf24 {
        bgcolor="#404040"
        tooltip="circuitpython_nrf24l01.rf24 module"
        label="  circuitpython_nrf24l01.rf24  ";
        RF24 [
            URL="../core_api/basic_api.html#basic-rf24-api"
            tooltip="RF24 class"
        ]
    }

    subgraph cluster_network_mixins{
        bgcolor="#404040"
        label="                                circuitpython_nrf24l01.network.mixins  "
        tooltip="circuitpython_nrf24l01.network.mixins module"
        node [
            fillcolor="#014B80"
        ]
        rank="same"
        RadioMixin [tooltip="RadioMixin class"]
        NetworkMixin [tooltip="NetworkMixin class"]
        RadioMixin -> NetworkMixin
    }

    subgraph cluster_rf24_network {
        bgcolor="#404040"
        labelloc="b"
        label="  circuitpython_nrf24l01.rf24_network  "
        tooltip="circuitpython_nrf24l01.rf24_network module"
        RF24NetworkRoutingOnly [
            URL="network_api.html#rf24networkroutingonly-class"
            tooltip="RF24NetworkRoutingOnly class"
        ]
        RF24Network [
            URL="network_api.html#rf24network-class"
            tooltip="RF24Network class"
        ]
        RF24NetworkRoutingOnly -> RF24Network
    }

    subgraph cluster_rf24_mesh {
        bgcolor="#404040"
        labelloc="b"
        label="  circuitpython_nrf24l01.rf24_mesh  "
        tooltip="circuitpython_nrf24l01.rf24_mesh module"
        RF24MeshNoMaster [
            URL="mesh_api.html#rf24meshnomaster-class"
            tooltip="RF24MeshNoMaster class"
        ]
        RF24Mesh [
            URL="mesh_api.html#rf24mesh-class"
            tooltip="RF24Mesh class"
        ]
        RF24MeshNoMaster -> RF24Mesh
    }
    RF24 -> RadioMixin
    NetworkMixin -> RF24NetworkRoutingOnly
    NetworkMixin -> RF24MeshNoMaster
}

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

  1. to provide a networking layer its own instantiated RF24 object

  2. to 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.

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

The queue (FIFO) of recieved frames for this node

This attribute will be an instantiated FrameQueue or FrameQueueFrag object depending on the state of the fragmentation attribute.

RF24Network.ret_sys_msg

Force update() to return on system message types.

This bool attribute is asserted on mesh network nodes.