|
RF24Ethernet - TCP/IP over RF24Network v2.0.3
TMRh20 - Pushing the practical limits of RF24 modules
|
#include <RF24Ethernet.h>
Classes | |
| struct | EthQueue |
Public Types | |
| typedef uint32_t | err_t |
Public Member Functions | |
| RF24EthernetClass (RF24 &_radio, RF24Network &_network, RF24Mesh &_mesh) | |
| RF24EthernetClass () | |
| void | use_device () |
| void | begin (IP_ADDR myIP, IP_ADDR subnet) |
| void | begin (IPAddress ip) |
| void | begin (IPAddress ip, IPAddress dns) |
| void | begin (IPAddress ip, IPAddress dns, IPAddress gateway) |
| void | begin (IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) |
| void | set_gateway (IPAddress gwIP) |
| void | listen (uint16_t port) |
| void | setMac (uint16_t address) |
| void | setChannel (uint8_t channel) |
| int | available () |
| IPAddress | localIP () |
| IPAddress | subnetMask () |
| IPAddress | gatewayIP () |
| IPAddress | dnsServerIP () |
| void | update () |
Static Public Member Functions | |
| static bool | isUnicast (const uint8_t frame) |
| static void | initRXQueue (EthQueue *RXQueue) |
| static void | writeRXQueue (EthQueue *RXQueue, const uint8_t *ethFrame, uint16_t lenEthFrame) |
Public Attributes | |
| uint32_t | networkCorruption |
| RF24Network & | network |
| RF24Mesh & | mesh |
Static Public Attributes | |
| static bool | useCoreLocking |
| static constexpr unsigned | MAX_FRAME_SIZE = MAX_PAYLOAD_SIZE |
| static constexpr unsigned | MIN_FRAME_SIZE = 60 |
| static constexpr unsigned | MAX_RX_QUEUE = 2 |
| static constexpr uint32_t | NetIF_Speed_BPS = 1000000 |
| static netif | myNetif |
| static EthQueue | RXQueue |
Friends | |
| class | RF24Server |
| class | RF24Client |
| class | RF24UDP |
Definition at line 125 of file RF24Ethernet.h.
| typedef uint32_t RF24EthernetClass::err_t |
Definition at line 243 of file RF24Ethernet.h.
| RF24EthernetClass::RF24EthernetClass | ( | RF24 & | _radio, |
| RF24Network & | _network, | ||
| RF24Mesh & | _mesh ) |
Constructor to set up the Ethernet layer. Requires the radio and network to be configured by the user this allows users to set custom settings at the radio or network level
Definition at line 203 of file RF24Ethernet.cpp.
References RF24Client::gState, mesh, and network.
| RF24EthernetClass::RF24EthernetClass | ( | ) |
Basic constructor
| void RF24EthernetClass::use_device | ( | ) |
This function is no longer needed, and does nothing
Definition at line 241 of file RF24Ethernet.cpp.
| void RF24EthernetClass::begin | ( | IP_ADDR | myIP, |
| IP_ADDR | subnet ) |
| void RF24EthernetClass::begin | ( | IPAddress | ip | ) |
Configure the IP address and subnet mask of the node. This is independent of the RF24Network layer, so the IP and subnet only have to conform to standard IP routing rules within your network
Definition at line 281 of file RF24Ethernet.cpp.
References begin().
| void RF24EthernetClass::begin | ( | IPAddress | ip, |
| IPAddress | dns ) |
Definition at line 289 of file RF24Ethernet.cpp.
References begin().
| void RF24EthernetClass::begin | ( | IPAddress | ip, |
| IPAddress | dns, | ||
| IPAddress | gateway ) |
Definition at line 298 of file RF24Ethernet.cpp.
References begin().
| void RF24EthernetClass::begin | ( | IPAddress | ip, |
| IPAddress | dns, | ||
| IPAddress | gateway, | ||
| IPAddress | subnet ) |
Definition at line 306 of file RF24Ethernet.cpp.
| void RF24EthernetClass::set_gateway | ( | IPAddress | gwIP | ) |
Configure the gateway IP address. This is generally going to be your master node with RF24Network address 00.
Definition at line 388 of file RF24Ethernet.cpp.
References Ethernet, and useCoreLocking.
| void RF24EthernetClass::listen | ( | uint16_t | port | ) |
Listen to a specified port - This will likely be changed to closer match the Arduino Ethernet API with server.begin();
Definition at line 413 of file RF24Ethernet.cpp.
References RF24Client::error_callback(), RF24Client::gState, HTONS, IF_RF24ETHERNET_DEBUG_CLIENT, and useCoreLocking.
| void RF24EthernetClass::setMac | ( | uint16_t | address | ) |
Sets the MAC address of the RF24 module, which is an RF24Network address Specify an Octal address to assign to this node, which will be used as the Ethernet mac address If setting up only a few nodes, use 01 to 05 Please reference the RF24Network documentation for information on setting up a static network RF24Mesh will be integrated to provide this automatically
Definition at line 248 of file RF24Ethernet.cpp.
References network.
| void RF24EthernetClass::setChannel | ( | uint8_t | channel | ) |
Sets the Radio channel/frequency to use (0-127)
Definition at line 271 of file RF24Ethernet.cpp.
References network.
| int RF24EthernetClass::available | ( | ) |
Indicates whether data is available.
| IPAddress RF24EthernetClass::localIP | ( | ) |
| IPAddress RF24EthernetClass::subnetMask | ( | ) |
| IPAddress RF24EthernetClass::gatewayIP | ( | ) |
| IPAddress RF24EthernetClass::dnsServerIP | ( | ) |
Returns the DNS server IP address
Definition at line 506 of file RF24Ethernet.cpp.
| void RF24EthernetClass::update | ( | ) |
Keeps the TCP/IP stack running & processing incoming data
Definition at line 234 of file RF24Ethernet.cpp.
References Ethernet.
|
static |
Definition at line 82 of file RF24Ethernet.cpp.
|
static |
Used internally to initialize incoming data queue
Definition at line 32 of file RF24Ethernet.cpp.
References RXQueue.
|
static |
Used internally to write to the internal data queue
Definition at line 41 of file RF24Ethernet.cpp.
References MAX_FRAME_SIZE, MAX_RX_QUEUE, and RXQueue.
|
friend |
|
friend |
|
friend |
| uint32_t RF24EthernetClass::networkCorruption |
Definition at line 211 of file RF24Ethernet.h.
| RF24Network& RF24EthernetClass::network |
Definition at line 214 of file RF24Ethernet.h.
Referenced by RF24EthernetClass(), setChannel(), and setMac().
| RF24Mesh& RF24EthernetClass::mesh |
Definition at line 216 of file RF24Ethernet.h.
Referenced by RF24EthernetClass().
|
static |
Definition at line 227 of file RF24Ethernet.h.
Referenced by listen(), and set_gateway().
|
staticconstexpr |
Definition at line 228 of file RF24Ethernet.h.
Referenced by RF24EthernetClass::EthQueue::__attribute__(), and writeRXQueue().
|
staticconstexpr |
Definition at line 229 of file RF24Ethernet.h.
|
staticconstexpr |
Definition at line 230 of file RF24Ethernet.h.
Referenced by RF24EthernetClass::EthQueue::__attribute__(), and writeRXQueue().
|
staticconstexpr |
Definition at line 231 of file RF24Ethernet.h.
|
static |
Definition at line 232 of file RF24Ethernet.h.
Referenced by gatewayIP(), localIP(), and subnetMask().
|
static |
Definition at line 241 of file RF24Ethernet.h.
Referenced by initRXQueue(), and writeRXQueue().