diff --git a/CHANGELOG_8md.html b/CHANGELOG_8md.html index 39867f16..135ab15c 100644 --- a/CHANGELOG_8md.html +++ b/CHANGELOG_8md.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: CHANGELOG.md File Reference +Optimized RF24Network Layer: CHANGELOG.md File Reference + + + + + @@ -23,32 +28,42 @@ -
Newly Optimized RF24Network Layer v1.0.21 +
Optimized RF24Network Layer v2.0.2
-
2020 - Optimized RF24 Network Layer for NRF24L01 radios
+
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
- + + +
+
CHANGELOG.md File Reference
@@ -78,7 +94,8 @@
+ diff --git a/CONTRIBUTING_8md.html b/CONTRIBUTING_8md.html index 22be593d..3b4b38c5 100644 --- a/CONTRIBUTING_8md.html +++ b/CONTRIBUTING_8md.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: CONTRIBUTING.md File Reference +Optimized RF24Network Layer: CONTRIBUTING.md File Reference + + + + + @@ -23,32 +28,42 @@ -
Newly Optimized RF24Network Layer v1.0.21 +
Optimized RF24Network Layer v2.0.2
-
2020 - Optimized RF24 Network Layer for NRF24L01 radios
+
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
- + + +
+
CONTRIBUTING.md File Reference
@@ -78,7 +94,8 @@
+ diff --git a/Network_Ping_8ino-example.html b/Network_Ping_8ino-example.html index af9ce2d7..6fd4ae30 100644 --- a/Network_Ping_8ino-example.html +++ b/Network_Ping_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Network_Ping.ino +Optimized RF24Network Layer: Network_Ping.ino + + + + + @@ -23,33 +28,44 @@ -
Newly Optimized RF24Network Layer v1.0.21 +
Optimized RF24Network Layer v2.0.2
-
2020 - Optimized RF24 Network Layer for NRF24L01 radios
+
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
- + + +
+
Network_Ping.ino
-

Example to give users an understanding of addressing and topology in the mesh network Using this sketch, each node will send a ping to the base every few seconds. The RF24Network library will route the message across the mesh to the correct node.

+

Example to give users an understanding of addressing and topology in the mesh network Using this sketch, each node will send a ping to the base every few seconds. The RF24Network library will route the message across the mesh to the correct node.

#include <avr/pgmspace.h>
#include "printf.h"
@@ -104,7 +120,7 @@
RF24 radio(7, 8); // CE & CS pins to use (Using 7,8 on Uno,Nano)
-
RF24Network network(radio);
+
RF24Network network(radio);
uint16_t this_node; // Our node address
@@ -284,14 +300,15 @@
}
}
-
Definition: RF24Network.h:375
-
Definition: RF24Network.h:226
-
unsigned char type
Definition: RF24Network.h:243
-
uint16_t from_node
Definition: RF24Network.h:228
+
Definition RF24Network.h:384
+
Definition RF24Network.h:229
+
unsigned char type
Definition RF24Network.h:246
+
uint16_t from_node
Definition RF24Network.h:231
+ diff --git a/Network_Ping_Sleep_8ino-example.html b/Network_Ping_Sleep_8ino-example.html index 67242096..77630871 100644 --- a/Network_Ping_Sleep_8ino-example.html +++ b/Network_Ping_Sleep_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Network_Ping_Sleep.ino +Optimized RF24Network Layer: Network_Ping_Sleep.ino + + + + + @@ -23,33 +28,44 @@ -
Newly Optimized RF24Network Layer v1.0.21 +
Optimized RF24Network Layer v2.0.2
-
2020 - Optimized RF24 Network Layer for NRF24L01 radios
+
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
- + + +
+
  • Using this sketch, each node will send a ping to every other node in the network every few seconds.
  • -
  • The RF24Network library will route the message across the mesh to the correct node.
  • +
  • The RF24Network library will route the message across the mesh to the correct node.
  • #include <avr/pgmspace.h>
    @@ -114,7 +130,7 @@
    RF24 radio(7, 8); // CE & CS pins to use (Using 7,8 on Uno,Nano)
    -
    RF24Network network(radio);
    +
    RF24Network network(radio);
    uint16_t this_node; // Our node address
    @@ -331,14 +347,15 @@
    }
    }
    -
    Definition: RF24Network.h:375
    -
    Definition: RF24Network.h:226
    -
    unsigned char type
    Definition: RF24Network.h:243
    -
    uint16_t from_node
    Definition: RF24Network.h:228
    +
    Definition RF24Network.h:384
    +
    Definition RF24Network.h:229
    +
    unsigned char type
    Definition RF24Network.h:246
    +
    uint16_t from_node
    Definition RF24Network.h:231
    +
    diff --git a/Network_Priority_RX_8ino-example.html b/Network_Priority_RX_8ino-example.html index 2922f9af..c90f98bd 100644 --- a/Network_Priority_RX_8ino-example.html +++ b/Network_Priority_RX_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Network_Priority_RX.ino +Optimized RF24Network Layer: Network_Priority_RX.ino + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    Network_Priority_RX.ino
    -

    An example of handling/prioritizing different types of data passing through the RF24Network

    +

    An example of handling/prioritizing different types of data passing through the RF24Network

    #include "printf.h"
    #include <RF24.h>
    @@ -83,7 +99,7 @@
    RF24 radio(7, 8); // nRF24L01(+) radio attached using Getting Started board
    -
    RF24Network network(radio); // Network uses that radio
    +
    RF24Network network(radio); // Network uses that radio
    const uint16_t this_node = 00; // Address of our node in Octal format
    const uint16_t other_node = 01; // Address of the other node in Octal format
    @@ -166,7 +182,7 @@
    RF24NetworkHeader header; // Create an empty header
    uint16_t dataSize = network.peek(header); // Peek to get the size of the data
    uint32_t someVariable;
    -
    if (header.type = 32) { // If a certain header type is recieved
    +
    if (header.type == 32) { // If a certain header type is recieved
    network.read(header, &someVariable, sizeof(someVariable)); // Handle the data a specific way
    Serial.print(F("RX User Data:\nHeader Type "));
    Serial.print(header.type);
    @@ -180,14 +196,15 @@
    }
    } //loop
    -
    Definition: RF24Network.h:375
    -
    #define EXTERNAL_DATA_TYPE
    Definition: RF24Network.h:103
    -
    Definition: RF24Network.h:226
    -
    unsigned char type
    Definition: RF24Network.h:243
    +
    Definition RF24Network.h:384
    +
    #define EXTERNAL_DATA_TYPE
    Definition RF24Network.h:103
    +
    Definition RF24Network.h:229
    +
    unsigned char type
    Definition RF24Network.h:246
    + diff --git a/Network_Priority_TX_8ino-example.html b/Network_Priority_TX_8ino-example.html index af025545..f16005f8 100644 --- a/Network_Priority_TX_8ino-example.html +++ b/Network_Priority_TX_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Network_Priority_TX.ino +Optimized RF24Network Layer: Network_Priority_TX.ino + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    Network_Priority_TX.ino
    -

    An example of handling/prioritizing different types of data passing through the RF24Network

    +

    An example of handling/prioritizing different types of data passing through the RF24Network

    #include <RF24.h>
    #include <RF24Network.h>
    @@ -83,7 +99,7 @@
    RF24 radio(7, 8); // nRF24L01(+) radio attached using Getting Started board
    -
    RF24Network network(radio); // Network uses that radio
    +
    RF24Network network(radio); // Network uses that radio
    const uint16_t this_node = 01; // Address of our node in Octal format
    const uint16_t other_node = 00; // Address of the other node in Octal format
    @@ -154,13 +170,14 @@
    } //loop
    -
    Definition: RF24Network.h:375
    -
    #define EXTERNAL_DATA_TYPE
    Definition: RF24Network.h:103
    -
    Definition: RF24Network.h:226
    +
    Definition RF24Network.h:384
    +
    #define EXTERNAL_DATA_TYPE
    Definition RF24Network.h:103
    +
    Definition RF24Network.h:229
    + diff --git a/RF24Network_8cpp.html b/RF24Network_8cpp.html index e40c066e..cd56ff9f 100644 --- a/RF24Network_8cpp.html +++ b/RF24Network_8cpp.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: RF24Network.cpp File Reference +Optimized RF24Network Layer: RF24Network.cpp File Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    @@ -83,9 +99,9 @@
    - + - +

    Macros

    #define NETWORK_MULTICAST_ADDRESS_LEVEL_2   010
    #define NETWORK_MULTICAST_ADDRESS_LEVEL_2   010
     
    #define NETWORK_MULTICAST_ADDRESS_LEVEL_4   01000
    #define NETWORK_MULTICAST_ADDRESS_LEVEL_4   01000
     

    Macro Definition Documentation

    @@ -120,7 +136,8 @@

    +

    diff --git a/RF24Network_8h.html b/RF24Network_8h.html index 9a58ff96..aa779dd0 100644 --- a/RF24Network_8h.html +++ b/RF24Network_8h.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: RF24Network.h File Reference +Optimized RF24Network Layer: RF24Network.h File Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    +Macros | +Typedefs
    RF24Network.h File Reference
    @@ -90,58 +107,63 @@   struct  RF24NetworkFrame   -class  RF24Network +class  ESBNetwork< radio_t >   - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + +

    Macros

    #define MIN_USER_DEFINED_HEADER_TYPE   0
    #define MIN_USER_DEFINED_HEADER_TYPE   0
     
    #define MAX_USER_DEFINED_HEADER_TYPE   127
    #define MAX_USER_DEFINED_HEADER_TYPE   127
     
    #define NETWORK_ADDR_RESPONSE   128
    #define NETWORK_ADDR_RESPONSE   128
     
    #define NETWORK_PING   130
    #define NETWORK_PING   130
     
    #define EXTERNAL_DATA_TYPE   131
    #define EXTERNAL_DATA_TYPE   131
     
    #define NETWORK_FIRST_FRAGMENT   148
    #define NETWORK_FIRST_FRAGMENT   148
     
    #define NETWORK_MORE_FRAGMENTS   149
    #define NETWORK_MORE_FRAGMENTS   149
     
    #define NETWORK_LAST_FRAGMENT   150
    #define NETWORK_LAST_FRAGMENT   150
     
    #define NETWORK_ACK   193
    #define NETWORK_ACK   193
     
    #define NETWORK_POLL   194
    #define NETWORK_POLL   194
     
    #define NETWORK_REQ_ADDRESS   195
    #define NETWORK_REQ_ADDRESS   195
     
    #define NETWORK_MORE_FRAGMENTS_NACK   200
    #define NETWORK_MORE_FRAGMENTS_NACK   200
     
    #define TX_NORMAL   0
    #define TX_NORMAL   0
     
    #define TX_ROUTED   1
    #define TX_ROUTED   1
     
    #define USER_TX_TO_PHYSICAL_ADDRESS   2
    #define USER_TX_TO_PHYSICAL_ADDRESS   2
     
    #define USER_TX_TO_LOGICAL_ADDRESS   3
    #define USER_TX_TO_LOGICAL_ADDRESS   3
     
    #define USER_TX_MULTICAST   4
    #define USER_TX_MULTICAST   4
     
    #define MAX_FRAME_SIZE   32
    #define MAX_FRAME_SIZE   32
     
    #define FRAME_HEADER_SIZE   10
    #define FRAME_HEADER_SIZE   10
     
    #define USE_CURRENT_CHANNEL   255
    #define USE_CURRENT_CHANNEL   255
     
    #define FLAG_FAST_FRAG   4
    #define FLAG_FAST_FRAG   4
     
    #define FLAG_NO_POLL   8
    #define FLAG_NO_POLL   8
     
    + + +

    +Typedefs

    typedef ESBNetwork< RF24 > RF24Network
     

    Detailed Description

    -

    Class declaration for RF24Network

    +

    Class declaration for RF24Network

    Macro Definition Documentation

    ◆ MIN_USER_DEFINED_HEADER_TYPE

    @@ -294,7 +316,7 @@

    -

    A sentinel value signifying that the current radio channel should be unchanged when setting up the network node with RF24Network::begin(uint8_t _channel, uint16_t _node_address).

    +

    A sentinel value signifying that the current radio channel should be unchanged when setting up the network node with RF24Network::begin(uint8_t _channel, uint16_t _node_address).

    @@ -309,7 +331,7 @@

    -

    This flag (when asserted in RF24Network::networkFlags) prevents repetitively configuring the radio during transmission of fragmented messages.

    +

    This flag (when asserted in RF24Network::networkFlags) prevents repetitively configuring the radio during transmission of fragmented messages.

    @@ -324,14 +346,37 @@

    -

    This flag (when asserted in RF24Network::networkFlags) prevents a node from responding to mesh nodes looking to connect to the network. Calling RF24Mesh::setChild() uses this flag accordingly.

    +

    This flag (when asserted in RF24Network::networkFlags) prevents a node from responding to mesh nodes looking to connect to the network. Calling RF24Mesh::setChild() uses this flag accordingly.

    + + +

    Typedef Documentation

    + +

    ◆ RF24Network

    + +
    +
    + + + + +
    typedef ESBNetwork<RF24> RF24Network
    +
    +

    A type definition of the template class ESBNetwork to maintain backward compatibility.

    +
    RF24 radio(7, 8);
    +
    +
    RF24Network network(radio);
    +
    // is equivalent to
    +
    ESBNetwork<RF24> network(radio);
    +
    Definition RF24Network.h:384
    +
    + diff --git a/RF24Network_8h_source.html b/RF24Network_8h_source.html index 772afa1c..59e9cf41 100644 --- a/RF24Network_8h_source.html +++ b/RF24Network_8h_source.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: RF24Network.h Source File +Optimized RF24Network Layer: RF24Network.h Source File + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    41#define MAX_USER_DEFINED_HEADER_TYPE 127
    42
    43// ACK Response Types
    -
    72#define NETWORK_ADDR_RESPONSE 128
    +
    72#define NETWORK_ADDR_RESPONSE 128
    73
    79#define NETWORK_PING 130
    80
    @@ -137,7 +153,7 @@
    180// The following 2 atrifacts now exist in RF24Mesh as their significance was specific to RF24Mesh.
    181//#define NETWORK_ADDR_LOOKUP 196
    182//#define NETWORK_ADDR_RELEASE 197
    -
    185/* This isn't actually used anywhere. */
    +
    185/* This isn't actually used anywhere. */
    186#define NETWORK_MORE_FRAGMENTS_NACK 200
    187
    188/* Internal defines for handling written payloads */
    @@ -156,278 +172,302 @@
    214#define FLAG_NO_POLL 8
    215
    216class RF24;
    -
    217
    - -
    226{
    -
    228 uint16_t from_node;
    -
    229
    -
    231 uint16_t to_node;
    +
    217#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833)
    +
    218class nrf_to_nrf;
    +
    219#endif
    +
    220
    +
    + +
    229{
    +
    231 uint16_t from_node;
    232
    -
    234 uint16_t id;
    +
    234 uint16_t to_node;
    235
    -
    243 unsigned char type;
    -
    244
    -
    251 unsigned char reserved;
    -
    252
    -
    254 static uint16_t next_id;
    +
    237 uint16_t id;
    +
    238
    +
    246 unsigned char type;
    +
    247
    +
    254 unsigned char reserved;
    255
    - -
    262
    -
    284 RF24NetworkHeader(uint16_t _to, unsigned char _type = 0) : to_node(_to), id(next_id++), type(_type) {}
    -
    285
    -
    295 const char* toString(void) const;
    -
    296};
    -
    297
    - -
    309{
    - -
    312
    -
    314 uint16_t message_size;
    +
    257 static uint16_t next_id;
    +
    258
    + +
    265
    +
    287 RF24NetworkHeader(uint16_t _to, unsigned char _type = 0) : to_node(_to), id(next_id++), type(_type) {}
    +
    288
    +
    298 const char* toString(void) const;
    +
    299};
    +
    +
    300
    +
    + +
    312{
    +
    315
    -
    320#if defined(RF24_LINUX)
    -
    321 uint8_t message_buffer[MAX_PAYLOAD_SIZE]; // Array to store the message
    -
    322#else
    -
    323 uint8_t* message_buffer; // Pointer to the buffer storing the actual message
    -
    324#endif
    -
    325
    - -
    332
    -
    343#if defined(RF24_LINUX) || defined(DOXYGEN_FORCED)
    -
    344 RF24NetworkFrame(RF24NetworkHeader& _header, const void* _message = NULL, uint16_t _len = 0) : header(_header), message_size(_len)
    -
    345 {
    -
    346 if (_message && _len) {
    -
    347 memcpy(message_buffer, _message, _len);
    -
    348 }
    -
    349 }
    -
    350#endif
    -
    351#if defined(DOXYGEN_FORCED) || !defined(RF24_LINUX)
    -
    362 RF24NetworkFrame(RF24NetworkHeader& _header, uint16_t _message_size) : header(_header), message_size(_message_size)
    -
    363 {
    -
    364 }
    -
    365#endif
    -
    366};
    -
    367
    - -
    375{
    -
    376
    -
    384public:
    -
    390 RF24Network(RF24& _radio);
    -
    391
    -
    412 inline void begin(uint16_t _node_address)
    -
    413 {
    -
    414 begin(USE_CURRENT_CHANNEL, _node_address);
    -
    415 }
    -
    416
    -
    425 uint8_t update(void);
    -
    426
    -
    432 bool available(void);
    -
    433
    -
    444 uint16_t peek(RF24NetworkHeader& header);
    -
    445
    -
    459 void peek(RF24NetworkHeader& header, void* message, uint16_t maxlen = MAX_PAYLOAD_SIZE);
    -
    460
    -
    483 uint16_t read(RF24NetworkHeader& header, void* message, uint16_t maxlen = MAX_PAYLOAD_SIZE);
    -
    484
    -
    504 bool write(RF24NetworkHeader& header, const void* message, uint16_t len);
    +
    317 uint16_t message_size;
    +
    318
    +
    323#if defined(RF24_LINUX)
    +
    324 uint8_t message_buffer[MAX_PAYLOAD_SIZE]; // Array to store the message
    +
    325#else
    +
    326 uint8_t* message_buffer; // Pointer to the buffer storing the actual message
    +
    327#endif
    +
    328
    + +
    335
    +
    346#if defined(RF24_LINUX) || defined(DOXYGEN_FORCED)
    +
    +
    347 RF24NetworkFrame(RF24NetworkHeader& _header, const void* _message = NULL, uint16_t _len = 0) : header(_header), message_size(_len)
    +
    348 {
    +
    349 if (_message && _len) {
    +
    350 memcpy(message_buffer, _message, _len);
    +
    351 }
    +
    352 }
    +
    +
    353#endif
    +
    354#if defined(DOXYGEN_FORCED) || !defined(RF24_LINUX)
    +
    +
    365 RF24NetworkFrame(RF24NetworkHeader& _header, uint16_t _message_size) : header(_header), message_size(_message_size)
    +
    366 {
    +
    367 }
    +
    +
    368#endif
    +
    369};
    +
    +
    370
    +
    382template<class radio_t = RF24>
    +
    + +
    384{
    +
    385
    +
    393public:
    +
    411 ESBNetwork(radio_t& _radio);
    +
    412
    +
    +
    433 inline void begin(uint16_t _node_address)
    +
    434 {
    +
    435 begin(USE_CURRENT_CHANNEL, _node_address);
    +
    436 }
    +
    +
    437
    +
    446 uint8_t update(void);
    +
    447
    +
    453 bool available(void);
    +
    454
    +
    465 uint16_t peek(RF24NetworkHeader& header);
    +
    466
    +
    480 void peek(RF24NetworkHeader& header, void* message, uint16_t maxlen = MAX_PAYLOAD_SIZE);
    +
    481
    +
    504 uint16_t read(RF24NetworkHeader& header, void* message, uint16_t maxlen = MAX_PAYLOAD_SIZE);
    505
    -
    534 void multicastLevel(uint8_t level);
    -
    535
    - -
    544
    -
    553 void setup_watchdog(uint8_t prescalar);
    -
    554
    -
    564 uint32_t txTimeout;
    +
    525 bool write(RF24NetworkHeader& header, const void* message, uint16_t len);
    +
    526
    +
    555 void multicastLevel(uint8_t level);
    +
    556
    +
    565
    -
    574 uint16_t routeTimeout;
    +
    574 void setup_watchdog(uint8_t prescalar);
    575
    -
    584#if defined(ENABLE_NETWORK_STATS) || defined(DOXYGEN_FORCED)
    -
    585
    -
    595 void failures(uint32_t* _fails, uint32_t* _ok);
    +
    585 uint32_t txTimeout;
    +
    586
    +
    595 uint16_t routeTimeout;
    596
    -
    597#endif // defined (ENABLE_NETWORK_STATS)
    -
    598#if defined(RF24NetworkMulticast)
    -
    599
    -
    616 bool multicast(RF24NetworkHeader& header, const void* message, uint16_t len, uint8_t level = 7);
    +
    605#if defined(ENABLE_NETWORK_STATS) || defined(DOXYGEN_FORCED)
    +
    606
    +
    616 void failures(uint32_t* _fails, uint32_t* _ok);
    617
    -
    618#endif
    -
    619
    -
    625 bool write(RF24NetworkHeader& header, const void* message, uint16_t len, uint16_t writeDirect);
    -
    626
    -
    659 bool sleepNode(unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE = 0); //added interrupt mode support (default 0=LOW)
    -
    660
    -
    666 uint16_t parent() const;
    -
    667
    -
    671 uint16_t addressOfPipe(uint16_t node, uint8_t pipeNo);
    -
    672
    -
    682 bool is_valid_address(uint16_t node);
    -
    683
    -
    713 void begin(uint8_t _channel, uint16_t _node_address);
    -
    714
    - -
    733
    -
    752#if defined(RF24_LINUX) || defined(DOXYGEN_FORCED)
    -
    753 std::queue<RF24NetworkFrame> external_queue;
    -
    754#endif
    -
    755
    -
    756#if (!defined(DISABLE_FRAGMENTATION) && !defined(RF24_LINUX)) || defined(DOXYGEN_FORCED)
    - -
    776#endif
    -
    777
    - -
    795
    - -
    811
    -
    812protected:
    -
    813#if defined(RF24NetworkMulticast)
    - -
    819#endif
    -
    826 uint16_t node_address;
    -
    827
    -
    828private:
    -
    846 bool write(uint16_t to_node, uint8_t sendType);
    -
    847
    -
    855 bool write_to_pipe(uint16_t node, uint8_t pipe, bool multicast);
    -
    856
    -
    865 uint8_t enqueue(RF24NetworkHeader* header);
    -
    866
    -
    867 /*
    -
    868 * Called from begin(), this sets up the radio to act accordingly per the
    -
    869 * logical `_node_address` parameter passed to `begin()`.
    -
    870 *
    -
    871 * Based on the value of the private member `node_address`, the resulting confiuration affects
    -
    872 * private members `node_mask`, `parent_node`, `parent_pipe`, and `_multicast_level`.
    -
    873 */
    -
    874 void setup_address(void);
    -
    875
    -
    876 /*
    -
    877 * This (non-overloaded) function copies the outgoing frame into the `frame_buffer` and detirmines
    -
    878 * the initial values passed into `logicalToPhysicalAddress()` (based on the value passed
    -
    879 * to the `writeDirect` parameter). This is always called from either of the overloaded public
    -
    880 * `write()` functions.
    -
    881 */
    -
    882 bool _write(RF24NetworkHeader& header, const void* message, uint16_t len, uint16_t writeDirect);
    -
    883
    -
    884 struct logicalToPhysicalStruct
    -
    885 {
    -
    887 uint16_t send_node;
    -
    889 uint8_t send_pipe;
    -
    891 bool multicast;
    -
    892 };
    -
    893
    -
    894 /*
    -
    895 * Translates an outgoing frame's header information into the current node's
    -
    896 * required information (`logicalToPhysicalStruct`) for making the transmission.
    -
    897 *
    -
    898 * This returns void because the translated results are stored in the
    -
    899 * `logicalToPhysicalStruct` passed by reference.
    -
    900 */
    -
    901 void logicalToPhysicalAddress(logicalToPhysicalStruct* conversionInfo);
    -
    902
    -
    903 /********* only called from `logicalToPhysicalAddress()` ***************/
    +
    618#endif // defined (ENABLE_NETWORK_STATS)
    +
    619#if defined(RF24NetworkMulticast)
    +
    620
    +
    637 bool multicast(RF24NetworkHeader& header, const void* message, uint16_t len, uint8_t level = 7);
    +
    638
    +
    639#endif
    +
    640
    +
    646 bool write(RF24NetworkHeader& header, const void* message, uint16_t len, uint16_t writeDirect);
    +
    647
    +
    680 bool sleepNode(unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE = 0); //added interrupt mode support (default 0=LOW)
    +
    681
    +
    687 uint16_t parent() const;
    +
    688
    +
    692 uint16_t addressOfPipe(uint16_t node, uint8_t pipeNo);
    +
    693
    +
    703 bool is_valid_address(uint16_t node);
    +
    704
    +
    734 void begin(uint8_t _channel, uint16_t _node_address);
    +
    735
    + +
    754
    +
    773#if defined(RF24_LINUX) || defined(DOXYGEN_FORCED)
    +
    774 std::queue<RF24NetworkFrame> external_queue;
    +
    775#endif
    +
    776
    +
    777#if (!defined(DISABLE_FRAGMENTATION) && !defined(RF24_LINUX)) || defined(DOXYGEN_FORCED)
    + +
    797#endif
    +
    798
    + +
    816
    + +
    832
    +
    833protected:
    +
    834#if defined(RF24NetworkMulticast)
    + +
    840#endif
    +
    847 uint16_t node_address;
    +
    848
    +
    849private:
    +
    867 bool write(uint16_t to_node, uint8_t sendType);
    +
    868
    +
    876 bool write_to_pipe(uint16_t node, uint8_t pipe, bool multicast);
    +
    877
    +
    886 uint8_t enqueue(RF24NetworkHeader* header);
    +
    887
    +
    888 /*
    +
    889 * Called from begin(), this sets up the radio to act accordingly per the
    +
    890 * logical `_node_address` parameter passed to `begin()`.
    +
    891 *
    +
    892 * Based on the value of the private member `node_address`, the resulting confiuration affects
    +
    893 * private members `node_mask`, `parent_node`, `parent_pipe`, and `_multicast_level`.
    +
    894 */
    +
    895 void setup_address(void);
    +
    896
    +
    897 /*
    +
    898 * This (non-overloaded) function copies the outgoing frame into the `frame_buffer` and detirmines
    +
    899 * the initial values passed into `logicalToPhysicalAddress()` (based on the value passed
    +
    900 * to the `writeDirect` parameter). This is always called from either of the overloaded public
    +
    901 * `write()` functions.
    +
    902 */
    +
    903 bool _write(RF24NetworkHeader& header, const void* message, uint16_t len, uint16_t writeDirect);
    904
    -
    905 /* Returns true if the given logical address (`node` parameter) is a direct child of the current node; otherwise returns false. */
    -
    906 bool is_direct_child(uint16_t node);
    -
    907 /* Returns true if the given logical address (`node` parameter) is a descendent of the current node; otherwise returns false. */
    -
    908 bool is_descendant(uint16_t node);
    -
    909 /* Returns a logical address for the first child en route to a child node */
    -
    910 uint16_t direct_child_route_to(uint16_t node);
    -
    911
    -
    912 /***********************************************************************/
    -
    913
    -
    914 RF24& radio;
    -
    916 uint8_t frame_size; /* The outgoing frame's total size including the header info. Ranges [8, MAX_PAYLOAD_SIZE] */
    -
    917 const static unsigned int max_frame_payload_size = MAX_FRAME_SIZE - sizeof(RF24NetworkHeader); /* always 24 bytes to compensate for the frame's header */
    -
    918
    -
    919#if defined(RF24_LINUX)
    -
    920 std::queue<RF24NetworkFrame> frame_queue;
    -
    921 std::map<uint16_t, RF24NetworkFrame> frameFragmentsCache;
    -
    922 bool appendFragmentToFrame(RF24NetworkFrame frame);
    -
    923#else // Not Linux:
    -
    924
    -
    925 #if defined(DISABLE_USER_PAYLOADS)
    -
    926 uint8_t frame_queue[1];
    -
    927 #else
    -
    928 uint8_t frame_queue[MAIN_BUFFER_SIZE];
    -
    929 #endif
    -
    930
    -
    931 uint8_t* next_frame;
    -
    933 #if !defined(DISABLE_FRAGMENTATION)
    -
    934 RF24NetworkFrame frag_queue; /* a cache for re-assembling incoming message fragments */
    -
    935 uint8_t frag_queue_message_buffer[MAX_PAYLOAD_SIZE]; //frame size + 1
    -
    936 #endif
    -
    937
    -
    938#endif // Linux/Not Linux
    +
    905 struct logicalToPhysicalStruct
    +
    906 {
    +
    908 uint16_t send_node;
    +
    910 uint8_t send_pipe;
    +
    912 bool multicast;
    +
    913 };
    +
    914
    +
    915 /*
    +
    916 * Translates an outgoing frame's header information into the current node's
    +
    917 * required information (`logicalToPhysicalStruct`) for making the transmission.
    +
    918 *
    +
    919 * This returns void because the translated results are stored in the
    +
    920 * `logicalToPhysicalStruct` passed by reference.
    +
    921 */
    +
    922 void logicalToPhysicalAddress(logicalToPhysicalStruct* conversionInfo);
    +
    923
    +
    924 /********* only called from `logicalToPhysicalAddress()` ***************/
    +
    925
    +
    926 /* Returns true if the given logical address (`node` parameter) is a direct child of the current node; otherwise returns false. */
    +
    927 bool is_direct_child(uint16_t node);
    +
    928 /* Returns true if the given logical address (`node` parameter) is a descendent of the current node; otherwise returns false. */
    +
    929 bool is_descendant(uint16_t node);
    +
    930 /* Returns a logical address for the first child en route to a child node */
    +
    931 uint16_t direct_child_route_to(uint16_t node);
    +
    932
    +
    933 /***********************************************************************/
    +
    934
    +
    935 radio_t& radio;
    +
    937 uint8_t frame_size; /* The outgoing frame's total size including the header info. Ranges [8, MAX_PAYLOAD_SIZE] */
    +
    938 const static unsigned int max_frame_payload_size = MAX_FRAME_SIZE - sizeof(RF24NetworkHeader); /* always 24 bytes to compensate for the frame's header */
    939
    -
    940 uint16_t parent_node;
    -
    941 uint8_t parent_pipe;
    -
    942 uint16_t node_mask;
    -
    944 /* Given the Logical node address & a pipe number, this returns the Physical address assigned to the radio's pipes. */
    -
    945 uint64_t pipe_address(uint16_t node, uint8_t pipe);
    -
    946
    -
    947#if defined ENABLE_NETWORK_STATS
    -
    948 uint32_t nFails;
    -
    949 uint32_t nOK;
    -
    950#endif
    +
    940#if defined(RF24_LINUX)
    +
    941 std::queue<RF24NetworkFrame> frame_queue;
    +
    942 std::map<uint16_t, RF24NetworkFrame> frameFragmentsCache;
    +
    943 bool appendFragmentToFrame(RF24NetworkFrame frame);
    +
    944#else // Not Linux:
    +
    945
    +
    946 #if defined(DISABLE_USER_PAYLOADS)
    +
    947 uint8_t frame_queue[1];
    +
    948 #else
    +
    949 uint8_t frame_queue[MAIN_BUFFER_SIZE];
    +
    950 #endif
    951
    -
    952#if defined(RF24NetworkMulticast)
    -
    953 /* translates network level number (0-3) to a Logical address (used for TX multicasting) */
    -
    954 uint16_t levelToAddress(uint8_t level);
    -
    955#endif
    -
    956
    -
    958};
    -
    959
    -
    1029#endif // __RF24NETWORK_H__
    -
    #define USE_CURRENT_CHANNEL
    Definition: RF24Network.h:202
    -
    #define MAX_FRAME_SIZE
    Definition: RF24Network.h:195
    +
    952 uint8_t* next_frame;
    +
    954 #if !defined(DISABLE_FRAGMENTATION)
    +
    955 RF24NetworkFrame frag_queue; /* a cache for re-assembling incoming message fragments */
    +
    956 uint8_t frag_queue_message_buffer[MAX_PAYLOAD_SIZE]; //frame size + 1
    +
    957 #endif
    +
    958
    +
    959#endif // Linux/Not Linux
    +
    960
    +
    961 uint16_t parent_node;
    +
    962 uint8_t parent_pipe;
    +
    963 uint16_t node_mask;
    +
    965 /* Given the Logical node address & a pipe number, this returns the Physical address assigned to the radio's pipes. */
    +
    966 uint64_t pipe_address(uint16_t node, uint8_t pipe);
    +
    967
    +
    968#if defined ENABLE_NETWORK_STATS
    +
    969 uint32_t nFails;
    +
    970 uint32_t nOK;
    +
    971#endif
    +
    972
    +
    973#if defined(RF24NetworkMulticast)
    +
    974 /* translates network level number (0-3) to a Logical address (used for TX multicasting) */
    +
    975 uint16_t levelToAddress(uint8_t level);
    +
    976#endif
    +
    977
    +
    979};
    +
    +
    980
    + +
    993#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833)
    +
    994typedef ESBNetwork<nrf_to_nrf> RF52Network;
    +
    995#endif
    +
    996
    +
    1066#endif // __RF24NETWORK_H__
    +
    ESBNetwork< RF24 > RF24Network
    Definition RF24Network.h:992
    +
    #define USE_CURRENT_CHANNEL
    Definition RF24Network.h:202
    +
    #define MAX_FRAME_SIZE
    Definition RF24Network.h:195
    -
    #define MAX_PAYLOAD_SIZE
    Maximum size of fragmented network frames and fragmentation cache.
    Definition: RF24Network_config.h:61
    -
    #define MAIN_BUFFER_SIZE
    The allocated size of the incoming frame buffer.
    Definition: RF24Network_config.h:72
    -
    Definition: RF24Network.h:375
    -
    bool available(void)
    Definition: RF24Network.cpp:536
    -
    uint16_t node_address
    Definition: RF24Network.h:826
    -
    RF24NetworkFrame * frag_ptr
    Definition: RF24Network.h:775
    -
    uint8_t networkFlags
    Definition: RF24Network.h:810
    -
    void multicastLevel(uint8_t level)
    Definition: RF24Network.cpp:1130
    -
    uint8_t _multicast_level
    Definition: RF24Network.h:818
    -
    uint16_t routeTimeout
    Timeout for routed payloads.
    Definition: RF24Network.h:574
    -
    uint16_t read(RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE)
    Definition: RF24Network.cpp:602
    -
    uint32_t txTimeout
    Network timeout value.
    Definition: RF24Network.h:564
    -
    bool multicast(RF24NetworkHeader &header, const void *message, uint16_t len, uint8_t level=7)
    Definition: RF24Network.cpp:657
    -
    uint8_t frame_buffer[MAX_FRAME_SIZE]
    The raw system frame buffer.
    Definition: RF24Network.h:732
    -
    uint16_t addressOfPipe(uint16_t node, uint8_t pipeNo)
    Definition: RF24Network.cpp:1073
    -
    uint16_t parent() const
    Definition: RF24Network.cpp:548
    -
    void begin(uint16_t _node_address)
    Definition: RF24Network.h:412
    -
    std::queue< RF24NetworkFrame > external_queue
    Definition: RF24Network.h:753
    -
    bool is_valid_address(uint16_t node)
    Definition: RF24Network.cpp:1099
    -
    uint16_t peek(RF24NetworkHeader &header)
    Definition: RF24Network.cpp:558
    -
    bool write(RF24NetworkHeader &header, const void *message, uint16_t len)
    Definition: RF24Network.cpp:668
    -
    void setup_watchdog(uint8_t prescalar)
    -
    void failures(uint32_t *_fails, uint32_t *_ok)
    -
    bool sleepNode(unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE=0)
    -
    uint8_t update(void)
    Definition: RF24Network.cpp:123
    -
    bool multicastRelay
    Definition: RF24Network.h:543
    -
    bool returnSysMsgs
    Definition: RF24Network.h:794
    -
    Definition: RF24Network.h:309
    -
    RF24NetworkFrame(RF24NetworkHeader &_header, uint16_t _message_size)
    Definition: RF24Network.h:362
    -
    RF24NetworkFrame(RF24NetworkHeader &_header, const void *_message=NULL, uint16_t _len=0)
    Definition: RF24Network.h:344
    -
    uint8_t * message_buffer
    Definition: RF24Network.h:323
    -
    RF24NetworkHeader header
    Definition: RF24Network.h:311
    -
    uint16_t message_size
    Definition: RF24Network.h:314
    -
    RF24NetworkFrame()
    Definition: RF24Network.h:331
    -
    Definition: RF24Network.h:226
    -
    const char * toString(void) const
    Definition: RF24Network.cpp:997
    -
    unsigned char reserved
    Definition: RF24Network.h:251
    -
    RF24NetworkHeader(uint16_t _to, unsigned char _type=0)
    Definition: RF24Network.h:284
    -
    RF24NetworkHeader()
    Definition: RF24Network.h:261
    -
    unsigned char type
    Definition: RF24Network.h:243
    -
    uint16_t id
    Definition: RF24Network.h:234
    -
    uint16_t to_node
    Definition: RF24Network.h:231
    -
    static uint16_t next_id
    Definition: RF24Network.h:254
    -
    uint16_t from_node
    Definition: RF24Network.h:228
    +
    #define MAX_PAYLOAD_SIZE
    Maximum size of fragmented network frames and fragmentation cache.
    Definition RF24Network_config.h:67
    +
    #define MAIN_BUFFER_SIZE
    The allocated size of the incoming frame buffer.
    Definition RF24Network_config.h:78
    +
    Definition RF24Network.h:384
    +
    ESBNetwork(radio_t &_radio)
    Definition RF24Network.cpp:63
    +
    std::queue< RF24NetworkFrame > external_queue
    Definition RF24Network.h:774
    +
    bool sleepNode(unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE=0)
    +
    bool returnSysMsgs
    Definition RF24Network.h:815
    +
    void multicastLevel(uint8_t level)
    Definition RF24Network.cpp:1159
    +
    uint16_t node_address
    Definition RF24Network.h:847
    +
    bool multicast(RF24NetworkHeader &header, const void *message, uint16_t len, uint8_t level=7)
    Definition RF24Network.cpp:673
    +
    bool available(void)
    Definition RF24Network.cpp:547
    +
    void begin(uint16_t _node_address)
    Definition RF24Network.h:433
    +
    uint16_t routeTimeout
    Timeout for routed payloads.
    Definition RF24Network.h:595
    +
    void setup_watchdog(uint8_t prescalar)
    +
    void failures(uint32_t *_fails, uint32_t *_ok)
    +
    uint8_t update(void)
    Definition RF24Network.cpp:130
    +
    uint32_t txTimeout
    Network timeout value.
    Definition RF24Network.h:585
    +
    uint8_t networkFlags
    Definition RF24Network.h:831
    +
    RF24NetworkFrame * frag_ptr
    Definition RF24Network.h:796
    +
    uint16_t peek(RF24NetworkHeader &header)
    Definition RF24Network.cpp:571
    +
    uint8_t _multicast_level
    Definition RF24Network.h:839
    +
    uint16_t addressOfPipe(uint16_t node, uint8_t pipeNo)
    Definition RF24Network.cpp:1099
    +
    bool is_valid_address(uint16_t node)
    Definition RF24Network.cpp:1127
    +
    uint8_t frame_buffer[MAX_FRAME_SIZE]
    The raw system frame buffer.
    Definition RF24Network.h:753
    +
    uint16_t read(RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE)
    Definition RF24Network.cpp:617
    +
    bool multicastRelay
    Definition RF24Network.h:564
    +
    uint16_t parent() const
    Definition RF24Network.cpp:560
    +
    bool write(RF24NetworkHeader &header, const void *message, uint16_t len)
    Definition RF24Network.cpp:685
    +
    Definition RF24Network.h:312
    +
    RF24NetworkFrame(RF24NetworkHeader &_header, uint16_t _message_size)
    Definition RF24Network.h:365
    +
    RF24NetworkFrame(RF24NetworkHeader &_header, const void *_message=NULL, uint16_t _len=0)
    Definition RF24Network.h:347
    +
    uint8_t * message_buffer
    Definition RF24Network.h:326
    +
    RF24NetworkHeader header
    Definition RF24Network.h:314
    +
    uint16_t message_size
    Definition RF24Network.h:317
    +
    RF24NetworkFrame()
    Definition RF24Network.h:334
    +
    Definition RF24Network.h:229
    +
    const char * toString(void) const
    Definition RF24Network.cpp:1019
    +
    unsigned char reserved
    Definition RF24Network.h:254
    +
    RF24NetworkHeader(uint16_t _to, unsigned char _type=0)
    Definition RF24Network.h:287
    +
    RF24NetworkHeader()
    Definition RF24Network.h:264
    +
    unsigned char type
    Definition RF24Network.h:246
    +
    uint16_t id
    Definition RF24Network.h:237
    +
    uint16_t to_node
    Definition RF24Network.h:234
    +
    static uint16_t next_id
    Definition RF24Network.h:257
    +
    uint16_t from_node
    Definition RF24Network.h:231
    + diff --git a/RF24Network__config_8h.html b/RF24Network__config_8h.html index 2c9f9b7f..523cf9da 100644 --- a/RF24Network__config_8h.html +++ b/RF24Network__config_8h.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: RF24Network_config.h File Reference +Optimized RF24Network Layer: RF24Network_config.h File Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    @@ -82,28 +98,30 @@ - + - + - + - + - + + + - + - + - +

    Macros

    #define NETWORK_DEFAULT_ADDRESS   04444
    #define NETWORK_DEFAULT_ADDRESS   04444
     A reserved valid address for use with RF24Mesh (when a mesh node requests an assigned address)
     
    #define NETWORK_MULTICAST_ADDRESS   0100
    #define NETWORK_MULTICAST_ADDRESS   0100
     A sentinel address value for multicasting purposes.
     
    #define NETWORK_AUTO_ROUTING   070
    #define NETWORK_AUTO_ROUTING   070
     A sentinel value for internally indicating that the frame should be automatically routed as necessary.
     
    #define SLOW_ADDR_POLL_RESPONSE   10
    #define SLOW_ADDR_POLL_RESPONSE   10
     Adds a delay to node prior to transmitting NETWORK_ADDR_RESPONSE messages.
     
    #define RF24NetworkMulticast
    #define NUM_PIPES   6
     
    #define RF24NetworkMulticast
     When defined, this will allow the use of multicasting messages.
     
    #define MAX_PAYLOAD_SIZE   144
    #define MAX_PAYLOAD_SIZE   144
     Maximum size of fragmented network frames and fragmentation cache.
     
    #define MAIN_BUFFER_SIZE   (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
    #define MAIN_BUFFER_SIZE   (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
     The allocated size of the incoming frame buffer.
     
    #define ENABLE_DYNAMIC_PAYLOADS
    #define ENABLE_DYNAMIC_PAYLOADS
     

    Macro Definition Documentation

    @@ -170,6 +188,21 @@

    NETWORK_ADDR_RESPONSE messages.

    By default this is undefined for speed. This defined number of milliseconds is only applied to the master node when replying to a child trying to connect to the mesh network.

    Note
    It is advised to define this if any child node is running CircuitPython because the execution speed in pure python is inherently slower than it is in C++.
    +

    +
    + +

    ◆ NUM_PIPES

    + +
    +
    + + + + +
    #define NUM_PIPES   6
    +
    +

    The number of 'pipes' available for addressing in the current device Networks with NRF24L01 devices only have 6 pipes NRF52x networks support up to 8 pipes

    +
    @@ -218,7 +251,7 @@

    - +
    #define MAIN_BUFFER_SIZE   (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)#define MAIN_BUFFER_SIZE   (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
    @@ -246,7 +279,8 @@

    +

    diff --git a/RF24Network__config_8h_source.html b/RF24Network__config_8h_source.html index b243f564..6c7e2f33 100644 --- a/RF24Network__config_8h_source.html +++ b/RF24Network__config_8h_source.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: RF24Network_config.h Source File +Optimized RF24Network Layer: RF24Network_config.h Source File + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    34 #define SLOW_ADDR_POLL_RESPONSE 10
    35#endif // defined DOXYGEN_FORCED
    36
    -
    37#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__)
    -
    38
    -
    39 /********** USER CONFIG - non ATTiny **************/
    -
    40
    -
    41 //#define ENABLE_SLEEP_MODE //AVR only
    -
    43 #define RF24NetworkMulticast
    +
    41#define NUM_PIPES 6
    +
    42
    +
    43#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__)
    44
    -
    45 /* Saves memory by disabling fragmentation */
    -
    46 //#define DISABLE_FRAGMENTATION
    -
    47
    -
    48 /* System defines */
    -
    49
    -
    57 #ifndef MAX_PAYLOAD_SIZE
    -
    58 #if defined linux || defined __linux
    -
    59 #define MAX_PAYLOAD_SIZE 1514
    -
    60 #else
    -
    61 #define MAX_PAYLOAD_SIZE 144
    -
    62 #endif
    -
    63 #endif // MAX_PAYLOAD_SIZE
    -
    64
    -
    72 #define MAIN_BUFFER_SIZE (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
    -
    73
    -
    74 /* Disable user payloads. Saves memory when used with RF24Ethernet or software that uses external data.*/
    -
    75 //#define DISABLE_USER_PAYLOADS
    -
    76
    -
    77 /* Enable tracking of success and failures for all transmissions, routed and user initiated */
    -
    78 //#define ENABLE_NETWORK_STATS
    +
    45 /********** USER CONFIG - non ATTiny **************/
    +
    46
    +
    47 //#define ENABLE_SLEEP_MODE //AVR only
    +
    49 #define RF24NetworkMulticast
    +
    50
    +
    51 /* Saves memory by disabling fragmentation */
    +
    52 //#define DISABLE_FRAGMENTATION
    +
    53
    +
    54 /* System defines */
    +
    55
    +
    63 #ifndef MAX_PAYLOAD_SIZE
    +
    64 #if defined linux || defined __linux
    +
    65 #define MAX_PAYLOAD_SIZE 1514
    +
    66 #else
    +
    67 #define MAX_PAYLOAD_SIZE 144
    +
    68 #endif
    +
    69 #endif // MAX_PAYLOAD_SIZE
    +
    70
    +
    78 #define MAIN_BUFFER_SIZE (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
    79
    -
    80 #ifndef DISABLE_DYNAMIC_PAYLOADS
    -
    82 #define ENABLE_DYNAMIC_PAYLOADS
    -
    83 #endif // DISABLE_DYNAMIC_PAYLOADS
    -
    84
    -
    85 /* Debug Options */
    -
    86 //#define RF24NETWORK_DEBUG
    -
    87 //#define RF24NETWORK_DEBUG_MINIMAL
    -
    88 //#define RF24NETWORK_DEBUG_ROUTING
    -
    89 //#define RF24NETWORK_DEBUG_FRAGMENTATION
    -
    90 //#define RF24NETWORK_DEBUG_FRAGMENTATION_L2
    -
    91 /*************************************/
    -
    92
    -
    93#else // Different set of defaults for ATTiny - fragmentation is disabled and user payloads are set to 3 max
    -
    94 /********** USER CONFIG - ATTiny **************/
    -
    95 //#define ENABLE_SLEEP_MODE //AVR only
    -
    96 #define RF24NetworkMulticast
    -
    97 // NOTE: Only 24 bytes of a payload are used when DISABLE_FRAGMENTATION is defined
    -
    98 #define MAX_PAYLOAD_SIZE 72
    -
    99 #define MAIN_BUFFER_SIZE (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
    -
    100 #define DISABLE_FRAGMENTATION
    -
    101 #define ENABLE_DYNAMIC_PAYLOADS
    -
    102 //#define DISABLE_USER_PAYLOADS
    -
    103#endif
    -
    104/*************************************/
    -
    105
    -
    106#endif // RF24_NETWORK_CONFIG_H
    -
    107
    -
    108#ifdef __cplusplus
    -
    109
    -
    110#if (defined(__linux) || defined(linux)) && !defined(__ARDUINO_X86__) && !defined(USE_RF24_LIB_SRC)
    -
    111 #include <RF24/RF24_config.h>
    -
    112
    -
    113// ATXMega
    -
    114#elif defined(XMEGA)
    -
    115 #include "../../rf24lib/rf24lib/RF24_config.h"
    -
    116#else
    -
    117 #include <RF24_config.h>
    -
    118#endif
    -
    119
    -
    120#if !defined(ARDUINO_ARCH_AVR)
    -
    121 // sprintf is used by RF24NetworkHeader::toString
    -
    122 #ifndef sprintf_P
    -
    123 #define sprintf_P sprintf
    -
    124 #endif
    -
    125#endif
    -
    126
    -
    127#ifdef RF24NETWORK_DEBUG
    -
    128 #define IF_RF24NETWORK_DEBUG(x) ({ x; })
    -
    129#else
    -
    130 #define IF_RF24NETWORK_DEBUG(x)
    +
    80 /* Disable user payloads. Saves memory when used with RF24Ethernet or software that uses external data.*/
    +
    81 //#define DISABLE_USER_PAYLOADS
    +
    82
    +
    83 /* Enable tracking of success and failures for all transmissions, routed and user initiated */
    +
    84 //#define ENABLE_NETWORK_STATS
    +
    85
    +
    86 #ifndef DISABLE_DYNAMIC_PAYLOADS
    +
    88 #define ENABLE_DYNAMIC_PAYLOADS
    +
    89 #endif // DISABLE_DYNAMIC_PAYLOADS
    +
    90
    +
    91 /* Debug Options */
    +
    92 //#define RF24NETWORK_DEBUG
    +
    93 //#define RF24NETWORK_DEBUG_MINIMAL
    +
    94 //#define RF24NETWORK_DEBUG_ROUTING
    +
    95 //#define RF24NETWORK_DEBUG_FRAGMENTATION
    +
    96 //#define RF24NETWORK_DEBUG_FRAGMENTATION_L2
    +
    97 /*************************************/
    +
    98
    +
    99#else // Different set of defaults for ATTiny - fragmentation is disabled and user payloads are set to 3 max
    +
    100 /********** USER CONFIG - ATTiny **************/
    +
    101 //#define ENABLE_SLEEP_MODE //AVR only
    +
    102 #define RF24NetworkMulticast
    +
    103 // NOTE: Only 24 bytes of a payload are used when DISABLE_FRAGMENTATION is defined
    +
    104 #define MAX_PAYLOAD_SIZE 72
    +
    105 #define MAIN_BUFFER_SIZE (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)
    +
    106 #define DISABLE_FRAGMENTATION
    +
    107 #define ENABLE_DYNAMIC_PAYLOADS
    +
    108 //#define DISABLE_USER_PAYLOADS
    +
    109#endif
    +
    110/*************************************/
    +
    111
    +
    112#endif // RF24_NETWORK_CONFIG_H
    +
    113
    +
    114#ifdef __cplusplus
    +
    115
    +
    116#if (defined(__linux) || defined(linux)) && !defined(__ARDUINO_X86__) && !defined(USE_RF24_LIB_SRC)
    +
    117 #include <RF24/RF24_config.h>
    +
    118
    +
    119// ATXMega
    +
    120#elif defined(XMEGA)
    +
    121 #include "../../rf24lib/rf24lib/RF24_config.h"
    +
    122#else
    +
    123 #include <RF24_config.h>
    +
    124#endif
    +
    125
    +
    126#if !defined(ARDUINO_ARCH_AVR)
    +
    127 // sprintf is used by RF24NetworkHeader::toString
    +
    128 #ifndef sprintf_P
    +
    129 #define sprintf_P sprintf
    +
    130 #endif
    131#endif
    -
    132#if defined(RF24NETWORK_DEBUG_MINIMAL)
    -
    133 #define IF_RF24NETWORK_DEBUG_MINIMAL(x) ({ x; })
    -
    134#else
    -
    135 #define IF_RF24NETWORK_DEBUG_MINIMAL(x)
    -
    136#endif
    -
    137
    -
    138#if defined(RF24NETWORK_DEBUG_FRAGMENTATION)
    -
    139 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION(x) ({ x; })
    +
    132
    +
    133#ifdef RF24NETWORK_DEBUG
    +
    134 #define IF_RF24NETWORK_DEBUG(x) ({ x; })
    +
    135#else
    +
    136 #define IF_RF24NETWORK_DEBUG(x)
    +
    137#endif
    +
    138#if defined(RF24NETWORK_DEBUG_MINIMAL)
    +
    139 #define IF_RF24NETWORK_DEBUG_MINIMAL(x) ({ x; })
    140#else
    -
    141 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION(x)
    +
    141 #define IF_RF24NETWORK_DEBUG_MINIMAL(x)
    142#endif
    143
    -
    144#if defined(RF24NETWORK_DEBUG_FRAGMENTATION_L2)
    -
    145 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION_L2(x) ({ x; })
    +
    144#if defined(RF24NETWORK_DEBUG_FRAGMENTATION)
    +
    145 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION(x) ({ x; })
    146#else
    -
    147 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION_L2(x)
    +
    147 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION(x)
    148#endif
    149
    -
    150#if defined(RF24NETWORK_DEBUG_ROUTING)
    -
    151 #define IF_RF24NETWORK_DEBUG_ROUTING(x) ({ x; })
    +
    150#if defined(RF24NETWORK_DEBUG_FRAGMENTATION_L2)
    +
    151 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION_L2(x) ({ x; })
    152#else
    -
    153 #define IF_RF24NETWORK_DEBUG_ROUTING(x)
    +
    153 #define IF_RF24NETWORK_DEBUG_FRAGMENTATION_L2(x)
    154#endif
    155
    -
    156#endif // RF24_CONFIG_H
    +
    156#if defined(RF24NETWORK_DEBUG_ROUTING)
    +
    157 #define IF_RF24NETWORK_DEBUG_ROUTING(x) ({ x; })
    +
    158#else
    +
    159 #define IF_RF24NETWORK_DEBUG_ROUTING(x)
    +
    160#endif
    +
    161
    +
    162#endif // RF24_CONFIG_H
    + diff --git a/addressing_8md.html b/addressing_8md.html index 2a00a9db..bc216335 100644 --- a/addressing_8md.html +++ b/addressing_8md.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: docs/addressing.md File Reference +Optimized RF24Network Layer: docs/addressing.md File Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    docs/addressing.md File Reference
    @@ -78,7 +94,8 @@
    + diff --git a/advanced__config_8md.html b/advanced__config_8md.html index 901ab939..e52227f0 100644 --- a/advanced__config_8md.html +++ b/advanced__config_8md.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: docs/advanced_config.md File Reference +Optimized RF24Network Layer: docs/advanced_config.md File Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    docs/advanced_config.md File Reference
    @@ -78,7 +94,8 @@
    + diff --git a/annotated.html b/annotated.html index 0885dc00..05d51a7d 100644 --- a/annotated.html +++ b/annotated.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Class List +Optimized RF24Network Layer: Class List + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    Here are the classes, structs, unions and interfaces with brief descriptions:
    - +
     CRF24Network
     CESBNetwork
     CRF24NetworkFrame
     CRF24NetworkHeader
    @@ -85,7 +101,8 @@
    +
    diff --git a/bdwn.png b/bdwn.png deleted file mode 100644 index 940a0b95..00000000 Binary files a/bdwn.png and /dev/null differ diff --git a/classESBNetwork-members.html b/classESBNetwork-members.html new file mode 100644 index 00000000..2ec494fc --- /dev/null +++ b/classESBNetwork-members.html @@ -0,0 +1,132 @@ + + + + + + + +Optimized RF24Network Layer: Member List + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Optimized RF24Network Layer v2.0.2 +
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    +
    ESBNetwork< radio_t > Member List
    +
    +
    + +

    This is the complete list of members for ESBNetwork< radio_t >, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    _multicast_levelESBNetwork< radio_t >protected
    addressOfPipe(uint16_t node, uint8_t pipeNo)ESBNetwork< radio_t >
    available(void)ESBNetwork< radio_t >
    begin(uint16_t _node_address)ESBNetwork< radio_t >inline
    begin(uint8_t _channel, uint16_t _node_address)ESBNetwork< radio_t >
    ESBNetwork(radio_t &_radio)ESBNetwork< radio_t >
    external_queueESBNetwork< radio_t >
    failures(uint32_t *_fails, uint32_t *_ok)ESBNetwork< radio_t >
    frag_ptrESBNetwork< radio_t >
    frame_bufferESBNetwork< radio_t >
    is_valid_address(uint16_t node)ESBNetwork< radio_t >
    multicast(RF24NetworkHeader &header, const void *message, uint16_t len, uint8_t level=7)ESBNetwork< radio_t >
    multicastLevel(uint8_t level)ESBNetwork< radio_t >
    multicastRelayESBNetwork< radio_t >
    networkFlagsESBNetwork< radio_t >
    node_addressESBNetwork< radio_t >protected
    parent() constESBNetwork< radio_t >
    peek(RF24NetworkHeader &header)ESBNetwork< radio_t >
    peek(RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE)ESBNetwork< radio_t >
    read(RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE)ESBNetwork< radio_t >
    returnSysMsgsESBNetwork< radio_t >
    routeTimeoutESBNetwork< radio_t >
    setup_watchdog(uint8_t prescalar)ESBNetwork< radio_t >
    sleepNode(unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE=0)ESBNetwork< radio_t >
    txTimeoutESBNetwork< radio_t >
    update(void)ESBNetwork< radio_t >
    write(RF24NetworkHeader &header, const void *message, uint16_t len)ESBNetwork< radio_t >
    write(RF24NetworkHeader &header, const void *message, uint16_t len, uint16_t writeDirect)ESBNetwork< radio_t >
    + + +
    + + diff --git a/classRF24Network.html b/classESBNetwork.html similarity index 52% rename from classRF24Network.html rename to classESBNetwork.html index 41344db1..bbe57153 100644 --- a/classRF24Network.html +++ b/classESBNetwork.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: RF24Network Class Reference +Optimized RF24Network Layer: ESBNetwork< radio_t > Class Template Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    -
    RF24Network Class Reference
    +List of all members
    +
    ESBNetwork< radio_t > Class Template Reference
    @@ -86,102 +101,117 @@
    Primary Interface

    These are the main methods you need to operate the network

    RF24Network (RF24 &_radio) -  -void begin (uint16_t _node_address) -  -uint8_t update (void) -  -bool available (void) -  -uint16_t peek (RF24NetworkHeader &header) -  -void peek (RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE) -  -uint16_t read (RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE) -  -bool write (RF24NetworkHeader &header, const void *message, uint16_t len) -  + ESBNetwork (radio_t &_radio) +  +void begin (uint16_t _node_address) +  +uint8_t update (void) +  +bool available (void) +  +uint16_t peek (RF24NetworkHeader &header) +  +void peek (RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE) +  +uint16_t read (RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE) +  +bool write (RF24NetworkHeader &header, const void *message, uint16_t len) + 
    Advanced Operation

    For advanced operation of the network

    -void failures (uint32_t *_fails, uint32_t *_ok) -  -bool multicast (RF24NetworkHeader &header, const void *message, uint16_t len, uint8_t level=7) -  -bool write (RF24NetworkHeader &header, const void *message, uint16_t len, uint16_t writeDirect) -  -bool sleepNode (unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE=0) -  -uint16_t parent () const -  -uint16_t addressOfPipe (uint16_t node, uint8_t pipeNo) -  -bool is_valid_address (uint16_t node) -  +void failures (uint32_t *_fails, uint32_t *_ok) +  +bool multicast (RF24NetworkHeader &header, const void *message, uint16_t len, uint8_t level=7) +  +bool write (RF24NetworkHeader &header, const void *message, uint16_t len, uint16_t writeDirect) +  +bool sleepNode (unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE=0) +  +uint16_t parent () const +  +uint16_t addressOfPipe (uint16_t node, uint8_t pipeNo) +  +bool is_valid_address (uint16_t node) + 
    Deprecated

    Maintained for backwards compatibility

    -void begin (uint8_t _channel, uint16_t _node_address) -  +void begin (uint8_t _channel, uint16_t _node_address) +  - - - - - - - - - - - - + + + + + + + + + + + +

    Advanced Configuration

    For advanced configuration of the network

    bool multicastRelay
     
    uint32_t txTimeout
     Network timeout value.
     
    uint16_t routeTimeout
     Timeout for routed payloads.
     
    void multicastLevel (uint8_t level)
     
    void setup_watchdog (uint8_t prescalar)
     
    bool multicastRelay
     
    uint32_t txTimeout
     Network timeout value.
     
    uint16_t routeTimeout
     Timeout for routed payloads.
     
    void multicastLevel (uint8_t level)
     
    void setup_watchdog (uint8_t prescalar)
     
    - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +

    External Applications/Systems

    Interface for External Applications and Systems ( RF24Mesh, RF24Ethernet )

    uint8_t frame_buffer [MAX_FRAME_SIZE]
     The raw system frame buffer.
     
    std::queue< RF24NetworkFrameexternal_queue
     
    RF24NetworkFramefrag_ptr
     
    bool returnSysMsgs
     
    uint8_t networkFlags
     
    uint8_t _multicast_level
     
    uint16_t node_address
     
    uint8_t frame_buffer [MAX_FRAME_SIZE]
     The raw system frame buffer.
     
    std::queue< RF24NetworkFrameexternal_queue
     
    RF24NetworkFramefrag_ptr
     
    bool returnSysMsgs
     
    uint8_t networkFlags
     
    uint8_t _multicast_level
     
    uint16_t node_address
     

    Detailed Description

    -

    2014-2021 - Optimized Network Layer for RF24 Radios

    -

    This class implements an OSI Network Layer using nRF24L01(+) radios driven by RF24 library.

    +
    template<class radio_t = RF24>
    +class ESBNetwork< radio_t >

    2014-2021 - Optimized Network Layer for RF24 Radios

    +

    This class implements an OSI Network Layer using nRF24L01(+) radios driven by RF24 library.

    +
    Template Parameters
    + + +
    radio_tThe radio object's type. Defaults to RF24 for legacy behavior. This new abstraction is really meant for using the nRF52840 SoC as a drop-in replacement for the nRF24L01 radio. For more detail, see the nrf_to_nrf Arduino library.
    +
    +
    Examples
    Network_Ping.ino, Network_Ping_Sleep.ino, Network_Priority_RX.ino, Network_Priority_TX.ino, helloworld_rx.ino, helloworld_rx_advanced.ino, helloworld_tx.ino, and helloworld_tx_advanced.ino.

    Constructor & Destructor Documentation

    - -

    ◆ RF24Network()

    + +

    ◆ ESBNetwork()

    +
    +template<class radio_t >
    - + - - +
    RF24Network::RF24Network ESBNetwork< radio_t >::ESBNetwork (RF24 & _radio)radio_t & _radio)

    Construct the network

    +

    v2.0 supports a backward compatible constructor:

    RF24 radio(7, 8);
    +
    RF24Network network(radio); // for nRF24L01
    +
    +
    nrf_to_nrf radio1;
    +
    RF52Network network(radio1); // for nRF52xxx family
    +
    Definition RF24Network.h:384
    +
    See also
    v2.0 supports nrf_to_nrf Arduino library for nrf52 chips' internal radio.
    Parameters
    @@ -192,20 +222,21 @@

    Member Function Documentation

    - -

    ◆ begin() [1/2]

    + +

    ◆ begin() [1/2]

    +
    +template<class radio_t = RF24>
    _radioThe underlying radio driver instance
    - +
    - + - - +
    void RF24Network::begin void ESBNetwork< radio_t >::begin (uint16_t _node_address)uint16_t _node_address)
    @@ -215,13 +246,13 @@

    -

    Bring up the network using the current radio frequency/channel. Calling begin brings up the network, and configures the address, which designates the location of the node within RF24Network topology.

    -
    Note
    Node addresses are specified in Octal format, see RF24Network Addressing for more information. The address 04444 is reserved for RF24Mesh usage (when a mesh node is connecting to the network).
    +

    Bring up the network using the current radio frequency/channel. Calling begin brings up the network, and configures the address, which designates the location of the node within RF24Network topology.

    +
    Note
    Node addresses are specified in Octal format, see RF24Network Addressing for more information. The address 04444 is reserved for RF24Mesh usage (when a mesh node is connecting to the network).
    Warning
    Be sure to first call RF24::begin() to initialize the radio properly.

    Example 1: Begin on current radio channel with address 0 (master node)

    network.begin(00);

    Example 2: Begin with address 01 (child of master)

    network.begin(01);

    Example 3: Begin with address 011 (child of 01, grandchild of master)

    network.begin(011);
    -
    See also
    begin(uint8_t _channel, uint16_t _node_address)
    +
    See also
    begin(uint8_t _channel, uint16_t _node_address)
    Parameters
    @@ -231,17 +262,18 @@

    -

    ◆ update()

    + +

    ◆ update()

    +
    +template<class radio_t >

    _node_addressThe logical address of this node.
    - + - - +
    uint8_t RF24Network::update uint8_t ESBNetwork< radio_t >::update (void )void )
    @@ -252,17 +284,18 @@

    -

    ◆ available()

    + +

    ◆ available()

    +
    +template<class radio_t >
    - + - - +
    bool RF24Network::available bool ESBNetwork< radio_t >::available (void )void )
    @@ -272,17 +305,18 @@

    -

    ◆ peek() [1/2]

    + +

    ◆ peek() [1/2]

    +
    +template<class radio_t >
    - + - - +
    uint16_t RF24Network::peek uint16_t ESBNetwork< radio_t >::peek (RF24NetworkHeaderheader)RF24NetworkHeader & header)
    @@ -299,39 +333,33 @@

    -

    ◆ peek() [2/2]

    + +

    ◆ peek() [2/2]

    +
    +template<class radio_t >
    - + - - + - - + - - - - - - - +
    void RF24Network::peek void ESBNetwork< radio_t >::peek (RF24NetworkHeaderheader, RF24NetworkHeader & header,
    void * message, void * message,
    uint16_t maxlen = MAX_PAYLOAD_SIZE 
    )uint16_t maxlen = MAX_PAYLOAD_SIZE )

    Read the next available payload

    -

    Reads the next available payload without advancing to the next incoming message. Useful for doing a transparent packet manipulation layer on top of RF24Network.

    +

    Reads the next available payload without advancing to the next incoming message. Useful for doing a transparent packet manipulation layer on top of RF24Network.

    Parameters
    @@ -343,34 +371,28 @@

    -

    ◆ read()

    + +

    ◆ read()

    +
    +template<class radio_t >

    [out]headerThe RF24NetworkHeader (envelope) of this message
    - + - - + - - + - - - - - - - +
    uint16_t RF24Network::read uint16_t ESBNetwork< radio_t >::read (RF24NetworkHeaderheader, RF24NetworkHeader & header,
    void * message, void * message,
    uint16_t maxlen = MAX_PAYLOAD_SIZE 
    )uint16_t maxlen = MAX_PAYLOAD_SIZE )
    @@ -384,14 +406,14 @@

    Serial.println(time);

    }
    }
    -
    Definition: RF24Network.h:226
    -
    unsigned char type
    Definition: RF24Network.h:243
    +
    Definition RF24Network.h:229
    +
    unsigned char type
    Definition RF24Network.h:246

    Parameters
    - +
    [out]headerThe RF24NetworkHeader (envelope) of this message
    [out]messagePointer to memory where the message should be placed
    maxlenThe largest message size which can be held in message . If this parameter is left unspecified, the entire length of the message is fetched. Hint: Use peek(RF24NetworkHeader &) to get the length of next available message in the queue.
    maxlenThe largest message size which can be held in message . If this parameter is left unspecified, the entire length of the message is fetched. Hint: Use peek(RF24NetworkHeader &) to get the length of next available message in the queue.
    @@ -399,39 +421,33 @@

    -

    ◆ write() [1/2]

    + +

    ◆ write() [1/2]

    +
    +template<class radio_t >
    - + - - + - - + - - - - - - - +
    bool RF24Network::write bool ESBNetwork< radio_t >::write (RF24NetworkHeaderheader, RF24NetworkHeader & header,
    const void * message, const void * message,
    uint16_t len 
    )uint16_t len )

    Send a message

    -
    Note
    RF24Network now supports fragmentation for very long messages, send as normal. Fragmentation may need to be enabled or configured by editing the RF24Network_config.h file. Default max payload size is 120 bytes.
    +
    Note
    RF24Network now supports fragmentation for very long messages, send as normal. Fragmentation may need to be enabled or configured by editing the RF24Network_config.h file. Default max payload size is 120 bytes.
    uint32_t time = millis();
    uint16_t to = 00; // Send to master
    RF24NetworkHeader header(to, 'T'); // Send header type 'T'
    @@ -448,17 +464,18 @@

    -

    ◆ multicastLevel()

    + +

    ◆ multicastLevel()

    +
    +template<class radio_t >
    - + - - +
    void RF24Network::multicastLevel void ESBNetwork< radio_t >::multicastLevel (uint8_t level)uint8_t level)
    @@ -472,8 +489,8 @@

    This optional function is used to override the default level set when a node's logical address changes, and it can be used to create custom multicast groups that all share a single address.

    See also
    @@ -486,24 +503,25 @@

    -

    ◆ setup_watchdog()

    + +

    ◆ setup_watchdog()

    +
    +template<class radio_t = RF24>
    - + - - +
    void RF24Network::setup_watchdog void ESBNetwork< radio_t >::setup_watchdog (uint8_t prescalar)uint8_t prescalar)

    Set up the watchdog timer for sleep mode using the number 0 through 10 to represent the following time periods:
    - wdt_16ms = 0, wdt_32ms, wdt_64ms, wdt_128ms, wdt_250ms, wdt_500ms, wdt_1s, wdt_2s, wdt_4s, wdt_8s

    setup_watchdog(7); // Sets the WDT to trigger every second
    -
    void setup_watchdog(uint8_t prescalar)
    + wdt_16ms = 0, wdt_32ms, wdt_64ms, wdt_128ms, wdt_250ms, wdt_500ms, wdt_1s, wdt_2s, wdt_4s, wdt_8s

    setup_watchdog(7); // Sets the WDT to trigger every second
    +
    void setup_watchdog(uint8_t prescalar)
    Parameters
    @@ -513,28 +531,23 @@

    -

    ◆ failures()

    + +

    ◆ failures()

    +
    +template<class radio_t = RF24>

    prescalarThe WDT prescaler to define how often the node will wake up. When defining sleep mode cycles, this time period is 1 cycle.
    - + - - + - - - - - - - +
    void RF24Network::failures void ESBNetwork< radio_t >::failures (uint32_t * _fails, uint32_t * _fails,
    uint32_t * _ok 
    )uint32_t * _ok )
    @@ -544,47 +557,40 @@

    -

    ◆ multicast()

    + +

    ◆ multicast()

    +
    +template<class radio_t >
    - + - - + - - + - - + - - - - - - - +
    bool RF24Network::multicast bool ESBNetwork< radio_t >::multicast (RF24NetworkHeaderheader, RF24NetworkHeader & header,
    const void * message, const void * message,
    uint16_t len, uint16_t len,
    uint8_t level = 7 
    )uint8_t level = 7 )

    Send a multicast message to multiple nodes at once Allows messages to be rapidly broadcast through the network

    Multicasting is arranged in levels, with all nodes on the same level listening to the same address Levels are assigned by network level ie: nodes 01-05: Level 1, nodes 011-055: Level 2

    See also
    Parameters
    @@ -592,7 +598,7 @@

    header

    reference to the RF24NetworkHeader object used for this message
    messagePointer to memory where the message is located
    lenThe size of the message
    levelMulticast level to broadcast to. If this parameter is unspecified, then the node's current multicastLevel() is used.
    levelMulticast level to broadcast to. If this parameter is unspecified, then the node's current multicastLevel() is used.
    @@ -600,40 +606,33 @@

    -

    ◆ write() [2/2]

    + +

    ◆ write() [2/2]

    +
    +template<class radio_t >
    - + - - + - - + - - + - - - - - - - +
    bool RF24Network::write bool ESBNetwork< radio_t >::write (RF24NetworkHeaderheader, RF24NetworkHeader & header,
    const void * message, const void * message,
    uint16_t len, uint16_t len,
    uint16_t writeDirect 
    )uint16_t writeDirect )
    @@ -641,40 +640,34 @@

    -

    ◆ sleepNode()

    + +

    ◆ sleepNode()

    +
    +template<class radio_t = RF24>
    - + - - + - - + - - - - - - - +
    bool RF24Network::sleepNode bool ESBNetwork< radio_t >::sleepNode (unsigned int cycles, unsigned int cycles,
    int interruptPin, int interruptPin,
    uint8_t INTERRUPT_MODE = 0 
    )uint8_t INTERRUPT_MODE = 0 )

    Sleep this node - For AVR devices only

    Note
    NEW - Nodes can now be slept while the radio is not actively transmitting. This must be manually enabled by uncommenting the #define ENABLE_SLEEP_MODE in RF24Network_config.h
    -The watchdog timer should be configured in the sketch's setup() if using sleep mode. This function will sleep the node, with the radio still active in receive mode. See setup_watchdog().
    +The watchdog timer should be configured in the sketch's setup() if using sleep mode. This function will sleep the node, with the radio still active in receive mode. See setup_watchdog().

    The node can be awoken in two ways, both of which can be enabled simultaneously:

    1. An interrupt - usually triggered by the radio receiving a payload. Must use pin 2 (interrupt 0) or 3 (interrupt 1) on Uno, Nano, etc.
    2. The watchdog timer waking the MCU after a designated period of time, can also be used instead of delays to control transmission intervals.
    3. @@ -709,16 +702,18 @@

      -

      ◆ parent()

      + +

      ◆ parent()

      +
      +template<class radio_t >
      - + - +
      uint16_t RF24Network::parent uint16_t ESBNetwork< radio_t >::parent ()) const
      @@ -728,51 +723,47 @@

      -

      ◆ addressOfPipe()

      + +

      ◆ addressOfPipe()

      +
      +template<class radio_t >
      - + - - + - - - - - - - +
      uint16_t RF24Network::addressOfPipe uint16_t ESBNetwork< radio_t >::addressOfPipe (uint16_t node, uint16_t node,
      uint8_t pipeNo 
      )uint8_t pipeNo )
      -

      Provided a node address and a pipe number, will return the RF24Network address of that child pipe for that node.

      +

      Provided a node address and a pipe number, will return the RF24Network address of that child pipe for that node.

      - -

      ◆ is_valid_address()

      + +

      ◆ is_valid_address()

      +
      +template<class radio_t >
      - + - - +
      bool RF24Network::is_valid_address bool ESBNetwork< radio_t >::is_valid_address (uint16_t node)uint16_t node)
      -

      Validate a network address as a proper logical address

      Note
      Addresses are specified in octal form, ie 011, 034. Review RF24Network addressing for more information.
      +

      Validate a network address as a proper logical address

      Note
      Addresses are specified in octal form, ie 011, 034. Review RF24Network addressing for more information.
      Parameters
      @@ -784,32 +775,27 @@

      -

      ◆ begin() [2/2]

      + +

      ◆ begin() [2/2]

      +
      +template<class radio_t >

      nodeThe specified logical address of a network node.
      - + - - + - - - - - - - +
      void RF24Network::begin void ESBNetwork< radio_t >::begin (uint8_t _channel, uint8_t _channel,
      uint16_t _node_address 
      )uint16_t _node_address )
      -

      Bring up the network on a specific radio frequency/channel.

      Deprecated:
      Use RF24::setChannel() to configure the radio channel. Use RF24Network::begin(uint16_t _node_address) to set the node address.
      +

      Bring up the network on a specific radio frequency/channel.

      Deprecated
      Use RF24::setChannel() to configure the radio channel. Use ESBNetwork::begin(uint16_t _node_address) to set the node address.

      Example 1: Begin on channel 90 with address 0 (master node)

      network.begin(90, 0);

      Example 2: Begin on channel 90 with address 01 (child of master)

      network.begin(90, 01);

      Example 3: Begin on channel 90 with address 011 (child of 01, grandchild of master)

      network.begin(90, 011);
      @@ -824,30 +810,34 @@

      Member Data Documentation

      - -

      ◆ multicastRelay

      + +

      ◆ multicastRelay

      +
      +template<class radio_t = RF24>
      - +
      bool RF24Network::multicastRelaybool ESBNetwork< radio_t >::multicastRelay

      Enabling this will allow this node to automatically forward received multicast frames to the next highest multicast level. Forwarded frames will also be enqueued on the forwarding node as a received frame.

      -

      This is disabled by default.

      See also
      multicastLevel()
      +

      This is disabled by default.

      See also
      multicastLevel()
      - -

      ◆ txTimeout

      + +

      ◆ txTimeout

      +
      +template<class radio_t = RF24>
      - +
      uint32_t RF24Network::txTimeoutuint32_t ESBNetwork< radio_t >::txTimeout
      @@ -858,14 +848,16 @@

      -

      ◆ routeTimeout

      + +

      ◆ routeTimeout

      +
      +template<class radio_t = RF24>
      - +
      uint16_t RF24Network::routeTimeoutuint16_t ESBNetwork< radio_t >::routeTimeout
      @@ -875,14 +867,16 @@

      -

      ◆ frame_buffer

      + +

      ◆ frame_buffer

      +
      +template<class radio_t = RF24>
      - +
      uint8_t RF24Network::frame_buffer[MAX_FRAME_SIZE]uint8_t ESBNetwork< radio_t >::frame_buffer[MAX_FRAME_SIZE]
      @@ -893,14 +887,16 @@

      -

      ◆ external_queue

      + +

      ◆ external_queue

      +
      +template<class radio_t = RF24>
      - +
      std::queue<RF24NetworkFrame> RF24Network::external_queuestd::queue<RF24NetworkFrame> ESBNetwork< radio_t >::external_queue
      @@ -914,47 +910,51 @@

      memcpy(&myBuffer, &f.message_buffer, dataSize);

      network.external_queue.pop();
      }
      -
      Definition: RF24Network.h:309
      -
      uint8_t * message_buffer
      Definition: RF24Network.h:323
      -
      uint16_t message_size
      Definition: RF24Network.h:314
      +
      Definition RF24Network.h:312
      +
      uint8_t * message_buffer
      Definition RF24Network.h:326
      +
      uint16_t message_size
      Definition RF24Network.h:317

      - -

      ◆ frag_ptr

      + +

      ◆ frag_ptr

      +
      +template<class radio_t = RF24>
      - +
      RF24NetworkFrame* RF24Network::frag_ptrRF24NetworkFrame* ESBNetwork< radio_t >::frag_ptr

      ARDUINO platforms only

      -

      The frag_ptr is only used with Arduino (not RPi/Linux) and is mainly used for external data systems like RF24Ethernet. When a payload of type EXTERNAL_DATA_TYPE is received, and returned from update(), the frag_ptr will always point to the starting memory location of the received frame. This is used by external data systems (RF24Ethernet) to immediately copy the received data to a buffer, without using the user-cache.

      +

      The frag_ptr is only used with Arduino (not RPi/Linux) and is mainly used for external data systems like RF24Ethernet. When a payload of type EXTERNAL_DATA_TYPE is received, and returned from update(), the frag_ptr will always point to the starting memory location of the received frame. This is used by external data systems (RF24Ethernet) to immediately copy the received data to a buffer, without using the user-cache.

      See also
      RF24NetworkFrame
      uint8_t return_type = network.update();
      if(return_type == EXTERNAL_DATA_TYPE) {
      memcpy(&myDataBuffer, network.frag_ptr->message_buffer, network.frag_ptr->message_size);
      }
      -
      #define EXTERNAL_DATA_TYPE
      Definition: RF24Network.h:103
      +
      #define EXTERNAL_DATA_TYPE
      Definition RF24Network.h:103

      Linux devices (defined as RF24_LINUX) currently cache all payload types, and do not utilize frag_ptr.

      - -

      ◆ returnSysMsgs

      + +

      ◆ returnSysMsgs

      +
      +template<class radio_t = RF24>
      - +
      bool RF24Network::returnSysMsgsbool ESBNetwork< radio_t >::returnSysMsgs
      -

      Variable to determine whether update() will return after the radio buffers have been emptied (DEFAULT), or whether to return immediately when (most) system types are received.

      +

      Variable to determine whether update() will return after the radio buffers have been emptied (DEFAULT), or whether to return immediately when (most) system types are received.

      As an example, this is used with RF24Mesh to catch and handle system messages without loading them into the user cache.

      The following reserved/system message types are handled automatically, and not returned.

      @@ -974,14 +974,16 @@

      -

      ◆ networkFlags

      + +

      ◆ networkFlags

      +
      +template<class radio_t = RF24>

      - +
      uint8_t RF24Network::networkFlagsuint8_t ESBNetwork< radio_t >::networkFlags
      @@ -999,17 +1001,19 @@

      -

      ◆ _multicast_level

      + +

      ◆ _multicast_level

      +
      +template<class radio_t = RF24>
      @@ -1018,21 +1022,23 @@

      -

      The current node's network level (used for multicast TX/RX-ing).

      See also
      Use multicastLevel() to adjust this when needed.
      +

      The current node's network level (used for multicast TX/RX-ing).

      See also
      Use multicastLevel() to adjust this when needed.
      - -

      ◆ node_address

      + +

      ◆ node_address

      +
      +template<class radio_t = RF24>

      - +
      uint8_t RF24Network::_multicast_leveluint8_t ESBNetwork< radio_t >::_multicast_level
      @@ -1048,7 +1054,8 @@

      + diff --git a/classRF24Network-members.html b/classRF24Network-members.html deleted file mode 100644 index c8e77cf5..00000000 --- a/classRF24Network-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -Newly Optimized RF24Network Layer: Member List - - - - - - - - - - - -
      -
      -

      - +
      uint16_t RF24Network::node_addressuint16_t ESBNetwork< radio_t >::node_address
      - - - - - -
      -
      Newly Optimized RF24Network Layer v1.0.21 -
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      -
      -
      - - - - - - - - -
      -
      - - -
      -
      -
      -
      -
      -
      Loading...
      -
      Searching...
      -
      No Matches
      -
      -
      -
      -
      - -
      -
      -
      RF24Network Member List
      -
      -
      - -

      This is the complete list of members for RF24Network, including all inherited members.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      _multicast_levelRF24Networkprotected
      addressOfPipe(uint16_t node, uint8_t pipeNo)RF24Network
      available(void)RF24Network
      begin(uint16_t _node_address)RF24Networkinline
      begin(uint8_t _channel, uint16_t _node_address)RF24Network
      external_queueRF24Network
      failures(uint32_t *_fails, uint32_t *_ok)RF24Network
      frag_ptrRF24Network
      frame_bufferRF24Network
      is_valid_address(uint16_t node)RF24Network
      multicast(RF24NetworkHeader &header, const void *message, uint16_t len, uint8_t level=7)RF24Network
      multicastLevel(uint8_t level)RF24Network
      multicastRelayRF24Network
      networkFlagsRF24Network
      node_addressRF24Networkprotected
      parent() constRF24Network
      peek(RF24NetworkHeader &header)RF24Network
      peek(RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE)RF24Network
      read(RF24NetworkHeader &header, void *message, uint16_t maxlen=MAX_PAYLOAD_SIZE)RF24Network
      returnSysMsgsRF24Network
      RF24Network(RF24 &_radio)RF24Network
      routeTimeoutRF24Network
      setup_watchdog(uint8_t prescalar)RF24Network
      sleepNode(unsigned int cycles, int interruptPin, uint8_t INTERRUPT_MODE=0)RF24Network
      txTimeoutRF24Network
      update(void)RF24Network
      write(RF24NetworkHeader &header, const void *message, uint16_t len)RF24Network
      write(RF24NetworkHeader &header, const void *message, uint16_t len, uint16_t writeDirect)RF24Network
      - - - - diff --git a/classes.html b/classes.html index 737c8596..ec7ceb33 100644 --- a/classes.html +++ b/classes.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Class Index +Optimized RF24Network Layer: Class Index + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +

      +
      +
      Class Index
      +
      diff --git a/clipboard.js b/clipboard.js new file mode 100644 index 00000000..42c1fb0e --- /dev/null +++ b/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/cookie.js b/cookie.js new file mode 100644 index 00000000..53ad21d9 --- /dev/null +++ b/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/darkmode_toggle.js b/darkmode_toggle.js index e2331dc8..b9c7364d 100644 --- a/darkmode_toggle.js +++ b/darkmode_toggle.js @@ -28,6 +28,10 @@ SOFTWARE. */ class DarkModeToggle extends HTMLElement { + + static darkmode_cookie_name = ''+'prefers-dark'; + static lightmode_cookie_name = ''+'prefers-light'; + static icon = ''; static title = "Toggle Light/Dark Mode" @@ -57,29 +61,30 @@ class DarkModeToggle extends HTMLElement { const toggleButton = document.createElement('dark-mode-toggle') toggleButton.title = DarkModeToggle.title toggleButton.innerHTML = DarkModeToggle.icon + toggleButton.tabIndex = 0; function addButton() { - var titleArea = document.getElementById("titlearea"); - var searchBox = document.getElementById("MSearchBox"); - var mainMenu = document.getElementById("main-menu"); - var navRow1 = document.getElementById("navrow1"); - var mainMenuVisible = false; + const titleArea = document.getElementById("titlearea"); + const searchBox = document.getElementById("MSearchBox"); + const mainMenu = document.getElementById("main-menu"); + const navRow1 = document.getElementById("navrow1"); + let mainMenuVisible = false; if (mainMenu) { - var menuStyle = window.getComputedStyle(mainMenu); + const menuStyle = window.getComputedStyle(mainMenu); mainMenuVisible = menuStyle.display!=='none' } - var searchBoxPos1 = document.getElementById("searchBoxPos1"); + const searchBoxPos1 = document.getElementById("searchBoxPos1"); if (searchBox) { // (1) search box visible searchBox.parentNode.appendChild(toggleButton) } else if (navRow1) { // (2) no search box, static menu bar - var li = document.createElement('li'); + const li = document.createElement('li'); li.style = 'float: right;' li.appendChild(toggleButton); toggleButton.style = 'width: 24px; height: 25px; padding-top: 11px; float: right;'; - var row = document.querySelector('#navrow1 > ul:first-of-type'); + const row = document.querySelector('#navrow1 > ul:first-of-type'); row.appendChild(li) } else if (mainMenu && mainMenuVisible) { // (3) no search box + dynamic menu bar expanded - var li = document.createElement('li'); + const li = document.createElement('li'); li.style = 'float: right;' li.appendChild(toggleButton); toggleButton.style = 'width: 14px; height: 36px; padding-top: 10px; float: right;'; @@ -94,11 +99,16 @@ class DarkModeToggle extends HTMLElement { } } - $(document).ready(function(){ - addButton(); - }) - $(window).resize(function(){ - addButton(); + $(document).ready(() => addButton()); + $(window).resize(() => addButton()); + let inFocus = false; + $(document).focusin(() => inFocus = true); + $(document).focusout(() => inFocus = false); + $(document).keyup(function(e) { + if (e.keyCode==27 && !inFocus) { // escape key maps to keycode `27` + e.stopPropagation(); + DarkModeToggle.userPreference = !DarkModeToggle.userPreference + } }) DarkModeToggle.setDarkModeVisibility(DarkModeToggle.darkModeEnabled) }) @@ -108,32 +118,7 @@ class DarkModeToggle extends HTMLElement { constructor() { super(); this.onclick=this.toggleDarkMode - } - - static createCookie(name, value, days) { - if (days) { - var date = new Date(); - date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); - var expires = "; expires=" + date.toGMTString(); - } - else var expires = ""; - - document.cookie = name + "=" + value + expires + "; path=/"; - } - - static readCookie(name) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') c = c.substring(1, c.length); - if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); - } - return null; - } - - static eraseCookie(name) { - DarkModeToggle.createCookie(name, "", -1); + this.onkeypress=function(e){if (e.keyCode==13) { this.toggleDarkMode(); }}; } /** @@ -144,54 +129,29 @@ class DarkModeToggle extends HTMLElement { } static get prefersDarkModeInLightMode() { - if (window.chrome) { // Chrome supports localStorage in combination with file:// but not cookies - return localStorage.getItem(DarkModeToggle.prefersDarkModeInLightModeKey) - } else { // Other browsers support cookies in combination with file:// but not localStorage - return DarkModeToggle.readCookie('doxygen_prefers_dark')=='1' - } + return Cookie.readSetting(DarkModeToggle.darkmode_cookie_name,'0')=='1'; } static set prefersDarkModeInLightMode(preference) { - if (window.chrome) { - if (preference) { - localStorage.setItem(DarkModeToggle.prefersDarkModeInLightModeKey, true) - } else { - localStorage.removeItem(DarkModeToggle.prefersDarkModeInLightModeKey) - } + if (preference) { + Cookie.writeSetting(DarkModeToggle.darkmode_cookie_name,'1'); } else { - if (preference) { - DarkModeToggle.createCookie('doxygen_prefers_dark','1',365) - } else { - DarkModeToggle.eraseCookie('doxygen_prefers_dark') - } + Cookie.eraseSetting(DarkModeToggle.darkmode_cookie_name); } } static get prefersLightModeInDarkMode() { - if (window.chrome) { // Chrome supports localStorage in combination with file:// but not cookies - return localStorage.getItem(DarkModeToggle.prefersLightModeInDarkModeKey) - } else { // Other browsers support cookies in combination with file:// but not localStorage - return DarkModeToggle.readCookie('doxygen_prefers_light')=='1' - } + return Cookie.readSetting(DarkModeToggle.lightmode_cookie_name,'0')=='1' } static set prefersLightModeInDarkMode(preference) { - if (window.chrome) { - if (preference) { - localStorage.setItem(DarkModeToggle.prefersLightModeInDarkModeKey, true) - } else { - localStorage.removeItem(DarkModeToggle.prefersLightModeInDarkModeKey) - } + if (preference) { + Cookie.writeSetting(DarkModeToggle.lightmode_cookie_name,'1'); } else { - if (preference) { - DarkModeToggle.createCookie('doxygen_prefers_light','1',365) - } else { - DarkModeToggle.eraseCookie('doxygen_prefers_light') - } + Cookie.eraseSetting(DarkModeToggle.lightmode_cookie_name); } } - /** * @returns `true` for dark-mode, `false` for light-mode user preference */ @@ -219,7 +179,7 @@ class DarkModeToggle extends HTMLElement { } static setDarkModeVisibility(enable) { - var darkModeStyle, lightModeStyle; + let darkModeStyle, lightModeStyle; if(enable) { darkModeStyle = 'inline-block'; lightModeStyle = 'none' @@ -227,12 +187,8 @@ class DarkModeToggle extends HTMLElement { darkModeStyle = 'none'; lightModeStyle = 'inline-block' } - document.querySelectorAll('.dark-mode-visible').forEach(function(el) { - el.style.display = darkModeStyle; - }); - document.querySelectorAll('.light-mode-visible').forEach(function(el) { - el.style.display = lightModeStyle; - }); + document.querySelectorAll('.dark-mode-visible' ).forEach(el => el.style.display = darkModeStyle); + document.querySelectorAll('.light-mode-visible').forEach(el => el.style.display = lightModeStyle); } static enableDarkMode(enable) { if(enable) { diff --git a/deprecated.html b/deprecated.html index 636a0177..4ca250ec 100644 --- a/deprecated.html +++ b/deprecated.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Deprecated List +Optimized RF24Network Layer: Deprecated List + + + + + @@ -23,32 +28,42 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + + +
      +
      -
      Deprecated List
      +
      Deprecated List
      -
      Member RF24Network::begin (uint8_t _channel, uint16_t _node_address)
      -
      Use RF24::setChannel() to configure the radio channel. Use RF24Network::begin(uint16_t _node_address) to set the node address.
      +
      Member ESBNetwork< radio_t >::begin (uint8_t _channel, uint16_t _node_address)
      +
      Use RF24::setChannel() to configure the radio channel. Use ESBNetwork::begin(uint16_t _node_address) to set the node address.
      +
      diff --git a/dir_49e56c817e5e54854c35e136979f97ca.html b/dir_49e56c817e5e54854c35e136979f97ca.html index 2615c392..75ce7edb 100644 --- a/dir_49e56c817e5e54854c35e136979f97ca.html +++ b/dir_49e56c817e5e54854c35e136979f97ca.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: docs Directory Reference +Optimized RF24Network Layer: docs Directory Reference + + + + + @@ -23,32 +28,42 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + + +

      +
      docs Directory Reference
      @@ -82,7 +98,8 @@
      +
      diff --git a/doc.png b/doc.png deleted file mode 100644 index 17edabff..00000000 Binary files a/doc.png and /dev/null differ diff --git a/doc.svg b/doc.svg new file mode 100644 index 00000000..0b928a53 --- /dev/null +++ b/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/docd.png b/docd.png deleted file mode 100644 index d7c94fda..00000000 Binary files a/docd.png and /dev/null differ diff --git a/docd.svg b/docd.svg new file mode 100644 index 00000000..ac18b275 --- /dev/null +++ b/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/doxygen-custom.css b/doxygen-custom.css index 7d56191d..4a3c469c 100644 --- a/doxygen-custom.css +++ b/doxygen-custom.css @@ -1,3 +1,166 @@ table.markdownTable th { color: unset; } + +/* overrides from default CSS for some admonitions */ +dl.note, +dl.remark, +dl.warning, +dl.attention, +dl.important, +dl.deprecated, +dl.see { + color: unset; + box-shadow: 5px 5px 5px hsla(0, 0%, 19.2%, 0.5); +} + +dl.remark { + background: var(--remark-color-bg); + border-left: 8px solid var(--remark-color-hl); +} + +dl.remark dt { + color: var(--remark-color-hl); +} + +dl.important dt { + color: var(--important-color-hl); +} + +dl.important { + background: var(--important-color-bg); + border-left: 8px solid var(--important-color-hl); +} + +dl.attention dt { + color: var(--attention-color-hl); +} + +dl.attention { + background: var(--attention-color-bg); + border-left: 8px solid var(--attention-color-hl); +} + +dl.deprecated dt { + color: var(--deprecated-color-hl); +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); +} + +/* special rules to accent `/see` or `/sa` command output */ +dl.see { + background: var(--seealso-color-bg); + border-left: 8px solid var(--seealso-color-hl); +} + +dl.see dt { + color: var(--seealso-color-hl); +} + +dl.see { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + +dl.see dd { + margin-left: 0; +} + +/* admonition icons */ +dl.note dt::before { + background-color: var(--note-color-hl); + mask-image: var(--note-icon); +} + +dl.see dt::before { + background-color: var(--seealso-color-hl); + mask-image: var(--seealso-icon); +} + +dl.remark dt::before { + background-color: var(--remark-color-hl); + mask-image: var(--remark-icon); +} + +dl.warning dt::before { + background-color: var(--warning-color-hl); + mask-image: var(--warning-icon); +} + +dl.deprecated dt::before { + background-color: var(--deprecated-color-hl); + mask-image: var(--deprecated-icon); +} + +dl.important dt::before { + background-color: var(--important-color-hl); + mask-image: var(--important-icon); +} + +dl.attention dt::before { + background-color: var(--attention-color-hl); + mask-image: var(--attention-icon); +} + +dl.note dt::before, +dl.see dt::before, +dl.warning dt::before, +dl.remark dt::before, +dl.deprecated dt::before, +dl.important dt::before, +dl.attention dt::before { + vertical-align: middle; + background-repeat: no-repeat; + content: ""; + display: inline-block; + height: 2em; + width: 2em; + margin-right: 0.25rem; +} + +dl.note dt, +dl.see dt, +dl.warning dt, +dl.remark dt, +dl.deprecated dt, +dl.important dt, +dl.attention dt { + margin-top: -0.35em; + margin-bottom: 0.5em; +} + +/* icon SVG data */ +*:root { + --note-icon: url('data:image/svg+xml;utf8,'); + --warning-icon: url('data:image/svg+xml;utf8,'); + --remark-icon: url('data:image/svg+xml;utf8,'); + --attention-icon: url('data:image/svg+xml;utf8,'); + --important-icon: url('data:image/svg+xml;utf8,'); + --seealso-icon: url('data:image/svg+xml;utf8,'); + --deprecated-icon: url('data:image/svg+xml;utf8,'); +} + +/* color overrides */ +html, +html.dark-mode { + --note-color-hl: hsl(213.7, 92.8%, 62%); + --note-color-bg: hsla(213.7, 92.8%, 62%, 12.5%); + --warning-color-hl: hsl(40.6, 72.1%, 47.8%); + --warning-color-bg: hsla(40.6, 72.1%, 47.8%, 12.5%); + --attention-color-hl: hsl(2.7, 92.6%, 62.9%); + --attention-color-bg: hsla(2.7, 92.6%, 62.9%, 12.5%); + --deprecated-color-hl: hsl(0, 0%, 47%); + --deprecated-color-bg: hsla(0, 0%, 47%, 12.5%); + --seealso-color-hl: hsl(323, 72%, 52%); + --seealso-color-bg: hsla(323, 72%, 52%, 12.5%); + --remark-color-hl: hsl(128.4, 49.2%, 48.6%); + --remark-color-bg: hsla(128.4, 49.2%, 48.6%, 12.5%); + --important-color-hl: hsl(262.4, 89.8%, 73.1%); + --important-color-bg: hsla(262.4, 89.8%, 73.1%, 12.5%); +} \ No newline at end of file diff --git a/doxygen.css b/doxygen.css index 1402220b..d6d0679a 100644 --- a/doxygen.css +++ b/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.9.6*/ +/* The standard CSS for doxygen 1.11.0*/ html { /* page base colors */ @@ -39,7 +39,9 @@ html { --icon-background-color: #728DC1; --icon-foreground-color: white; ---icon-doc-image: url('doc.png'); +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); /* brief member declaration list */ --memdecl-background-color: #F9FAFC; @@ -100,6 +102,7 @@ html { --toc-background-color: #F4F6FA; --toc-border-color: #D8DFEE; --toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); /** search field */ --search-background-color: white; @@ -125,6 +128,7 @@ html { --code-preprocessor-color: #806020; --code-string-literal-color: #002080; --code-char-literal-color: #008080; +--code-xml-cdata-color: black; --code-vhdl-digit-color: #FF00FF; --code-vhdl-char-color: #000000; --code-vhdl-keyword-color: #700070; @@ -141,6 +145,7 @@ html { --fragment-lineno-link-bg-color: #D8D8D8; --fragment-lineno-link-hover-fg-color: #4665A2; --fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; --tooltip-foreground-color: black; --tooltip-background-color: white; --tooltip-border-color: gray; @@ -148,10 +153,15 @@ html { --tooltip-declaration-color: #006318; --tooltip-link-color: #4665A2; --tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); /** font-family */ --font-family-normal: Roboto,sans-serif; ---font-family-monospace: monospace,fixed; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; --font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; --font-family-title: Tahoma,Arial,sans-serif; --font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; @@ -159,6 +169,28 @@ html { --font-family-icon: Arial,Helvetica; --font-family-tooltip: Roboto,sans-serif; +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; } html.dark-mode { @@ -200,7 +232,9 @@ html.dark-mode { --icon-background-color: #334975; --icon-foreground-color: #C4CFE5; ---icon-doc-image: url('docd.png'); +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); /* brief member declaration list */ --memdecl-background-color: #0B101A; @@ -261,6 +295,7 @@ html.dark-mode { --toc-background-color: #151E30; --toc-border-color: #202E4A; --toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); /** search field */ --search-background-color: black; @@ -286,14 +321,15 @@ html.dark-mode { --code-preprocessor-color: #65CABE; --code-string-literal-color: #7EC699; --code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; --code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #000000; ---code-vhdl-keyword-color: #700070; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; --code-vhdl-logic-color: #FF0000; --code-link-color: #79C0FF; --code-external-link-color: #79C0FF; --fragment-foreground-color: #C9D1D9; ---fragment-background-color: black; +--fragment-background-color: #090D16; --fragment-border-color: #30363D; --fragment-lineno-border-color: #30363D; --fragment-lineno-background-color: black; @@ -302,6 +338,7 @@ html.dark-mode { --fragment-lineno-link-bg-color: #303030; --fragment-lineno-link-hover-fg-color: #8E96A1; --fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; --tooltip-foreground-color: #C9D1D9; --tooltip-background-color: #202020; --tooltip-border-color: #C9D1D9; @@ -309,10 +346,15 @@ html.dark-mode { --tooltip-declaration-color: #20C348; --tooltip-link-color: #79C0FF; --tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); /** font-family */ --font-family-normal: Roboto,sans-serif; ---font-family-monospace: monospace,fixed; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; --font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; --font-family-title: Tahoma,Arial,sans-serif; --font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; @@ -320,6 +362,28 @@ html.dark-mode { --font-family-icon: Arial,Helvetica; --font-family-tooltip: Roboto,sans-serif; +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; } body { @@ -337,8 +401,6 @@ body, table, div, p, dl { /* @group Heading Levels */ .title { - font-weight: 400; - font-size: 14px; font-family: var(--font-family-normal); line-height: 28px; font-size: 150%; @@ -471,6 +533,12 @@ div.qindex{ color: var(--index-separator-color); } +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + dt.alphachar{ font-size: 180%; font-weight: bold; @@ -530,7 +598,13 @@ a { } a:hover { - text-decoration: underline; + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); +} + +a:hover > span.arrow { + text-decoration: none; + background : var(--nav-background-color); } a.el { @@ -581,7 +655,24 @@ dl.el { margin-left: -1cm; } +ul.check { + list-style:none; + text-indent: -16px; + padding-left: 38px; +} +li.unchecked:before { + content: "\2610\A0"; +} +li.checked:before { + content: "\2611\A0"; +} + +ol { + text-indent: 0px; +} + ul { + text-indent: 0px; overflow: visible; } @@ -606,37 +697,70 @@ ul.multicol { .fragment { text-align: left; direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-x: auto; overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); } pre.fragment { - border: 1px solid var(--fragment-border-color); - background-color: var(--fragment-background-color); - color: var(--fragment-foreground-color); - padding: 4px 6px; - margin: 4px 8px 4px 2px; + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: var(--font-family-monospace); - font-size: 105%; + fill: var(--fragment-foreground-color); + justify-content: center; + align-items: center; + cursor: pointer; } -div.fragment { - padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ - margin: 4px 8px 4px 2px; - color: var(--fragment-foreground-color); - background-color: var(--fragment-background-color); - border: 1px solid var(--fragment-border-color); +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); } div.line { font-family: var(--font-family-monospace); font-size: 13px; min-height: 13px; - line-height: 1.0; + line-height: 1.2; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ @@ -669,6 +793,18 @@ div.line.glow { box-shadow: 0 0 10px var(--glow-color); } +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} span.lineno { padding-right: 4px; @@ -740,10 +876,6 @@ img.light-mode-visible { display: none; } -img.formulaDsp { - -} - img.formulaInl, img.inline { vertical-align: middle; } @@ -806,6 +938,10 @@ span.charliteral { color: var(--code-char-literal-color); } +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + span.vhdldigit { color: var(--code-vhdl-digit-color); } @@ -1039,17 +1175,25 @@ dl.reflist dd { .paramtype { white-space: nowrap; + padding: 0px; + padding-bottom: 1px; } .paramname { - color: var(--memdef-param-name-color); white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; } + .paramname em { + color: var(--memdef-param-name-color); font-style: normal; + margin-right: 1px; } -.paramname code { - line-height: 14px; + +.paramname .paramdefval { + font-family: var(--font-family-monospace); } .params, .retval, .exception, .tparams { @@ -1220,8 +1364,7 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; + background-image:var(--icon-folder-open-image); background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -1231,8 +1374,7 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; + background-image:var(--icon-folder-closed-image); background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -1385,7 +1527,6 @@ table.fieldtable { { height:32px; display:block; - text-decoration: none; outline: none; color: var(--nav-text-normal-color); font-family: var(--font-family-nav); @@ -1474,7 +1615,8 @@ dl { padding: 0 0 0 0; } -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +/* + dl.section { margin-left: 0px; padding-left: 0px; @@ -1487,7 +1629,7 @@ dl.note { border-color: #D0C000; } -dl.warning, dl.attention { +dl.warning, dl.attention, dl.important { margin-left: -7px; padding-left: 3px; border-left: 4px solid; @@ -1529,8 +1671,103 @@ dl.bug { border-color: #C08050; } +*/ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + dl.section dd { - margin-bottom: 6px; + margin-bottom: 2px; +} + +dl.warning, dl.attention, dl.important { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); +} + +dl.warning dt, dl.attention dt, dl.important dt { + color: var(--warning-color-hl); +} + +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-hl); +} + +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); +} + +dl.todo dt { + color: var(--todo-color-hl); +} + +dl.test { + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.bug { + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); } @@ -1545,12 +1782,12 @@ dl.section dd { vertical-align: bottom; border-collapse: separate; } - + #projectlogo img -{ +{ border: 0px none; } - + #projectalign { vertical-align: middle; @@ -1651,7 +1888,7 @@ div.toc { } div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; font: 10px/1.2 var(--font-family-toc); margin-top: 5px; padding-left: 10px; @@ -1680,11 +1917,11 @@ div.toc li.level2 { } div.toc li.level3 { - margin-left: 30px; + margin-left: 15px; } div.toc li.level4 { - margin-left: 45px; + margin-left: 15px; } span.emoji { diff --git a/doxygen.svg b/doxygen.svg index d42dad52..79a76354 100644 --- a/doxygen.svg +++ b/doxygen.svg @@ -1,4 +1,6 @@ + @@ -17,7 +19,7 @@ - + diff --git a/doxygen_crawl.html b/doxygen_crawl.html new file mode 100644 index 00000000..c1f5e74b --- /dev/null +++ b/doxygen_crawl.html @@ -0,0 +1,355 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynsections.js b/dynsections.js index f579fbf3..b05f4c8d 100644 --- a/dynsections.js +++ b/dynsections.js @@ -22,102 +22,177 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); - $('table.directory tr'). - removeClass('odd').filter(':visible:odd').addClass('odd'); +function toggleVisibility(linkObj) { + return dynsection.toggleVisibility(linkObj); } -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l
      '); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; /* @license-end */ diff --git a/examples.html b/examples.html index cbb3780f..282f9cf1 100644 --- a/examples.html +++ b/examples.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Examples +Optimized RF24Network Layer: Examples + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +

      +
      +
      +
      diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 00000000..c15a1650 Binary files /dev/null and b/favicon.ico differ diff --git a/files.html b/files.html index a3705a34..b31d4e54 100644 --- a/files.html +++ b/files.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: File List +Optimized RF24Network Layer: File List + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +
      +
      +
      +
      diff --git a/folderclosed.png b/folderclosed.png deleted file mode 100644 index bb8ab35e..00000000 Binary files a/folderclosed.png and /dev/null differ diff --git a/folderclosed.svg b/folderclosed.svg new file mode 100644 index 00000000..b04bed2e --- /dev/null +++ b/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/folderclosedd.svg b/folderclosedd.svg new file mode 100644 index 00000000..52f0166a --- /dev/null +++ b/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/folderopen.png b/folderopen.png deleted file mode 100644 index d6c7f676..00000000 Binary files a/folderopen.png and /dev/null differ diff --git a/folderopen.svg b/folderopen.svg new file mode 100644 index 00000000..f6896dd2 --- /dev/null +++ b/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/folderopend.svg b/folderopend.svg new file mode 100644 index 00000000..2d1f06e7 --- /dev/null +++ b/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/functions.html b/functions.html index 1caa2d49..8738c95c 100644 --- a/functions.html +++ b/functions.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Class Members +Optimized RF24Network Layer: Class Members + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +
      +
      +
      Here is a list of all class members with links to the classes they belong to:

      - _ -

      - a -

      - b -

      - e -

      - f -

      @@ -110,69 +127,69 @@

      - h -

      +
      diff --git a/functions_func.html b/functions_func.html index ba8a7c99..8706fcbc 100644 --- a/functions_func.html +++ b/functions_func.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Class Members - Functions +Optimized RF24Network Layer: Class Members - Functions + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +
      +
      +
      +
      diff --git a/functions_vars.html b/functions_vars.html index ec7e5b87..9da468dd 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Class Members - Variables +Optimized RF24Network Layer: Class Members - Variables + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +
      +
      +
      +
      diff --git a/globals.html b/globals.html index 10867ed3..24a12547 100644 --- a/globals.html +++ b/globals.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: File Members +Optimized RF24Network Layer: File Members + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +
      +
      +
      - n -

      - r -

      @@ -139,7 +157,8 @@

      - u -

      +
      diff --git a/globals_defs.html b/globals_defs.html index e1d55661..fe967096 100644 --- a/globals_defs.html +++ b/globals_defs.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: File Members +Optimized RF24Network Layer: File Members + + + + + @@ -23,33 +28,44 @@ -
      Newly Optimized RF24Network Layer v1.0.21 +
      Optimized RF24Network Layer v2.0.2
      -
      2020 - Optimized RF24 Network Layer for NRF24L01 radios
      +
      2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
      - + +

    +
    +
    -  +
    Here is a list of all macros with links to the files they belong to:

    - e -

    +
    diff --git a/globals_type.html b/globals_type.html new file mode 100644 index 00000000..4e67fbd5 --- /dev/null +++ b/globals_type.html @@ -0,0 +1,101 @@ + + + + + + + +Optimized RF24Network Layer: File Members + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Optimized RF24Network Layer v2.0.2 +
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all typedefs with links to the files they belong to:
    +
    + + +
    + + diff --git a/group__DEFINED__TYPES.html b/group__DEFINED__TYPES.html index feee291b..00c489a3 100644 --- a/group__DEFINED__TYPES.html +++ b/group__DEFINED__TYPES.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Reserved System Message Types +Optimized RF24Network Layer: Reserved System Message Types + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + +
    +
    +

    Macros

    -#define NETWORK_ADDR_RESPONSE   128 +#define NETWORK_ADDR_RESPONSE   128   -#define NETWORK_PING   130 +#define NETWORK_PING   130   -#define EXTERNAL_DATA_TYPE   131 +#define EXTERNAL_DATA_TYPE   131   -#define NETWORK_FIRST_FRAGMENT   148 +#define NETWORK_FIRST_FRAGMENT   148   -#define NETWORK_MORE_FRAGMENTS   149 +#define NETWORK_MORE_FRAGMENTS   149   -#define NETWORK_LAST_FRAGMENT   150 +#define NETWORK_LAST_FRAGMENT   150   -#define NETWORK_ACK   193 +#define NETWORK_ACK   193   -#define NETWORK_POLL   194 +#define NETWORK_POLL   194   -#define NETWORK_REQ_ADDRESS   195 +#define NETWORK_REQ_ADDRESS   195  

    Detailed Description

    @@ -106,7 +122,7 @@
  • User types (1 - 127) 1 - 64 will NOT be acknowledged
  • System types (128 - 255) 192 - 255 will NOT be acknowledged
  • -

    System types can also contain message data.

    +

    System types can also contain message data.

    Macro Definition Documentation

    ◆ NETWORK_ADDR_RESPONSE

    @@ -119,7 +135,7 @@

    -

    A NETWORK_ADDR_RESPONSE type is utilized to manually route custom messages containing a single RF24Network address.

    +

    A NETWORK_ADDR_RESPONSE type is utilized to manually route custom messages containing a single RF24Network address.

    Used by RF24Mesh

    If a node receives a message of this type that is directly addressed to it, it will read the included message, and forward the payload on to the proper recipient.

    This allows nodes to forward multicast messages to the master node, receive a response, and forward it back to the requester.

    @@ -152,7 +168,7 @@

    -

    External data types are used to define messages that will be passed to an external data system. This allows RF24Network to route and pass any type of data, such as TCP/IP frames, while still being able to utilize standard RF24Network messages etc.

    +

    External data types are used to define messages that will be passed to an external data system. This allows RF24Network to route and pass any type of data, such as TCP/IP frames, while still being able to utilize standard RF24Network messages etc.

    Examples
    Network_Priority_RX.ino, and Network_Priority_TX.ino.
    @@ -213,7 +229,7 @@

    -

    Messages of this type indicate the last fragment in a sequence of message fragments. Messages of this type do not receive a NETWORK_ACK

    +

    Messages of this type indicate the last fragment in a sequence of message fragments. Messages of this type do not receive a NETWORK_ACK

    @@ -230,7 +246,7 @@

    Messages of this type signal the sender that a network-wide transmission has been completed.

      -
    • Not fool-proof
      RF24Network does not directly have a built-in transport layer protocol, so message delivery is not 100% guaranteed. Messages can be lost via corrupted dynamic payloads, or a NETWORK_ACK can fail (despite successful transmission of the message).
      +
    • Not fool-proof
      RF24Network does not directly have a built-in transport layer protocol, so message delivery is not 100% guaranteed. Messages can be lost via corrupted dynamic payloads, or a NETWORK_ACK can fail (despite successful transmission of the message).
    • Traffic analysis
      NETWORK_ACK messages can be utilized as a traffic/flow control mechanism. Transmitting nodes that emit NETWORK_ACK qualifying messages will be forced to wait, before sending additional data, until the payload is transmitted across the network and acknowledged.
    • @@ -278,7 +294,8 @@

      +

    diff --git a/helloworld_rx_8ino-example.html b/helloworld_rx_8ino-example.html index 459dc1bd..4538b346 100644 --- a/helloworld_rx_8ino-example.html +++ b/helloworld_rx_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: helloworld_rx.ino +Optimized RF24Network Layer: helloworld_rx.ino + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + +
    +
    +
    helloworld_rx.ino
    -

    Simplest possible example of using RF24Network. Put this sketch on one node, and helloworld_tx.pde on the other. Tx will send Rx a nice message every 2 seconds which rx will print out for us.

    +

    Simplest possible example of using RF24Network. Put this sketch on one node, and helloworld_tx.pde on the other. Tx will send Rx a nice message every 2 seconds which rx will print out for us.

    #include <SPI.h>
    #include <RF24.h>
    @@ -84,7 +100,7 @@
    RF24 radio(7, 8); // nRF24L01(+) radio attached using Getting Started board
    -
    RF24Network network(radio); // Network uses that radio
    +
    RF24Network network(radio); // Network uses that radio
    const uint16_t this_node = 00; // Address of our node in Octal format (04, 031, etc)
    const uint16_t other_node = 01; // Address of the other node in Octal format
    @@ -127,12 +143,13 @@
    }
    }
    -
    Definition: RF24Network.h:375
    -
    Definition: RF24Network.h:226
    +
    Definition RF24Network.h:384
    +
    Definition RF24Network.h:229
    +

    diff --git a/helloworld_rx_advanced_8ino-example.html b/helloworld_rx_advanced_8ino-example.html index 19d69e0a..f8551785 100644 --- a/helloworld_rx_advanced_8ino-example.html +++ b/helloworld_rx_advanced_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: helloworld_rx_advanced.ino +Optimized RF24Network Layer: helloworld_rx_advanced.ino + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + +
    +
    +
    RF24 radio(7, 8); // nRF24L01(+) radio attached using Getting Started board
    -
    RF24Network network(radio); // Network uses that radio
    +
    RF24Network network(radio); // Network uses that radio
    const uint16_t this_node = 00; // Address of our node in Octal format ( 04,031, etc)
    const uint16_t other_node = 01; // Address of the other node in Octal format
    @@ -149,13 +165,14 @@
    }
    }
    -
    #define MAX_PAYLOAD_SIZE
    Maximum size of fragmented network frames and fragmentation cache.
    Definition: RF24Network_config.h:61
    -
    Definition: RF24Network.h:375
    -
    Definition: RF24Network.h:226
    +
    #define MAX_PAYLOAD_SIZE
    Maximum size of fragmented network frames and fragmentation cache.
    Definition RF24Network_config.h:67
    +
    Definition RF24Network.h:384
    +
    Definition RF24Network.h:229
    +
    diff --git a/helloworld_tx_8ino-example.html b/helloworld_tx_8ino-example.html index b5ca9117..4931a144 100644 --- a/helloworld_tx_8ino-example.html +++ b/helloworld_tx_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: helloworld_tx.ino +Optimized RF24Network Layer: helloworld_tx.ino + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + +
    +
    +
    helloworld_tx.ino
    -

    Simplest possible example of using RF24Network. Put this sketch on one node, and helloworld_rx.pde on the other. Tx will send Rx a nice message every 2 seconds which rx will print out for us.

    +

    Simplest possible example of using RF24Network. Put this sketch on one node, and helloworld_rx.pde on the other. Tx will send Rx a nice message every 2 seconds which rx will print out for us.

    #include <SPI.h>
    #include <RF24.h>
    @@ -83,7 +99,7 @@
    RF24 radio(7, 8); // nRF24L01(+) radio attached using Getting Started board
    -
    RF24Network network(radio); // Network uses that radio
    +
    RF24Network network(radio); // Network uses that radio
    const uint16_t this_node = 01; // Address of our node in Octal format
    const uint16_t other_node = 00; // Address of the other node in Octal format
    @@ -134,12 +150,13 @@
    }
    }
    -
    Definition: RF24Network.h:375
    -
    Definition: RF24Network.h:226
    +
    Definition RF24Network.h:384
    +
    Definition RF24Network.h:229
    + diff --git a/helloworld_tx_advanced_8ino-example.html b/helloworld_tx_advanced_8ino-example.html index 5da89d05..be4ebaa6 100644 --- a/helloworld_tx_advanced_8ino-example.html +++ b/helloworld_tx_advanced_8ino-example.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: helloworld_tx_advanced.ino +Optimized RF24Network Layer: helloworld_tx_advanced.ino + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    RF24 radio(7, 8); // nRF24L01(+) radio attached using Getting Started board
    -
    RF24Network network(radio); // Network uses that radio
    +
    RF24Network network(radio); // Network uses that radio
    const uint16_t this_node = 01; // Address of our node in Octal format
    const uint16_t other_node = 00; // Address of the other node in Octal format
    @@ -154,13 +170,14 @@
    }
    }
    -
    #define MAX_PAYLOAD_SIZE
    Maximum size of fragmented network frames and fragmentation cache.
    Definition: RF24Network_config.h:61
    -
    Definition: RF24Network.h:375
    -
    Definition: RF24Network.h:226
    +
    #define MAX_PAYLOAD_SIZE
    Maximum size of fragmented network frames and fragmentation cache.
    Definition RF24Network_config.h:67
    +
    Definition RF24Network.h:384
    +
    Definition RF24Network.h:229
    + diff --git a/index.html b/index.html index 8dea7316..3948fd04 100644 --- a/index.html +++ b/index.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Network Layer for RF24 Radios +Optimized RF24Network Layer: Network Layer for RF24 Radios + + + + + @@ -23,33 +28,44 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    -

    -

    This class implements an OSI Network Layer using nRF24L01(+) radios driven by the newly optimized RF24 library fork.

    +

    +

    This class implements an OSI Network Layer using nRF24L01(+) radios driven by the newly optimized RF24 library fork or using nRF52x radios with the newly created nrf_to_nrf library.

    See also
    RF24 Library docs for general RF24 configuration and setup.
    -

    +

    Purpose/Goal

    Original: Create an alternative to ZigBee radios for Arduino communication.

    New: Enhance the current functionality for maximum efficiency, reliability, and speed

    Xbees are excellent little radios, backed up by a mature and robust standard protocol stack. They are also expensive.

    -

    For many Arduino uses, they seem like overkill. So I am working to improve the current standard for nRF24L01 radios. The best RF24 modules are available for less than $6 from many sources. With the RF24Network layer, I hope to cover many common communication scenarios.

    +

    For many Arduino uses, they seem like overkill. So I am working to improve the current standard for nRF24L01 radios. The best RF24 modules are available for less than $6 from many sources. With the RF24Network layer, I hope to cover many common communication scenarios.

    Please see TMRh20's blog post for a comparison against the ZigBee protocols

    -

    -News

    +

    +News - 2023 API Changes

    +

    Introducing RF24Network & RF24Mesh v2.0 with some significant API changes, adding the use of C++ Templates in order to support a range of ESB enabled radios, most recently NRF52x radios.

    +

    Important Notes:

      +
    • Any network layer that uses v2 needs to have RF24Network/RF24Mesh dependencies of v2 or newer. RF24 v1.x is an exception here.
    • +
    • General usage should remain backward compatible, see the included examples of the related libraries for more info
    • +
    • Any third party libs that extend the network/mesh layer may also need to be updated to incorporate the new templated class prototypes:
      template<class radio_t>
      +
      class ESBNetwork;
      +
      +
      template<class network_t, class radio_t>
      +
      class ESBMesh;
      +
      Definition RF24Network.h:384
      +
    • +
    • Third party libs should also be able to use the backward-compatible typedef in their template:
        +
      • ESBGateway.h:
        template<typename network_t, typename mesh_t>
        +
        class ESBGateway
        +
        and inform the compiler what types they intend to support:
      • +
      • ESBGateway.cpp:
        template class ESBGateway<RF24Network, RF24Mesh>;
        +
      • +
      +
    • +
    • The auto installers do not perform a version check like package managers, so having the correct versions of the software is important.
    • +
    • We will be maintaining the v1.x versions with bugfixes etc for those who cannot or do not wish to migrate to the newer template approach.
    • +

    Please see the recent changes listed in the github releases page

    -

    +

    Features

    -

    +

    The layer provides

    • Network ACKs: Efficient acknowledgement of network-wide transmissions, via dynamic radio acks and network protocol acks.
    • @@ -122,35 +160,34 @@

    • Message Forwarding. Messages can be sent from one node to any other, and this layer will get them there no matter how many hops it takes.
    • Ad-hoc Joining. A node can join a network without any changes to any existing nodes.
    -

    +

    The layer does not provide

    -

    +

    How to learn more

    -

    +

    Additional Information & Add-ons

    -

    +

    Topology for Mesh Networks using nRF24L01(+)

    -

    This network layer takes advantage of the fundamental capability of the nRF24L01(+) radio to listen actively to up to 6 other radios at once. The network is arranged in a Tree Topology, where one node is the base, and all other nodes are children either of that node, or of another. Unlike a true mesh network, multiple nodes are not connected together, so there is only one path to any given node.

    -

    +

    This network layer takes advantage of the fundamental capability of the nRF24L01(+) radio to listen actively to up to 6 other radios at once (8 with NRF52x). The network is arranged in a Tree Topology, where one node is the base, and all other nodes are children either of that node, or of another. Unlike a true mesh network, multiple nodes are not connected together, so there is only one path to any given node.

    +

    Octal Addressing and Topology

    Each node must be assigned an 15-bit address by the administrator. This address exactly describes the position of the node within the tree. The address is an octal number. Each digit in the address represents a position in the tree further from the base.

      @@ -159,26 +196,29 @@

    • Node 021 is the second child of node 01.
    • Node 0321 is the third child of node 021, an so on.
    • The largest node address is 05555, so up to 781 nodes are allowed on a single channel. An example topology is shown below, with 5 nodes in direct communication with the master node, and multiple leaf nodes spread out at a distance, using intermediate nodes to reach other nodes.
    • +
    • With the newer NRF52x devices, up to 3200 nodes are allowed on a single channel
    -

    +

    How routing is handled

    -

    When sending a message using RF24Network::write(), you fill in the header with the logical node address. The network layer figures out the right path to find that node, and sends it through the system until it gets to the right place. This works even if the two nodes are far separated, as it will send the message down to the base node, and then back out to the final destination.

    -

    All of this work is handled by the RF24Network::update() method, so be sure to call it regularly or your network will miss packets.

    -

    +

    When sending a message using ESBNetwork::write(), you fill in the header with the logical node address. The network layer figures out the right path to find that node, and sends it through the system until it gets to the right place. This works even if the two nodes are far separated, as it will send the message down to the base node, and then back out to the final destination.

    +

    All of this work is handled by the ESBNetwork::update() method, so be sure to call it regularly or your network will miss packets.

    +

    Starting up a node

    When a node starts up, it only has to contact its parent to establish communication. No direct connection to the Base node is needed. This is useful in situations where relay nodes are being used to bridge the distance to the base, so leaf nodes are out of range of the base.

    -

    +

    Directionality

    By default all nodes are always listening, so messages will quickly reach their destination.

    -

    You may choose to sleep any nodes on the network if using interrupts. This is useful in a case where the nodes are operating on batteries and need to sleep. This greatly decreases the power requirements for a sensor network. The leaf nodes can sleep most of the time, and wake every few minutes to send in a reading. Routing nodes can be triggered to wake up whenever a payload is received See RF24Network::sleepNode() in the class documentation, and RF24Network_config.h to enable sleep mode.

    +

    You may choose to sleep any nodes on the network if using interrupts. This is useful in a case where the nodes are operating on batteries and need to sleep. This greatly decreases the power requirements for a sensor network. The leaf nodes can sleep most of the time, and wake every few minutes to send in a reading. Routing nodes can be triggered to wake up whenever a payload is received See ESBNetwork::sleepNode() in the class documentation, and RF24Network_config.h to enable sleep mode.

    +
    +
    diff --git a/main__page_8md.html b/main__page_8md.html index 6f4a139e..143c9775 100644 --- a/main__page_8md.html +++ b/main__page_8md.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: docs/main_page.md File Reference +Optimized RF24Network Layer: docs/main_page.md File Reference + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    docs/main_page.md File Reference
    @@ -78,7 +94,8 @@
    +
    diff --git a/md_CHANGELOG.html b/md_CHANGELOG.html index 0aa9b8ad..366ec8ef 100644 --- a/md_CHANGELOG.html +++ b/md_CHANGELOG.html @@ -3,12 +3,17 @@ - + -Newly Optimized RF24Network Layer: Changelog +Optimized RF24Network Layer: Changelog + + + + + @@ -23,32 +28,42 @@ -
    Newly Optimized RF24Network Layer v1.0.21 +
    Optimized RF24Network Layer v2.0.2
    -
    2020 - Optimized RF24 Network Layer for NRF24L01 radios
    +
    2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
    - + + +
    +
    -
    Changelog
    +
    Changelog
    -

    All notable changes to this project will be documented in this file.

    +

    All notable changes to this project will be documented in this file.

    The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.20...v1.0.21" >1.0.21</a> - 2024-10-06

    +2.0.2 - 2024-10-06

    -<!-- 1 --> 🚀 Added

    +🚀 Added

    -<!-- 3 --> 🗑️ Removed

    +🛠️ Fixed

    -<!-- 4 --> 🛠️ Fixed

    +📝 Documentation

    -<!-- 9 --> 🗨️ Changed

    +🗨️ Changed -

    Full commit diff: v1.0.20...v1.0.21

    +

    Full commit diff: v2.0.1...v2.0.2

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.19...v1.0.20" >1.0.20</a> - 2024-06-11

    +2.0.1 - 2024-06-11

    -<!-- 4 --> 🛠️ Fixed

    +🚀 Added

    -<!-- 9 --> 🗨️ Changed

    +🛠️ Fixed -

    Full commit diff: v1.0.19...v1.0.20

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.18...v1.0.19" >1.0.19</a> - 2023-06-21

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +📝 Documentation

    -

    Full commit diff: v1.0.18...v1.0.19

    +

    +🗨️ Changed

    + +

    Full commit diff: v2.0.0...v2.0.1

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.17...v1.0.18" >1.0.18</a> - 2023-06-06

    +2.0.0 - 2023-06-08

    -<!-- 1 --> 🚀 Added

    +🗨️ Changed + +

    Full commit diff: v1.0.18...v2.0.0

    +

    +1.0.18 - 2023-06-06

    +

    +🚀 Added

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.17...v1.0.18

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.16...v1.0.17" >1.0.17</a> - 2022-07-09

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.17 - 2022-07-09

    +

    +🚀 Added

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.16...v1.0.17

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.15...v1.0.16" >1.0.16</a> - 2021-11-17

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.16 - 2021-11-17

    +

    +🚀 Added

    -

    -<!-- 2 --> 🚫 Deprecated

    +

    +🚫 Deprecated

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.15...v1.0.16

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.14...v1.0.15" >1.0.15</a> - 2021-04-13

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.15 - 2021-04-13

    +

    +🚀 Added

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.14...v1.0.15

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.13...v1.0.14" >1.0.14</a> - 2020-12-14

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +1.0.14 - 2020-12-14

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.13...v1.0.14

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.12...v1.0.13" >1.0.13</a> - 2020-08-30

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +1.0.13 - 2020-08-30

    +

    +🗨️ Changed

    Full commit diff: v1.0.12...v1.0.13

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.11...v1.0.12" >1.0.12</a> - 2020-08-17

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +1.0.12 - 2020-08-17

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.11...v1.0.12

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.10...v1.0.11" >1.0.11</a> - 2020-08-08

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +1.0.11 - 2020-08-08

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.10...v1.0.11

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.9...v1.0.10" >1.0.10</a> - 2020-07-16

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.10 - 2020-07-16

    +

    +🚀 Added

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.9...v1.0.10

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.8...v1.0.9" >1.0.9</a> - 2019-05-08

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.9 - 2019-05-08

    +

    +🚀 Added

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.8...v1.0.9

    -

    +

    New Contributors

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.7...v1.0.8" >1.0.8</a> - 2017-01-25

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.8 - 2017-01-25

    +

    +🚀 Added

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.7...v1.0.8

    -

    +

    New Contributors

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.6...v1.0.7" >1.0.7</a> - 2016-09-20

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.7 - 2016-09-20

    +

    +🚀 Added

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.6...v1.0.7

    -

    +

    New Contributors

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.5...v1.0.6" >1.0.6</a> - 2016-04-12

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +1.0.6 - 2016-04-12

    +

    +🗑️ Removed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.5...v1.0.6

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.4...v1.0.5" >1.0.5</a> - 2016-03-27

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +1.0.5 - 2016-03-27

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.4...v1.0.5

    -

    +

    New Contributors

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.3...v1.0.4" >1.0.4</a> - 2015-12-15

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +1.0.4 - 2015-12-15

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.3...v1.0.4

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.2...v1.0.3" >1.0.3</a> - 2015-12-14

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.3 - 2015-12-14

    +

    +🚀 Added

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.2...v1.0.3

    -

    +

    New Contributors

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0.1...v1.0.2" >1.0.2</a> - 2015-11-27

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0.2 - 2015-11-27

    +

    +🚀 Added

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: v1.0.1...v1.0.2

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/v1.0...v1.0.1" >1.0.1</a> - 2015-11-06

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +1.0.1 - 2015-11-06

    +

    +🗑️ Removed

    Full commit diff: v1.0...v1.0.1

    -

    -<a href="https://github.com/nRF24/RF24Network/compare/f54c0ac0ee74d2fc9490740004bd3222b170ae85...v1.0" >1.0</a> - 2015-09-26

    -

    -<!-- 1 --> 🚀 Added

    +

    +1.0 - 2015-09-26

    +

    +🚀 Added

    -

    -<!-- 3 --> 🗑️ Removed

    +

    +🗑️ Removed

    -

    -<!-- 4 --> 🛠️ Fixed

    +

    +🛠️ Fixed

    -

    -<!-- 7 -->🚦 Tests

    +

    +🚦 Tests

    -

    -<!-- 8 --> 📝 Documentation

    +

    +📝 Documentation

    -

    -<!-- 9 --> 🗨️ Changed

    +

    +🗨️ Changed

    Full commit diff: f54c0ac...v1.0

    -

    +

    New Contributors