From 894b9095a9fe612de3e6eb1bde3efe0a2ec76e3f Mon Sep 17 00:00:00 2001 From: 2bndy5 <2bndy5@users.noreply.github.com> Date: Sun, 6 Oct 2024 13:28:40 +0000 Subject: [PATCH] deploy: 255cbfd139541fe2b624b2cd94460db7fa25d9db --- RF24GatewayNodeInt_8cpp-example.html | 33 +- RF24GatewayNode_8cpp-example.html | 35 +- RF24Gateway_8cpp_source.html | 1439 ++++++++--------- RF24Gateway_8h_source.html | 612 ++++--- RF24Gateway_ncursesInt_8cpp-example.html | 103 +- RF24Gateway_ncurses_8cpp-example.html | 70 +- annotated.html | 37 +- bClient_8sh-example.html | 31 +- bdwn.png | Bin 0 -> 147 bytes classESBGateway-members.html | 120 -- classESBGateway.html | 612 ------- classESBNetwork.html | 105 -- classRF24Gateway-members.html | 103 ++ classRF24Gateway.html | 607 +++++++ classes.html | 36 +- clipboard.js | 61 - cookie.js | 58 - darkmode_toggle.js | 118 +- dir_49e56c817e5e54854c35e136979f97ca.html | 29 +- doc.png | Bin 0 -> 746 bytes doc.svg | 12 - docd.png | Bin 0 -> 756 bytes docd.svg | 12 - doxygen-custom.css | 163 -- doxygen.css | 337 +--- doxygen.svg | 4 +- doxygen_crawl.html | 108 -- dynsections.js | 257 ++- examples.html | 29 +- favicon.ico | Bin 4286 -> 0 bytes folderclosed.png | Bin 0 -> 616 bytes folderclosed.svg | 11 - folderclosedd.svg | 11 - folderopen.png | Bin 0 -> 597 bytes folderopen.svg | 17 - folderopend.svg | 12 - functions.html | 65 +- functions_func.html | 49 +- functions_vars.html | 49 +- index.html | 113 +- md_CHANGELOG.html | 311 ++++ md_CONTRIBUTING.html | 33 +- menu.js | 38 +- minus.svg | 8 - minusd.svg | 8 - navtree.css | 149 -- nodeClient_8js-example.html | 31 +- pages.html | 32 +- plus.svg | 9 - plusd.svg | 9 - pyClient_8py-example.html | 31 +- resize.js | 145 -- search/all_0.js | 2 +- search/all_1.js | 6 +- search/all_10.js | 4 - search/all_2.js | 2 +- search/all_3.js | 6 +- search/all_4.js | 10 +- search/all_5.js | 3 +- search/all_6.js | 2 +- search/all_7.js | 5 +- search/all_8.js | 7 +- search/all_9.js | 4 +- search/all_a.js | 3 +- search/all_b.js | 4 - search/all_c.js | 8 - search/all_d.js | 6 - search/all_e.js | 5 - search/all_f.js | 4 - search/classes_0.js | 7 +- search/classes_1.js | 4 - search/close.svg | 19 +- search/functions_0.js | 2 +- search/functions_1.js | 3 +- search/functions_2.js | 3 +- search/functions_3.js | 2 +- search/functions_4.js | 2 +- search/functions_5.js | 4 +- search/functions_6.js | 2 +- search/mag.svg | 19 +- search/mag_d.svg | 19 +- search/mag_sel.svg | 53 +- search/mag_seld.svg | 59 +- search/pages_0.js | 3 +- search/search.js | 942 ++++++----- search/searchdata.js | 6 +- search/variables_0.js | 2 +- search/variables_1.js | 2 +- search/variables_2.js | 2 +- search/variables_3.js | 2 +- search/variables_4.js | 2 +- search/variables_5.js | 4 +- search/variables_6.js | 4 +- structESBGateway_1_1routeStruct-members.html | 111 -- ...uctRF24Gateway_1_1routeStruct-members.html | 49 +- ...l => structRF24Gateway_1_1routeStruct.html | 94 +- tabs.css | 2 +- 97 files changed, 3245 insertions(+), 4521 deletions(-) create mode 100644 bdwn.png delete mode 100644 classESBGateway-members.html delete mode 100644 classESBGateway.html delete mode 100644 classESBNetwork.html create mode 100644 classRF24Gateway-members.html create mode 100644 classRF24Gateway.html delete mode 100644 clipboard.js delete mode 100644 cookie.js create mode 100644 doc.png delete mode 100644 doc.svg create mode 100644 docd.png delete mode 100644 docd.svg delete mode 100644 doxygen_crawl.html delete mode 100644 favicon.ico create mode 100644 folderclosed.png delete mode 100644 folderclosed.svg delete mode 100644 folderclosedd.svg create mode 100644 folderopen.png delete mode 100644 folderopen.svg delete mode 100644 folderopend.svg create mode 100644 md_CHANGELOG.html delete mode 100644 minus.svg delete mode 100644 minusd.svg delete mode 100644 navtree.css delete mode 100644 plus.svg delete mode 100644 plusd.svg delete mode 100644 resize.js delete mode 100644 search/all_10.js delete mode 100644 search/all_b.js delete mode 100644 search/all_c.js delete mode 100644 search/all_d.js delete mode 100644 search/all_e.js delete mode 100644 search/all_f.js delete mode 100644 search/classes_1.js delete mode 100644 structESBGateway_1_1routeStruct-members.html rename classESBMesh.html => structRF24Gateway_1_1routeStruct-members.html (58%) rename structESBGateway_1_1routeStruct.html => structRF24Gateway_1_1routeStruct.html (50%) diff --git a/RF24GatewayNodeInt_8cpp-example.html b/RF24GatewayNodeInt_8cpp-example.html index 413b8ef..fa76b54 100644 --- a/RF24GatewayNodeInt_8cpp-example.html +++ b/RF24GatewayNodeInt_8cpp-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24GatewayNodeInt.cpp - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
RF24 radio(22, 0);
RF24Network network(radio);
RF24Mesh mesh(radio, network);
-
RF24Gateway gw(radio, network, mesh);
+
RF24Gateway gw(radio, network, mesh);
void intHandler()
{
@@ -182,12 +166,11 @@
}
return 0;
}
-
Definition RF24Gateway.h:66
+
Definition: RF24Gateway.h:47
- diff --git a/RF24GatewayNode_8cpp-example.html b/RF24GatewayNode_8cpp-example.html index 78363d9..5d1307f 100644 --- a/RF24GatewayNode_8cpp-example.html +++ b/RF24GatewayNode_8cpp-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24GatewayNode.cpp - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
RF24GatewayNode.cpp
-

A simple example of using RF24Gateway node to forward IP traffic automatically to a network interface, while managing standard RF24Network user payloads independently.

+

A simple example of using RF24Gateway node to forward IP traffic automatically to a network interface, while managing standard RF24Network user payloads independently.

#include <RF24/RF24.h>
#include <RF24Network/RF24Network.h>
#include <RF24Mesh/RF24Mesh.h>
@@ -100,7 +84,7 @@
RF24 radio(22, 0);
RF24Network network(radio);
RF24Mesh mesh(radio, network);
-
RF24Gateway gw(radio, network, mesh);
+
RF24Gateway gw(radio, network, mesh);
uint32_t mesh_timer = 0;
@@ -174,12 +158,11 @@
}
return 0;
}
- +
- diff --git a/RF24Gateway_8cpp_source.html b/RF24Gateway_8cpp_source.html index 97aee83..eab568b 100644 --- a/RF24Gateway_8cpp_source.html +++ b/RF24Gateway_8cpp_source.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24Gateway.cpp Source File - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
9
10/***************************************************************************************/
11
-
12template<class mesh_t, class network_t, class radio_t>
-
-
13ESBGateway<mesh_t, network_t, radio_t>::ESBGateway(radio_t& _radio, network_t& _network, mesh_t& _mesh) : radio(_radio), network(_network), mesh(_mesh)
-
14{
-
15 gotInterrupt = false;
-
16}
-
-
17
-
18/***************************************************************************************/
-
19
-
20template<class mesh_t, class network_t, class radio_t>
-
-
21void ESBGateway<mesh_t, network_t, radio_t>::begin(uint8_t nodeID, uint8_t _channel, rf24_datarate_e data_rate)
-
22{
-
23 mesh_enabled = true;
-
24 begin(true, mesh_enabled, 0, nodeID, data_rate, _channel);
-
25}
-
+
12RF24Gateway::RF24Gateway(RF24& _radio, RF24Network& _network, RF24Mesh& _mesh) : radio(_radio), network(_network), mesh(_mesh)
+
13{
+
14 gotInterrupt = false;
+
15}
+
16
+
17/***************************************************************************************/
+
18
+
19void RF24Gateway::begin(uint8_t nodeID, uint8_t _channel, rf24_datarate_e data_rate)
+
20{
+
21 mesh_enabled = true;
+
22 begin(true, mesh_enabled, 0, nodeID, data_rate, _channel);
+
23}
+
24
+
25/***************************************************************************************/
26
-
27/***************************************************************************************/
-
28
-
29template<class mesh_t, class network_t, class radio_t>
-
-
30void ESBGateway<mesh_t, network_t, radio_t>::begin(uint16_t address, uint8_t _channel, rf24_datarate_e data_rate, bool meshEnable, uint8_t nodeID)
-
31{
-
32 begin(0, mesh_enabled, address, nodeID, data_rate, _channel);
-
33}
-
-
34
-
35/***************************************************************************************/
-
36
-
37template<class mesh_t, class network_t, class radio_t>
-
38bool ESBGateway<mesh_t, network_t, radio_t>::begin(bool configTUN, bool meshEnable, uint16_t address, uint8_t mesh_nodeID, rf24_datarate_e data_rate, uint8_t _channel)
-
39{
-
40#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
41 printf("GW Begin\n");
-
42 printf("Config Device address 0%o nodeID %d\n", address, mesh_nodeID);
-
43#endif
-
44 config_TUN = configTUN;
-
45
-
46 /// FIX
-
47
-
48 channel = _channel; // 97;
-
49
-
50 dataRate = data_rate;
-
51
-
52 configDevice(address);
-
53 mesh_enabled = meshEnable;
-
54 thisNodeID = mesh_nodeID;
-
55 thisNodeAddress = address;
-
56
-
57 if (meshEnable) {
-
58 // GW radio channel setting takes precedence over mesh_default_channel
-
59 if (channel == 97 && MESH_DEFAULT_CHANNEL != 97) {
-
60 channel = MESH_DEFAULT_CHANNEL;
+
27void RF24Gateway::begin(uint16_t address, uint8_t _channel, rf24_datarate_e data_rate, bool meshEnable, uint8_t nodeID)
+
28{
+
29 begin(0, mesh_enabled, address, nodeID, data_rate, _channel);
+
30}
+
31
+
32/***************************************************************************************/
+
33
+
34bool RF24Gateway::begin(bool configTUN, bool meshEnable, uint16_t address, uint8_t mesh_nodeID, rf24_datarate_e data_rate, uint8_t _channel)
+
35{
+
36#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
37 printf("GW Begin\n");
+
38 printf("Config Device address 0%o nodeID %d\n", address, mesh_nodeID);
+
39#endif
+
40 config_TUN = configTUN;
+
41
+
42 /// FIX
+
43
+
44 channel = _channel; // 97;
+
45
+
46 dataRate = data_rate;
+
47
+
48 configDevice(address);
+
49 mesh_enabled = meshEnable;
+
50 thisNodeID = mesh_nodeID;
+
51 thisNodeAddress = address;
+
52
+
53 if (meshEnable) {
+
54 // GW radio channel setting takes precedence over mesh_default_channel
+
55 if (channel == 97 && MESH_DEFAULT_CHANNEL != 97) {
+
56 channel = MESH_DEFAULT_CHANNEL;
+
57 }
+
58
+
59 if (!thisNodeAddress && !mesh_nodeID) {
+
60 mesh.setNodeID(0);
61 }
-
62
-
63 if (!thisNodeAddress && !mesh_nodeID) {
-
64 mesh.setNodeID(0);
-
65 }
-
66 else {
-
67 if (!mesh_nodeID) {
-
68 mesh_nodeID = 253;
-
69 }
-
70 mesh.setNodeID(mesh_nodeID); // Try not to conflict with any low-numbered node-ids
-
71 }
-
72 mesh.begin(channel, data_rate);
-
73 thisNodeAddress = mesh.mesh_address;
-
74 }
-
75 else {
-
76 radio.begin();
-
77 delay(5);
-
78 const uint16_t this_node = address;
-
79 radio.setDataRate(dataRate);
-
80 radio.setChannel(channel);
-
81
-
82 network.begin(/*node address*/ this_node);
-
83 thisNodeAddress = this_node;
-
84 }
-
85 network.multicastRelay = 1;
+
62 else {
+
63 if (!mesh_nodeID) {
+
64 mesh_nodeID = 253;
+
65 }
+
66 mesh.setNodeID(mesh_nodeID); // Try not to conflict with any low-numbered node-ids
+
67 }
+
68 mesh.begin(channel, data_rate);
+
69 thisNodeAddress = mesh.mesh_address;
+
70 }
+
71 else {
+
72 radio.begin();
+
73 delay(5);
+
74 const uint16_t this_node = address;
+
75 radio.setDataRate(dataRate);
+
76 radio.setChannel(channel);
+
77
+
78 network.begin(/*node address*/ this_node);
+
79 thisNodeAddress = this_node;
+
80 }
+
81 network.multicastRelay = 1;
+
82
+
83 //#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
84 radio.printDetails();
+
85 //#endif
86
-
87 //#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
88 radio.printDetails();
-
89 //#endif
-
90
-
91 setupSocket();
-
92 loadRoutingTable();
-
93
-
94 return true;
-
95}
-
96
-
97/***************************************************************************************/
-
98
-
99template<class mesh_t, class network_t, class radio_t>
-
100void ESBGateway<mesh_t, network_t, radio_t>::loadRoutingTable()
-
101{
-
102 std::ifstream infile("routing.txt", std::ifstream::in);
-
103 if (!infile) {
-
104 return;
-
105 }
+
87 setupSocket();
+
88 loadRoutingTable();
+
89
+
90 return true;
+
91}
+
92
+
93/***************************************************************************************/
+
94
+
95void RF24Gateway::loadRoutingTable()
+
96{
+
97 std::ifstream infile("routing.txt", std::ifstream::in);
+
98 if (!infile) {
+
99 return;
+
100 }
+
101
+
102 std::string str;
+
103 std::string ip, mask, gw;
+
104 uint16_t count = 0;
+
105 std::string space = " ";
106
-
107 std::string str;
-
108 std::string ip, mask, gw;
-
109 uint16_t count = 0;
-
110 std::string space = " ";
-
111
-
112 while (std::getline(infile, str)) {
-
113 size_t startLen = 0;
-
114 size_t subLen = str.find(space);
-
115 if (subLen != std::string::npos) {
-
116 ip = str.substr(0, subLen);
-
117 }
-
118 else {
-
119 continue;
-
120 }
-
121 startLen = subLen + 1;
-
122 subLen = str.find(space, startLen);
-
123 if (subLen != std::string::npos) {
-
124 subLen -= (startLen);
-
125 mask = str.substr(startLen, subLen);
-
126 }
-
127 else {
-
128 continue;
-
129 }
-
130 startLen = startLen + subLen + 1;
-
131 subLen = str.length() - (startLen);
-
132 gw = str.substr(startLen, subLen);
-
133
-
134 routingStruct[count].ip.s_addr = ntohl(inet_network(ip.c_str()));
-
135 routingStruct[count].mask.s_addr = ntohl(inet_network(mask.c_str()));
-
136 routingStruct[count].gw.s_addr = ntohl(inet_network(gw.c_str()));
-
137
-
138 count++;
-
139 if (count >= 256) {
-
140 break;
-
141 }
-
142 }
-
143 routingTableSize = count;
+
107 while (std::getline(infile, str)) {
+
108 size_t startLen = 0;
+
109 size_t subLen = str.find(space);
+
110 if (subLen != std::string::npos) {
+
111 ip = str.substr(0, subLen);
+
112 }
+
113 else {
+
114 continue;
+
115 }
+
116 startLen = subLen + 1;
+
117 subLen = str.find(space, startLen);
+
118 if (subLen != std::string::npos) {
+
119 subLen -= (startLen);
+
120 mask = str.substr(startLen, subLen);
+
121 }
+
122 else {
+
123 continue;
+
124 }
+
125 startLen = startLen + subLen + 1;
+
126 subLen = str.length() - (startLen);
+
127 gw = str.substr(startLen, subLen);
+
128
+
129 routingStruct[count].ip.s_addr = ntohl(inet_network(ip.c_str()));
+
130 routingStruct[count].mask.s_addr = ntohl(inet_network(mask.c_str()));
+
131 routingStruct[count].gw.s_addr = ntohl(inet_network(gw.c_str()));
+
132
+
133 count++;
+
134 if (count >= 256) {
+
135 break;
+
136 }
+
137 }
+
138 routingTableSize = count;
+
139
+
140 // for(int i=0; i<count; i++){
+
141 // std::cout << inet_ntoa(routingStruct[i].ip) << ";" << inet_ntoa(routingStruct[i].mask) << ";" << inet_ntoa(routingStruct[i].gw) << std::endl;
+
142 // }
+
143}
144
-
145 // for(int i=0; i<count; i++){
-
146 // std::cout << inet_ntoa(routingStruct[i].ip) << ";" << inet_ntoa(routingStruct[i].mask) << ";" << inet_ntoa(routingStruct[i].gw) << std::endl;
-
147 // }
-
148}
-
149
-
150/***************************************************************************************/
+
145/***************************************************************************************/
+
146
+
147bool RF24Gateway::meshEnabled()
+
148{
+
149 return mesh_enabled;
+
150}
151
-
152template<class mesh_t, class network_t, class radio_t>
-
- -
154{
-
155 return mesh_enabled;
-
156}
-
-
157
-
158/***************************************************************************************/
-
159
-
160template<class mesh_t, class network_t, class radio_t>
-
161int ESBGateway<mesh_t, network_t, radio_t>::configDevice(uint16_t address)
-
162{
-
163 std::string tunTapDevice = "tun_nrf24";
-
164 strcpy(tunName, tunTapDevice.c_str());
-
165
-
166 int flags;
-
167 if (config_TUN) {
-
168 flags = IFF_TUN | IFF_NO_PI | IFF_MULTI_QUEUE;
-
169 }
-
170 else {
-
171 flags = IFF_TAP | IFF_NO_PI | IFF_MULTI_QUEUE;
-
172 }
-
173 tunFd = allocateTunDevice(tunName, flags, address);
-
174#if RF24GATEWAY_DEBUG_LEVEL >= 1
-
175 if (tunFd >= 0) {
-
176 std::cout << "RF24Gw: Successfully attached to tun/tap device " << tunTapDevice << std::endl;
-
177 }
-
178 else {
-
179 std::cerr << "RF24Gw: Error allocating tun/tap interface: " << tunFd << std::endl;
-
180 exit(1);
-
181 }
-
182#endif
-
183 return tunFd;
-
184}
+
152/***************************************************************************************/
+
153
+
154int RF24Gateway::configDevice(uint16_t address)
+
155{
+
156 std::string tunTapDevice = "tun_nrf24";
+
157 strcpy(tunName, tunTapDevice.c_str());
+
158
+
159 int flags;
+
160 if (config_TUN) {
+
161 flags = IFF_TUN | IFF_NO_PI | IFF_MULTI_QUEUE;
+
162 }
+
163 else {
+
164 flags = IFF_TAP | IFF_NO_PI | IFF_MULTI_QUEUE;
+
165 }
+
166 tunFd = allocateTunDevice(tunName, flags, address);
+
167#if RF24GATEWAY_DEBUG_LEVEL >= 1
+
168 if (tunFd >= 0) {
+
169 std::cout << "RF24Gw: Successfully attached to tun/tap device " << tunTapDevice << std::endl;
+
170 }
+
171 else {
+
172 std::cerr << "RF24Gw: Error allocating tun/tap interface: " << tunFd << std::endl;
+
173 exit(1);
+
174 }
+
175#endif
+
176 return tunFd;
+
177}
+
178
+
179/***************************************************************************************/
+
180
+
181int RF24Gateway::allocateTunDevice(char* dev, int flags, uint16_t address)
+
182{
+
183 struct ifreq ifr;
+
184 int fd;
185
-
186/***************************************************************************************/
-
187
-
188template<class mesh_t, class network_t, class radio_t>
-
189int ESBGateway<mesh_t, network_t, radio_t>::allocateTunDevice(char* dev, int flags, uint16_t address)
-
190{
-
191 struct ifreq ifr;
-
192 int fd;
-
193
-
194 // open the device
-
195 if ((fd = open("/dev/net/tun", O_RDWR)) < 0) {
-
196 return fd;
+
186 // open the device
+
187 if ((fd = open("/dev/net/tun", O_RDWR)) < 0) {
+
188 return fd;
+
189 }
+
190
+
191 memset(&ifr, 0, sizeof(ifr));
+
192
+
193 ifr.ifr_flags = flags; // IFF_TUN or IFF_TAP, plus maybe IFF_NO_PI
+
194
+
195 if (*dev) {
+
196 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
197 }
198
-
199 memset(&ifr, 0, sizeof(ifr));
-
200
-
201 ifr.ifr_flags = flags; // IFF_TUN or IFF_TAP, plus maybe IFF_NO_PI
-
202
-
203 if (*dev) {
-
204 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
-
205 }
-
206
-
207 // Create device
-
208 if (ioctl(fd, TUNSETIFF, (void*)&ifr) < 0) {
-
209 // close(fd);
-
210 //#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
211 std::cerr << "RF24Gw: Error: enabling TUNSETIFF" << std::endl;
-
212 uint32_t UID = getuid();
-
213 if (UID) {
-
214 std::cout << "Not running as root, preconfigure the interface as follows" << std::endl;
-
215 std::cout << "sudo ip tuntap add dev tun_nrf24 mode tun user " << getlogin() << " multi_queue" << std::endl;
-
216 std::cout << "sudo ifconfig tun_nrf24 10.10.2.2/24" << std::endl;
-
217 }
-
218 return -1;
-
219 //#endif
-
220 }
-
221
-
222 // Make persistent
-
223 if (ioctl(fd, TUNSETPERSIST, 1) < 0) {
-
224#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
225 std::cerr << "RF24Gw: Error: enabling TUNSETPERSIST" << std::endl;
-
226#endif
-
227 return -1;
-
228 }
+
199 // Create device
+
200 if (ioctl(fd, TUNSETIFF, (void*)&ifr) < 0) {
+
201 // close(fd);
+
202 //#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
203 std::cerr << "RF24Gw: Error: enabling TUNSETIFF" << std::endl;
+
204 std::cerr << "RF24Gw: If changing from TAP/TUN, run 'sudo ip link delete tun_nrf24' to remove the interface" << std::endl;
+
205 return -1;
+
206 //#endif
+
207 }
+
208
+
209 // Make persistent
+
210 if (ioctl(fd, TUNSETPERSIST, 1) < 0) {
+
211#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
212 std::cerr << "RF24Gw: Error: enabling TUNSETPERSIST" << std::endl;
+
213#endif
+
214 return -1;
+
215 }
+
216
+
217 if (!config_TUN) {
+
218 struct sockaddr sap;
+
219 sap.sa_family = ARPHRD_ETHER;
+
220 ((char*)sap.sa_data)[4] = address;
+
221 ((char*)sap.sa_data)[5] = address >> 8;
+
222 ((char*)sap.sa_data)[0] = 0x52;
+
223 ((char*)sap.sa_data)[1] = 0x46;
+
224 ((char*)sap.sa_data)[2] = 0x32;
+
225 ((char*)sap.sa_data)[3] = 0x34;
+
226
+
227 // printf("Address 0%o first %u last %u\n",address,sap.sa_data[0],sap.sa_data[1]);
+
228 memcpy((char*)&ifr.ifr_hwaddr, (char*)&sap, sizeof(struct sockaddr));
229
-
230 if (!config_TUN) {
-
231 struct sockaddr sap;
-
232 sap.sa_family = ARPHRD_ETHER;
-
233 ((char*)sap.sa_data)[4] = address;
-
234 ((char*)sap.sa_data)[5] = address >> 8;
-
235 ((char*)sap.sa_data)[0] = 0x52;
-
236 ((char*)sap.sa_data)[1] = 0x46;
-
237 ((char*)sap.sa_data)[2] = 0x32;
-
238 ((char*)sap.sa_data)[3] = 0x34;
-
239
-
240 // printf("Address 0%o first %u last %u\n",address,sap.sa_data[0],sap.sa_data[1]);
-
241 memcpy((char*)&ifr.ifr_hwaddr, (char*)&sap, sizeof(struct sockaddr));
+
230 if (ioctl(fd, SIOCSIFHWADDR, &ifr) < 0) {
+
231#if RF24GATEWAY_DEBUG_LEVEL >= 1
+
232 fprintf(stderr, "RF24Gw: Failed to set MAC address\n");
+
233#endif
+
234 }
+
235 }
+
236
+
237 strcpy(dev, ifr.ifr_name);
+
238 return fd;
+
239}
+
240
+
241/***************************************************************************************/
242
-
243 if (ioctl(fd, SIOCSIFHWADDR, &ifr) < 0) {
-
244#if RF24GATEWAY_DEBUG_LEVEL >= 1
-
245 fprintf(stderr, "RF24Gw: Failed to set MAC address\n");
-
246#endif
-
247 }
-
248 }
-
249
-
250 strcpy(dev, ifr.ifr_name);
-
251 return fd;
-
252}
-
253
-
254/***************************************************************************************/
-
255
-
256template<class mesh_t, class network_t, class radio_t>
-
- -
258{
-
259 struct ifreq ifr;
-
260 struct sockaddr_in sin;
-
261 int sockfd = socket(AF_INET, SOCK_DGRAM, 0);
-
262 if (sockfd == -1) {
-
263 fprintf(stderr, "Could not get socket.\n");
-
264 return -1;
-
265 }
-
266
-
267 sin.sin_family = AF_INET;
-
268 // inet_aton(ip_addr,&sin.sin_addr.s_addr);
-
269 inet_aton(ip_addr, &sin.sin_addr);
-
270 strncpy(ifr.ifr_name, tunName, IFNAMSIZ);
-
271
-
272 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) {
-
273 fprintf(stderr, "ifdown: shutdown ");
-
274 perror(ifr.ifr_name);
-
275 return -1;
-
276 }
-
277
-
278#ifdef ifr_flags
-
279 #define IRFFLAGS ifr_flags
-
280#else /* Present on kFreeBSD */
-
281 #define IRFFLAGS ifr_flagshigh
-
282#endif
-
283
-
284 if (!(ifr.IRFFLAGS & IFF_UP)) {
-
285 // fprintf(stdout, "Device is currently down..setting up.-- %u\n", ifr.IRFFLAGS);
-
286 ifr.IRFFLAGS |= IFF_UP;
-
287 if (ioctl(sockfd, SIOCSIFFLAGS, &ifr) < 0) {
-
288 fprintf(stderr, "ifup: failed ");
-
289 perror(ifr.ifr_name);
-
290 return -1;
-
291 }
-
292 }
-
293
-
294 memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr));
-
295
-
296 // Set interface address
-
297 if (ioctl(sockfd, SIOCSIFADDR, &ifr) < 0) {
-
298 fprintf(stderr, "Cannot set IP address. ");
-
299 perror(ifr.ifr_name);
-
300 return -1;
-
301 }
-
302
-
303 inet_aton(mask, &sin.sin_addr);
-
304 memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr));
-
305
-
306 if (ioctl(sockfd, SIOCSIFNETMASK, &ifr) < 0) {
-
307 fprintf(stderr, "Cannot define subnet mask for this device");
-
308 perror(ifr.ifr_name);
-
309 return -1;
-
310 }
-
311
-
312#undef IRFFLAGS
-
313 return 0;
-
314}
-
-
315
-
316/***************************************************************************************/
-
317
-
318template<class mesh_t, class network_t, class radio_t>
-
- -
320{
-
321 // No longer required
+
243int RF24Gateway::setIP(char* ip_addr, char* mask)
+
244{
+
245 struct ifreq ifr;
+
246 struct sockaddr_in sin;
+
247 int sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+
248 if (sockfd == -1) {
+
249 fprintf(stderr, "Could not get socket.\n");
+
250 return -1;
+
251 }
+
252
+
253 sin.sin_family = AF_INET;
+
254 // inet_aton(ip_addr,&sin.sin_addr.s_addr);
+
255 inet_aton(ip_addr, &sin.sin_addr);
+
256 strncpy(ifr.ifr_name, tunName, IFNAMSIZ);
+
257
+
258 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) {
+
259 fprintf(stderr, "ifdown: shutdown ");
+
260 perror(ifr.ifr_name);
+
261 return -1;
+
262 }
+
263
+
264#ifdef ifr_flags
+
265 #define IRFFLAGS ifr_flags
+
266#else /* Present on kFreeBSD */
+
267 #define IRFFLAGS ifr_flagshigh
+
268#endif
+
269
+
270 if (!(ifr.IRFFLAGS & IFF_UP)) {
+
271 // fprintf(stdout, "Device is currently down..setting up.-- %u\n", ifr.IRFFLAGS);
+
272 ifr.IRFFLAGS |= IFF_UP;
+
273 if (ioctl(sockfd, SIOCSIFFLAGS, &ifr) < 0) {
+
274 fprintf(stderr, "ifup: failed ");
+
275 perror(ifr.ifr_name);
+
276 return -1;
+
277 }
+
278 }
+
279
+
280 memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr));
+
281
+
282 // Set interface address
+
283 if (ioctl(sockfd, SIOCSIFADDR, &ifr) < 0) {
+
284 fprintf(stderr, "Cannot set IP address. ");
+
285 perror(ifr.ifr_name);
+
286 return -1;
+
287 }
+
288
+
289 inet_aton(mask, &sin.sin_addr);
+
290 memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr));
+
291
+
292 if (ioctl(sockfd, SIOCSIFNETMASK, &ifr) < 0) {
+
293 fprintf(stderr, "Cannot define subnet mask for this device");
+
294 perror(ifr.ifr_name);
+
295 return -1;
+
296 }
+
297
+
298#undef IRFFLAGS
+
299 return 0;
+
300}
+
301
+
302/***************************************************************************************/
+
303void RF24Gateway::interrupts(bool enable)
+
304{
+
305 // No longer required
+
306}
+
307
+
308/***************************************************************************************/
+
309
+
310void RF24Gateway::update(bool interrupts)
+
311{
+
312
+
313 if (interrupts) {
+
314 gotInterrupt = true;
+
315 }
+
316 else {
+
317 handleRadioIn();
+
318 handleTX();
+
319 handleRX();
+
320 handleRadioOut();
+
321 }
322}
-
323
324/***************************************************************************************/
325
-
326template<class mesh_t, class network_t, class radio_t>
-
- -
328{
-
329
-
330 if (interrupts) {
-
331 gotInterrupt = true;
-
332 }
-
333 else {
-
334 handleRadioIn();
-
335 handleTX();
-
336 handleRX();
+
326void RF24Gateway::poll(uint32_t waitDelay)
+
327{
+
328
+
329 if (gotInterrupt) {
+
330 gotInterrupt = false;
+
331 handleRadioIn();
+
332 handleTX();
+
333 }
+
334 else if (radio.rxFifoFull()) {
+
335 fifoCleared = true;
+
336 handleRadioIn();
337 handleRadioOut();
338 }
-
339}
-
-
340
-
341/***************************************************************************************/
-
342
-
343template<class mesh_t, class network_t, class radio_t>
-
- -
345{
+
339 else {
+
340 delay(waitDelay);
+
341 }
+
342 handleRX();
+
343 handleRadioOut();
+
344}
+
345/***************************************************************************************/
346
-
347 if (gotInterrupt) {
-
348 gotInterrupt = false;
-
349 handleRadioIn();
-
350 handleTX();
-
351 }
-
352 else if (radio.rxFifoFull()) {
-
353 fifoCleared = true;
-
354 handleRadioIn();
-
355 handleRadioOut();
-
356 }
-
357 else {
-
358 delay(waitDelay);
+
347void RF24Gateway::handleRadioIn()
+
348{
+
349 if (mesh_enabled) {
+
350 while (mesh.update()) {
+
351 if (!thisNodeAddress) {
+
352 mesh.DHCP();
+
353 }
+
354 }
+
355 }
+
356 else {
+
357 while (network.update()) {
+
358 }
359 }
-
360 handleRX();
-
361 handleRadioOut();
-
362}
-
-
363
-
364/***************************************************************************************/
-
365
-
366template<class mesh_t, class network_t, class radio_t>
-
367void ESBGateway<mesh_t, network_t, radio_t>::handleRadioIn()
-
368{
-
369 if (mesh_enabled) {
-
370 while (mesh.update()) {
-
371 if (!thisNodeAddress) {
-
372 mesh.DHCP();
-
373 }
-
374 }
-
375 }
-
376 else {
-
377 while (network.update()) {
-
378 }
-
379 }
-
380
-
381 RF24NetworkFrame f;
-
382 while (network.external_queue.size() > 0) {
-
383 f = network.external_queue.front();
+
360
+
361 RF24NetworkFrame f;
+
362 while (network.external_queue.size() > 0) {
+
363 f = network.external_queue.front();
+
364
+
365 msgStruct msg;
+
366
+
367 unsigned int bytesRead = f.message_size;
+
368
+
369 if (bytesRead > 0) {
+
370 memcpy(&msg.message, &f.message_buffer, bytesRead);
+
371 msg.size = bytesRead;
+
372
+
373#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
374 std::cout << "Radio: Received " << bytesRead << " bytes ... " << std::endl;
+
375#endif
+
376#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
+
377 // printPayload(msg.getPayloadStr(),"radio RX");
+
378 std::cout << "TunRead: " << std::endl;
+
379 for (size_t i = 0; i < msg.size; i++) {
+
380 // std::cout << std::hex << buffer[i];
+
381 printf(":%0x :", msg.message[i]);
+
382 }
+
383 std::cout << std::endl;
384
-
385 msgStruct msg;
+
385#endif
386
-
387 unsigned int bytesRead = f.message_size;
-
388
-
389 if (bytesRead > 0) {
-
390 memcpy(&msg.message, &f.message_buffer, bytesRead);
-
391 msg.size = bytesRead;
-
392
-
393#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
394 std::cout << "Radio: Received " << bytesRead << " bytes ... " << std::endl;
-
395#endif
-
396#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
-
397 // printPayload(msg.getPayloadStr(),"radio RX");
-
398 std::cout << "TunRead: " << std::endl;
-
399 for (size_t i = 0; i < msg.size; i++) {
-
400 // std::cout << std::hex << buffer[i];
-
401 printf(":%0x :", msg.message[i]);
-
402 }
-
403 std::cout << std::endl;
+
387 rxQueue.push(msg);
+
388 }
+
389 else {
+
390 // std::cerr << "Radio: Error reading data from radio. Read '" << bytesRead << "' Bytes." << std::endl;
+
391 }
+
392 network.external_queue.pop();
+
393 }
+
394}
+
395
+
396/***************************************************************************************/
+
397
+
398struct in_addr RF24Gateway::getLocalIP()
+
399{
+
400 struct ifaddrs *ifap, *ifa;
+
401 int family, s, n;
+
402 char host[NI_MAXHOST];
+
403 struct in_addr myNet;
404
-
405#endif
-
406
-
407 rxQueue.push(msg);
-
408 }
-
409 else {
-
410 // std::cerr << "Radio: Error reading data from radio. Read '" << bytesRead << "' Bytes." << std::endl;
-
411 }
-
412 network.external_queue.pop();
-
413 }
-
414}
+
405 getifaddrs(&ifap);
+
406 for (ifa = ifap, n = 0; ifa != NULL; ifa = ifa->ifa_next, n++) {
+
407 if (std::string("tun_nrf24").compare(ifa->ifa_name) != 0 || ifa->ifa_addr == NULL) {
+
408 if (ifa->ifa_next == NULL) {
+
409 break;
+
410 }
+
411 else {
+
412 continue;
+
413 }
+
414 }
415
-
416/***************************************************************************************/
+
416 family = ifa->ifa_addr->sa_family;
417
-
418template<class mesh_t, class network_t, class radio_t>
-
419struct in_addr ESBGateway<mesh_t, network_t, radio_t>::getLocalIP()
-
420{
-
421 struct ifaddrs *ifap, *ifa;
-
422 int family, s, n;
-
423 char host[NI_MAXHOST];
-
424 struct in_addr myNet;
-
425 memset(&myNet, 0, sizeof(myNet));
-
426
-
427 getifaddrs(&ifap);
-
428 for (ifa = ifap, n = 0; ifa != NULL; ifa = ifa->ifa_next, n++) {
-
429 if (std::string("tun_nrf24").compare(ifa->ifa_name) != 0 || ifa->ifa_addr == NULL) {
-
430 if (ifa->ifa_next == NULL) {
-
431 break;
-
432 }
-
433 else {
-
434 continue;
-
435 }
-
436 }
+
418 // This is an IPv4 interface, get the IP
+
419 if (family == AF_INET) {
+
420 s = getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+
421 if (s == 0) {
+
422 myNet.s_addr = ntohl(inet_network(host));
+
423 freeifaddrs(ifap);
+
424 return myNet;
+
425 }
+
426 }
+
427 }
+
428 freeifaddrs(ifap);
+
429 return myNet;
+
430}
+
431
+
432/***************************************************************************************/
+
433
+
434void RF24Gateway::handleRadioOut()
+
435{
+
436 bool ok = 0;
437
-
438 family = ifa->ifa_addr->sa_family;
+
438 while (!txQueue.empty() && network.external_queue.size() == 0) {
439
-
440 // This is an IPv4 interface, get the IP
-
441 if (family == AF_INET) {
-
442 s = getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
-
443 if (s == 0) {
-
444 myNet.s_addr = ntohl(inet_network(host));
-
445 freeifaddrs(ifap);
-
446 return myNet;
-
447 }
-
448 }
-
449 }
-
450 freeifaddrs(ifap);
-
451 return myNet;
-
452}
+
440 msgStruct* msgTx = &txQueue.front();
+
441
+
442#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
443 std::cout << "Radio: Sending " << msgTx->size << " bytes ... ";
+
444 std::cout << std::endl;
+
445#endif
+
446#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
+
447
+
448 // PrintDebug == 1 does not have an endline.
+
449 // printPayload(msg.getPayloadStr(),"radio TX");
+
450#endif
+
451
+
452 std::uint8_t* tmp = msgTx->message;
453
-
454/***************************************************************************************/
+
454 if (!config_TUN) { // TAP can use RF24Mesh for address assignment, but will still use ARP for address resolution
455
-
456template<class mesh_t, class network_t, class radio_t>
-
457void ESBGateway<mesh_t, network_t, radio_t>::handleRadioOut()
-
458{
-
459 bool ok = 0;
-
460
-
461 while (!txQueue.empty() && network.external_queue.size() == 0) {
-
462
-
463 msgStruct* msgTx = &txQueue.front();
-
464
-
465#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
466 std::cout << "Radio: Sending " << msgTx->size << " bytes ... ";
-
467 std::cout << std::endl;
-
468#endif
-
469#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
-
470
-
471 // PrintDebug == 1 does not have an endline.
-
472 // printPayload(msg.getPayloadStr(),"radio TX");
-
473#endif
-
474
-
475 std::uint8_t* tmp = msgTx->message;
-
476
-
477 if (!config_TUN) { // TAP can use RF24Mesh for address assignment, but will still use ARP for address resolution
-
478
-
479 uint32_t RF24_STR = 0x34324652; // Identifies the mac as an RF24 mac
-
480 uint32_t ARP_BC = 0xFFFFFFFF; // Broadcast address
-
481 struct macStruct
-
482 {
-
483 uint32_t rf24_Verification;
-
484 uint16_t rf24_Addr;
-
485 };
-
486
-
487 macStruct macData;
-
488 memcpy(&macData.rf24_Addr, tmp + 4, 2);
-
489 memcpy(&macData.rf24_Verification, tmp, 4);
-
490
-
491 if (macData.rf24_Verification == RF24_STR) {
-
492 const uint16_t other_node = macData.rf24_Addr;
-
493 RF24NetworkHeader header(/*to node*/ other_node, EXTERNAL_DATA_TYPE);
-
494 ok = network.write(header, &msgTx->message, msgTx->size);
+
456 uint32_t RF24_STR = 0x34324652; // Identifies the mac as an RF24 mac
+
457 uint32_t ARP_BC = 0xFFFFFFFF; // Broadcast address
+
458 struct macStruct
+
459 {
+
460 uint32_t rf24_Verification;
+
461 uint16_t rf24_Addr;
+
462 };
+
463
+
464 macStruct macData;
+
465 memcpy(&macData.rf24_Addr, tmp + 4, 2);
+
466 memcpy(&macData.rf24_Verification, tmp, 4);
+
467
+
468 if (macData.rf24_Verification == RF24_STR) {
+
469 const uint16_t other_node = macData.rf24_Addr;
+
470 RF24NetworkHeader header(/*to node*/ other_node, EXTERNAL_DATA_TYPE);
+
471 ok = network.write(header, &msgTx->message, msgTx->size);
+
472 }
+
473 else if (macData.rf24_Verification == ARP_BC) {
+
474 RF24NetworkHeader header(/*to node*/ 00, EXTERNAL_DATA_TYPE); // Set to master node, will be modified by RF24Network if multi-casting
+
475 if (msgTx->size <= 42) {
+
476 if (thisNodeAddress == 00) { // Master Node
+
477
+
478 uint32_t arp_timeout = millis();
+
479
+
480 ok = network.multicast(header, &msgTx->message, msgTx->size, 1); // Send to Level 1
+
481 while (millis() - arp_timeout < 5) {
+
482 network.update();
+
483 }
+
484 network.multicast(header, &msgTx->message, msgTx->size, 1); // Send to Level 1
+
485 arp_timeout = millis();
+
486 while (millis() - arp_timeout < 15) {
+
487 network.update();
+
488 }
+
489 network.multicast(header, &msgTx->message, msgTx->size, 1); // Send to Level 1
+
490 }
+
491 else {
+
492 ok = network.write(header, &msgTx->message, msgTx->size);
+
493 }
+
494 }
495 }
-
496 else if (macData.rf24_Verification == ARP_BC) {
-
497 RF24NetworkHeader header(/*to node*/ 00, EXTERNAL_DATA_TYPE); // Set to master node, will be modified by RF24Network if multi-casting
-
498 if (msgTx->size <= 42) {
-
499 if (thisNodeAddress == 00) { // Master Node
-
500
-
501 uint32_t arp_timeout = millis();
-
502
-
503 ok = network.multicast(header, &msgTx->message, msgTx->size, 1); // Send to Level 1
-
504 while (millis() - arp_timeout < 5) {
-
505 network.update();
-
506 }
-
507 network.multicast(header, &msgTx->message, msgTx->size, 1); // Send to Level 1
-
508 arp_timeout = millis();
-
509 while (millis() - arp_timeout < 15) {
-
510 network.update();
-
511 }
-
512 network.multicast(header, &msgTx->message, msgTx->size, 1); // Send to Level 1
-
513 }
-
514 else {
-
515 ok = network.write(header, &msgTx->message, msgTx->size);
+
496 }
+
497 else { // TUN always needs to use RF24Mesh for address assignment AND resolution
+
498
+
499 uint8_t lastOctet = tmp[19];
+
500 int16_t meshAddr;
+
501
+
502 RF24NetworkHeader header(00, EXTERNAL_DATA_TYPE);
+
503 bool sendData = false;
+
504
+
505 struct in_addr ipDestination;
+
506 memcpy(&ipDestination.s_addr, &tmp[16], 4);
+
507
+
508 if ((getLocalIP().s_addr & 0x00FFFFFF) == (ipDestination.s_addr & 0x00FFFFFF)) { // Is inside the RF24Mesh network
+
509 if ((meshAddr = mesh.getAddress(lastOctet)) > 0) {
+
510 header.to_node = meshAddr;
+
511 sendData = true;
+
512 }
+
513 else {
+
514 if (thisNodeID > 0) { // If IP is in mesh range, address lookup fails, and this is not master,
+
515 sendData = true; // send to 00 anyway in case destination is master, or the lookup just failed
516 }
-
517 }
-
518 }
-
519 }
-
520 else { // TUN always needs to use RF24Mesh for address assignment AND resolution
-
521
-
522 uint8_t lastOctet = tmp[19];
-
523 int16_t meshAddr;
-
524
-
525 RF24NetworkHeader header(00, EXTERNAL_DATA_TYPE);
-
526 bool sendData = false;
-
527
-
528 struct in_addr ipDestination;
-
529 memcpy(&ipDestination.s_addr, &tmp[16], 4);
-
530
-
531 if ((getLocalIP().s_addr & 0x00FFFFFF) == (ipDestination.s_addr & 0x00FFFFFF)) { // Is inside the RF24Mesh network
-
532 if ((meshAddr = mesh.getAddress(lastOctet)) > 0) {
-
533 header.to_node = meshAddr;
-
534 sendData = true;
-
535 }
-
536 else {
-
537 if (thisNodeID > 0) { // If IP is in mesh range, address lookup fails, and this is not master,
-
538 sendData = true; // send to 00 anyway in case destination is master, or the lookup just failed
-
539 }
-
540 // printf("Could not find matching mesh nodeID for IP ending in %d\n",lastOctet);
-
541 }
-
542 }
-
543 else if (thisNodeID > 0) { // If not master, send to master for routing etc. if target not within mesh
-
544 sendData = true;
+
517 // printf("Could not find matching mesh nodeID for IP ending in %d\n",lastOctet);
+
518 }
+
519 }
+
520 else if (thisNodeID > 0) { // If not master, send to master for routing etc. if target not within mesh
+
521 sendData = true;
+
522 }
+
523 else if (routingTableSize > 0) {
+
524 for (int i = 0; i < routingTableSize; i++) {
+
525 struct in_addr network;
+
526 network.s_addr = routingStruct[i].ip.s_addr & routingStruct[i].mask.s_addr;
+
527 struct in_addr destNet;
+
528 destNet.s_addr = ipDestination.s_addr & routingStruct[i].mask.s_addr;
+
529 // printf("network %s destNet: %s\n",inet_ntoa(network),inet_ntoa(destNet));
+
530 if (destNet.s_addr == network.s_addr) {
+
531 uint8_t toNode = routingStruct[i].gw.s_addr >> 24;
+
532 int16_t netAddr = 0;
+
533 if ((netAddr = mesh.getAddress(toNode)) > 0) {
+
534 header.to_node = netAddr;
+
535 sendData = true;
+
536 break;
+
537 }
+
538 }
+
539 }
+
540 }
+
541
+
542 if (sendData) {
+
543 ok = network.write(header, msgTx->message, msgTx->size);
+
544 // std::cout << "SendData " << header.to_node << std::endl;
545 }
-
546 else if (routingTableSize > 0) {
-
547 for (int i = 0; i < routingTableSize; i++) {
-
548 struct in_addr network;
-
549 network.s_addr = routingStruct[i].ip.s_addr & routingStruct[i].mask.s_addr;
-
550 struct in_addr destNet;
-
551 destNet.s_addr = ipDestination.s_addr & routingStruct[i].mask.s_addr;
-
552 // printf("network %s destNet: %s\n",inet_ntoa(network),inet_ntoa(destNet));
-
553 if (destNet.s_addr == network.s_addr) {
-
554 uint8_t toNode = routingStruct[i].gw.s_addr >> 24;
-
555 int16_t netAddr = 0;
-
556 if ((netAddr = mesh.getAddress(toNode)) > 0) {
-
557 header.to_node = netAddr;
-
558 sendData = true;
-
559 break;
-
560 }
-
561 }
-
562 }
-
563 }
-
564
-
565 if (sendData) {
-
566 ok = network.write(header, msgTx->message, msgTx->size);
-
567 // std::cout << "SendData " << header.to_node << std::endl;
-
568 }
-
569 }
-
570 // delay( rf24_min(msgTx->size/48,20));
-
571 txQueue.pop();
-
572
-
573 // printf("Addr: 0%#x\n",macData.rf24_Addr);
-
574 // printf("Verif: 0%#x\n",macData.rf24_Verification);
-
575 if (ok) {
-
576 // std::cout << "ok." << std::endl;
-
577 }
-
578 else {
-
579 // std::cerr << "failed." << std::endl;
-
580 }
-
581
-
582 } // End Tx
-
583}
-
584
-
585/***************************************************************************************/
-
586
-
587template<class mesh_t, class network_t, class radio_t>
-
588void ESBGateway<mesh_t, network_t, radio_t>::handleRX(uint32_t waitDelay)
-
589{
-
590 fd_set socketSet;
-
591 struct timeval selectTimeout;
-
592 uint8_t buffer[MAX_PAYLOAD_SIZE];
-
593 int nread;
-
594
-
595 FD_ZERO(&socketSet);
-
596 FD_SET(tunFd, &socketSet);
-
597
-
598 selectTimeout.tv_sec = 0;
-
599 selectTimeout.tv_usec = waitDelay * 1000;
-
600
-
601 if (select(tunFd + 1, &socketSet, NULL, NULL, &selectTimeout) != 0) {
-
602 if (FD_ISSET(tunFd, &socketSet)) {
-
603 if ((nread = read(tunFd, buffer, MAX_PAYLOAD_SIZE)) >= 0) {
-
604
-
605#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
606 std::cout << "Tun: Successfully read " << nread << " bytes from tun device" << std::endl;
-
607#endif
-
608#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
-
609 std::cout << "TunRead: " << std::endl;
-
610 for (int i = 0; i < nread; i++)
-
611 {
-
612 printf(":%0x :", buffer[i]);
-
613 }
-
614 std::cout << std::endl;
-
615#endif
-
616 msgStruct msg;
-
617 memcpy(&msg.message, &buffer, nread);
-
618 msg.size = nread;
-
619 if (txQueue.size() < 10) {
-
620 txQueue.push(msg);
-
621 }
-
622 else {
-
623 droppedIncoming++;
-
624 }
-
625 }
-
626 else {
-
627#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
628 std::cerr << "Tun: Error while reading from tun/tap interface." << std::endl;
-
629#endif
-
630 }
-
631 }
-
632 }
-
633}
-
634
-
635/***************************************************************************************/
-
636
-
637template<class mesh_t, class network_t, class radio_t>
-
638void ESBGateway<mesh_t, network_t, radio_t>::handleTX()
-
639{
-
640
-
641 if (rxQueue.size() < 1)
-
642 {
-
643 return;
-
644 }
-
645 msgStruct* msg = &rxQueue.front();
+
546 }
+
547 // delay( rf24_min(msgTx->size/48,20));
+
548 txQueue.pop();
+
549
+
550 // printf("Addr: 0%#x\n",macData.rf24_Addr);
+
551 // printf("Verif: 0%#x\n",macData.rf24_Verification);
+
552 if (ok) {
+
553 // std::cout << "ok." << std::endl;
+
554 }
+
555 else {
+
556 // std::cerr << "failed." << std::endl;
+
557 }
+
558
+
559 } // End Tx
+
560}
+
561
+
562/***************************************************************************************/
+
563
+
564void RF24Gateway::handleRX(uint32_t waitDelay)
+
565{
+
566 fd_set socketSet;
+
567 struct timeval selectTimeout;
+
568 uint8_t buffer[MAX_PAYLOAD_SIZE];
+
569 int nread;
+
570
+
571 FD_ZERO(&socketSet);
+
572 FD_SET(tunFd, &socketSet);
+
573
+
574 selectTimeout.tv_sec = 0;
+
575 selectTimeout.tv_usec = waitDelay * 1000;
+
576
+
577 if (select(tunFd + 1, &socketSet, NULL, NULL, &selectTimeout) != 0) {
+
578 if (FD_ISSET(tunFd, &socketSet)) {
+
579 if ((nread = read(tunFd, buffer, MAX_PAYLOAD_SIZE)) >= 0) {
+
580
+
581#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
582 std::cout << "Tun: Successfully read " << nread << " bytes from tun device" << std::endl;
+
583#endif
+
584#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
+
585 std::cout << "TunRead: " << std::endl;
+
586 for (int i = 0; i < nread; i++)
+
587 {
+
588 printf(":%0x :", buffer[i]);
+
589 }
+
590 std::cout << std::endl;
+
591#endif
+
592 msgStruct msg;
+
593 memcpy(&msg.message, &buffer, nread);
+
594 msg.size = nread;
+
595 if (txQueue.size() < 10) {
+
596 txQueue.push(msg);
+
597 }
+
598 else {
+
599 droppedIncoming++;
+
600 }
+
601 }
+
602 else {
+
603#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
604 std::cerr << "Tun: Error while reading from tun/tap interface." << std::endl;
+
605#endif
+
606 }
+
607 }
+
608 }
+
609}
+
610
+
611/***************************************************************************************/
+
612
+
613void RF24Gateway::handleTX()
+
614{
+
615
+
616 if (rxQueue.size() < 1)
+
617 {
+
618 return;
+
619 }
+
620 msgStruct* msg = &rxQueue.front();
+
621
+
622 if (msg->size > MAX_PAYLOAD_SIZE)
+
623 {
+
624 // printf("*****WTF OVER *****");
+
625 rxQueue.pop();
+
626 return;
+
627 }
+
628
+
629 if (msg->size > 0)
+
630 {
+
631
+
632 size_t writtenBytes = write(tunFd, &msg->message, msg->size);
+
633 if (writtenBytes != msg->size)
+
634 {
+
635// std::cerr << "Tun: Less bytes written to tun/tap device then requested." << std::endl;
+
636#if RF24GATEWAY_DEBUG_LEVEL >= 1
+
637 printf("Tun: Less bytes written %d to tun/tap device then requested %d.", writtenBytes, msg->size);
+
638#endif
+
639 }
+
640 else
+
641 {
+
642#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
+
643 std::cout << "Tun: Successfully wrote " << writtenBytes << " bytes to tun device" << std::endl;
+
644#endif
+
645 }
646
-
647 if (msg->size > MAX_PAYLOAD_SIZE)
-
648 {
-
649 // printf("*****WTF OVER *****");
-
650 rxQueue.pop();
-
651 return;
-
652 }
-
653
-
654 if (msg->size > 0)
-
655 {
+
647#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
+
648 // printPayload(msg.message,"tun write");
+
649 std::cout << "TunRead: " << std::endl;
+
650 for (size_t i = 0; i < msg->size; i++) {
+
651 // printf(":%0x :",msg->message[i]);
+
652 }
+
653 std::cout << std::endl;
+
654#endif
+
655 }
656
-
657 size_t writtenBytes = write(tunFd, &msg->message, msg->size);
-
658 if (writtenBytes != msg->size)
-
659 {
-
660// std::cerr << "Tun: Less bytes written to tun/tap device then requested." << std::endl;
-
661#if RF24GATEWAY_DEBUG_LEVEL >= 1
-
662 printf("Tun: Less bytes written %d to tun/tap device then requested %d.", writtenBytes, msg->size);
-
663#endif
-
664 }
-
665 else
-
666 {
-
667#if (RF24GATEWAY_DEBUG_LEVEL >= 1)
-
668 std::cout << "Tun: Successfully wrote " << writtenBytes << " bytes to tun device" << std::endl;
-
669#endif
-
670 }
+
657 rxQueue.pop();
+
658}
+
659
+
660/***************************************************************************************/
+
661
+
662void printPayload(std::string buffer, std::string debugMsg = "")
+
663{
+
664}
+
665
+
666/***************************************************************************************/
+
667
+
668void printPayload(char* buffer, int nread, std::string debugMsg = "")
+
669{
+
670}
671
-
672#if (RF24GATEWAY_DEBUG_LEVEL >= 3)
-
673 // printPayload(msg.message,"tun write");
-
674 std::cout << "TunRead: " << std::endl;
-
675 for (size_t i = 0; i < msg->size; i++) {
-
676 // printf(":%0x :",msg->message[i]);
-
677 }
-
678 std::cout << std::endl;
-
679#endif
-
680 }
-
681
-
682 rxQueue.pop();
-
683}
-
684
-
685/***************************************************************************************
-
686
-
687template<class mesh_t, class network_t, class radio_t>
-
688void ESBGateway<mesh_t, network_t, radio_t>::printPayload(std::string buffer, std::string debugMsg)
-
689{
-
690}
-
691*/
-
692/***************************************************************************************
-
693
-
694template<class mesh_t, class network_t, class radio_t>
-
695void ESBGateway<mesh_t, network_t, radio_t>::printPayload(char* buffer, int nread, std::string debugMsg)
-
696{
-
697}
-
698*/
-
699/***************************************************************************************/
+
672/***************************************************************************************/
+
673
+
674void RF24Gateway::setupSocket()
+
675{
+
676 int ret;
+
677 const char* myAddr = "127.0.0.1";
+
678
+
679 addr.sin_family = AF_INET;
+
680 ret = inet_aton(myAddr, &addr.sin_addr);
+
681 if (ret == 0) {
+
682 perror("inet_aton");
+
683 exit(1);
+
684 }
+
685 addr.sin_port = htons(32001);
+
686 // buf = "Hello UDP";
+
687 s = socket(PF_INET, SOCK_DGRAM, 0);
+
688 if (s == -1) {
+
689 perror("socket");
+
690 exit(1);
+
691 }
+
692}
+
693
+
694/***************************************************************************************/
+
695
+
696void RF24Gateway::sendUDP(uint8_t nodeID, RF24NetworkFrame frame)
+
697{
+
698
+
699 uint8_t buffer[MAX_PAYLOAD_SIZE + 11];
700
-
701template<class mesh_t, class network_t, class radio_t>
-
702void ESBGateway<mesh_t, network_t, radio_t>::setupSocket()
-
703{
-
704 int ret;
-
705 const char* myAddr = "127.0.0.1";
-
706
-
707 addr.sin_family = AF_INET;
-
708 ret = inet_aton(myAddr, &addr.sin_addr);
-
709 if (ret == 0) {
-
710 perror("inet_aton");
-
711 exit(1);
-
712 }
-
713 addr.sin_port = htons(32001);
-
714 // buf = "Hello UDP";
-
715 s = socket(PF_INET, SOCK_DGRAM, 0);
-
716 if (s == -1) {
-
717 perror("socket");
-
718 exit(1);
-
719 }
-
720}
-
721
-
722/***************************************************************************************/
-
723
-
724template<class mesh_t, class network_t, class radio_t>
-
-
725void ESBGateway<mesh_t, network_t, radio_t>::sendUDP(uint8_t nodeID, RF24NetworkFrame frame)
-
726{
-
727
-
728 uint8_t buffer[MAX_PAYLOAD_SIZE + 11];
-
729
-
730 memcpy(&buffer[0], &nodeID, 1);
-
731 memcpy(&buffer[1], &frame.header, 8);
-
732 memcpy(&buffer[9], &frame.message_size, 2);
-
733 memcpy(&buffer[11], &frame.message_buffer, frame.message_size);
-
734
-
735 int ret = sendto(s, &buffer, frame.message_size + 11, 0, (struct sockaddr*)&addr, sizeof(addr));
-
736 if (ret == -1)
-
737 {
-
738 perror("sendto");
-
739 exit(1);
-
740 }
-
741}
-
-
742
-
743// ensure the compiler is aware of the possible datatype for the template class
-
744template class ESBGateway<ESBMesh<ESBNetwork<RF24>, RF24>, ESBNetwork<RF24>, RF24>;
-
Definition RF24Gateway.h:66
-
bool meshEnabled()
-
int setIP(char *ip_addr, char *mask)
-
void interrupts(bool enable=1)
-
void poll(uint32_t waitDelay=3)
-
ESBGateway(radio_t &_radio, network_t &_network, mesh_t &_mesh)
-
void begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)
-
void update(bool interrupts=0)
-
void sendUDP(uint8_t nodeID, RF24NetworkFrame frame)
-
Definition RF24Gateway.h:45
+
701 memcpy(&buffer[0], &nodeID, 1);
+
702 memcpy(&buffer[1], &frame.header, 8);
+
703 memcpy(&buffer[9], &frame.message_size, 2);
+
704 memcpy(&buffer[11], &frame.message_buffer, frame.message_size);
+
705
+
706 int ret = sendto(s, &buffer, frame.message_size + 11, 0, (struct sockaddr*)&addr, sizeof(addr));
+
707 if (ret == -1)
+
708 {
+
709 perror("sendto");
+
710 exit(1);
+
711 }
+
712}
+
Definition: RF24Gateway.h:47
+
uint16_t thisNodeAddress
Definition: RF24Gateway.h:134
+
int setIP(char *ip_addr, char *mask)
+
void interrupts(bool enable=1)
+
uint8_t thisNodeID
Definition: RF24Gateway.h:135
+
bool meshEnabled()
+
uint8_t routingTableSize
Definition: RF24Gateway.h:199
+
void begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)
Definition: RF24Gateway.cpp:19
+
void sendUDP(uint8_t nodeID, RF24NetworkFrame frame)
+
void update(bool interrupts=0)
+
RF24Gateway(RF24 &_radio, RF24Network &_network, RF24Mesh &_mesh)
Definition: RF24Gateway.cpp:12
+
routeStruct routingStruct[256]
Definition: RF24Gateway.h:194
+
bool fifoCleared
Definition: RF24Gateway.h:139
+
bool config_TUN
Definition: RF24Gateway.h:138
+
void poll(uint32_t waitDelay=3)
+
struct in_addr mask
Definition: RF24Gateway.h:187
+
struct in_addr gw
Definition: RF24Gateway.h:188
+
struct in_addr ip
Definition: RF24Gateway.h:186
- diff --git a/RF24Gateway_8h_source.html b/RF24Gateway_8h_source.html index 4969ac2..a3b11a6 100644 --- a/RF24Gateway_8h_source.html +++ b/RF24Gateway_8h_source.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24Gateway.h Source File - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
40#define BACKLOG 10 /* Passed to listen() */
41
42class RF24;
-
43
-
44template<class radio_t>
-
45class ESBNetwork;
-
46
-
47template<class network_t, class radio_t>
-
48class ESBMesh;
-
49
-
50/**
-
51 * @tparam mesh_t The `mesh` object's type. Defaults to `RF24Mesh` for legacy behavior.
-
52 * This new abstraction is really meant for using the nRF52840 SoC as a drop-in replacement
-
53 * for the nRF24L01 radio. For more detail, see the
-
54 * [nrf_to_nrf Arduino library](https://github.com/TMRh20/nrf_to_nrf).
-
55 * @tparam network_t The `network` object's type. Defaults to `RF24Network` for legacy behavior.
-
56 * This new abstraction is really meant for using the nRF52840 SoC as a drop-in replacement
-
57 * for the nRF24L01 radio. For more detail, see the
-
58 * [nrf_to_nrf Arduino library](https://github.com/TMRh20/nrf_to_nrf).
-
59 * @tparam radio_t The `radio` object's type. Defaults to `RF24` for legacy behavior.
-
60 * This new abstraction is really meant for using the nRF52840 SoC as a drop-in replacement
-
61 * for the nRF24L01 radio. For more detail, see the
-
62 * [nrf_to_nrf Arduino library](https://github.com/TMRh20/nrf_to_nrf).
-
63 */
-
64template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
-
- -
66{
-
67
-
68 /**
-
69 * @name RF24Gateway (RPi/Linux)
-
70 *
-
71 * RF24Gateway library for devices with an IP stack
-
72 */
-
73 /**@{*/
-
74
-
75public:
-
76 /**
-
77 * ESBGateway constructor.
-
78 * @code
-
79 * RF24 radio(7,8);
-
80 * RF24Network network(radio);
-
81 * RF24Mesh mesh(radio,network);
-
82 * RF24Gateway gateway(radio,network,mesh);
-
83 * @endcode
-
84 */
-
85 ESBGateway(radio_t& _radio, network_t& _network, mesh_t& _mesh);
-
86
-
87 /**
-
88 * Begin function for use with RF24Mesh (TUN interface)
-
89 *
-
90 * @param nodeID The RF24Mesh nodeID to use
-
91 * @param channel The radio channel to use (1-127)
-
92 * @param data_rate The RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
-
93 *
-
94 * @code gw.begin(); //Start the gateway using RF24Mesh, with nodeID 0 (Master) @endcode
-
95 * @code uint8_t nodeID; gw.begin(nodeID); //Start the gateway using RF24Mesh, with nodeID 1 (Child node) @endcode
+
43class RF24Network;
+
44class RF24Mesh;
+
45
+ +
47{
+
48
+
49 /**
+
50 * @name RF24Gateway (RPi/Linux)
+
51 *
+
52 * RF24Gateway library for devices with an IP stack
+
53 */
+
54 /**@{*/
+
55
+
56public:
+
57 /**
+
58 * RF24Gateway constructor.
+
59 */
+
60 RF24Gateway(RF24& _radio, RF24Network& _network, RF24Mesh& _mesh);
+
61
+
62 /**
+
63 * Begin function for use with RF24Mesh (TUN interface)
+
64 *
+
65 * @param nodeID The RF24Mesh nodeID to use
+
66 * @param channel The radio channel to use (1-127)
+
67 * @param data_rate The RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
+
68 *
+
69 * @code gw.begin(); //Start the gateway using RF24Mesh, with nodeID 0 (Master) @endcode
+
70 * @code uint8_t nodeID; gw.begin(nodeID); //Start the gateway using RF24Mesh, with nodeID 1 (Child node) @endcode
+
71 */
+
72 void begin(uint8_t nodeID = 0, uint8_t channel = 97, rf24_datarate_e data_rate = RF24_1MBPS);
+
73
+
74 /**
+
75 * Begin function for use with a TAP (Ethernet) interface. RF24Mesh can be used for address assignment, but
+
76 * ARP will be used to perform the lookups.
+
77 *
+
78 * @param address The RF24Network address to use
+
79 * @param channel The radio channel (0-127) to use
+
80 * @param data_rate The RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
+
81 * @param meshEnable Whether to use RF24Mesh for address assignment
+
82 * @param nodeID The RF24Mesh nodeID to use **if** meshEnable has been set to true
+
83 *
+
84 * @code uint16_t address=00; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 00 (Master) @endcode
+
85 * @code uint16_t address=01; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 01 (Child) @endcode
+
86 */
+
87 void begin(uint16_t address, uint8_t channel = 97, rf24_datarate_e data_rate = RF24_1MBPS, bool meshEnable = 0, uint8_t nodeID = 0);
+
88
+
89 /**
+
90 * Once the Gateway has been started via begin() , call setIP to configure the IP and
+
91 * subnet mask.
+
92 *
+
93 * @param ip_addr A character array containing the numeric IP address ie: 192.168.1.1
+
94 * @param mask A character array containing the subnet mask ie: 255.255.255.0
+
95 * @return -1 if failed, 0 on success
96 */
-
97 void begin(uint8_t nodeID = 0, uint8_t channel = 97, rf24_datarate_e data_rate = RF24_1MBPS);
+
97 int setIP(char* ip_addr, char* mask);
98
99 /**
-
100 * Begin function for use with a TAP (Ethernet) interface. RF24Mesh can be used for address assignment, but
-
101 * ARP will be used to perform the lookups.
-
102 *
-
103 * @param address The RF24Network address to use
-
104 * @param channel The radio channel (0-127) to use
-
105 * @param data_rate The RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
-
106 * @param meshEnable Whether to use RF24Mesh for address assignment
-
107 * @param nodeID The RF24Mesh nodeID to use **if** meshEnable has been set to true
-
108 *
-
109 * @code uint16_t address=00; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 00 (Master) @endcode
-
110 * @code uint16_t address=01; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 01 (Child) @endcode
-
111 */
-
112 void begin(uint16_t address, uint8_t channel = 97, rf24_datarate_e data_rate = RF24_1MBPS, bool meshEnable = 0, uint8_t nodeID = 0);
-
113
-
114 /**
-
115 * Once the Gateway has been started via begin() , call setIP to configure the IP and
-
116 * subnet mask.
-
117 *
-
118 * @param ip_addr A character array containing the numeric IP address ie: 192.168.1.1
-
119 * @param mask A character array containing the subnet mask ie: 255.255.255.0
-
120 * @return -1 if failed, 0 on success
-
121 */
-
122 int setIP(char* ip_addr, char* mask);
-
123
-
124 /**
-
125 * Calling update() keeps the network and mesh layers active and processing data. This needs to be called regularly.
-
126 * @code
-
127 * gw.update();
-
128 * if(network.available()){
-
129 * ...do something
-
130 * }
-
131 * @endcode
-
132 * @param interrupts Set true if called from an interrupt handler & call poll() from the main loop or a thread.
-
133 */
-
134 void update(bool interrupts = 0);
-
135
-
136 /**
-
137 * gw.poll(); needs to be called to handle incoming data from the network interface.
-
138 * The function will perform a delayed wait of max 3ms unless otherwise specified.
-
139 * @param waitDelay How long in milliseconds this function will wait for incoming data.
-
140 */
-
141 void poll(uint32_t waitDelay = 3);
-
142
-
143 /**
-
144 * When using interrupts (gwNodeInt, ncursesInt examples) users need to call
-
145 * this function to disable interrupts before accessing the radio and again to
-
146 * re-enable interrupts when complete
-
147 * @param enable 0 to disable interrupts and access the radio, 1 to re-enable
-
148 */
-
149 void interrupts(bool enable = 1);
-
150
-
151 /**@}*/
-
152 /**
-
153 * @name Advanced Operation
-
154 *
-
155 * More advanced methods and options
-
156 */
-
157 /**@{*/
-
158
-
159 uint16_t thisNodeAddress; /**< Address of our node in Octal format (01,021, etc) */
-
160 uint8_t thisNodeID; /**< NodeID (0-255) */
-
161
-
162 bool meshEnabled(); /**< Is RF24Mesh enabled? */
-
163 bool config_TUN; /**< Using a TAP(false) or TUN(true) interface */
- -
165
-
-
166 uint32_t ifDropped()
-
167 {
-
168 return droppedIncoming;
-
169 }
-
-
170
-
171 void sendUDP(uint8_t nodeID, RF24NetworkFrame frame);
-
172
-
173 /**@}*/
-
174 /**
-
175 * @name Routing Table
-
176 *
-
177 * Utilizing a routing table to provide complete connectivity
-
178 */
-
179 /**@{*/
-
180
-
181 /**
-
182 * If a user has created a file "routing.txt" in the RF24Gateway working directory, it will be loaded <br>
-
183 * at startup into the routing table. The file should contain standard routing table entries as follows: <br>
-
184 * IP<space>NetMask<space>Gateway <br>
-
185 * ie: routing.txt
-
186 * @code
-
187 * 10.1.4.0 255.255.255.0 10.1.3.33
-
188 * 0.0.0.0 0.0.0.0 10.1.3.34 @endcode
-
189 *
-
190 * The first example entry would route all traffic to the 10.1.4.x subnet to 10.1.3.33 <br>
-
191 * All other traffic not destined for the RF24 nodes will use 10.1.3.34 as the gateway
-
192 *
-
193 * Data can be accessed using standard linux Internet address manipulation routines as follows:
-
194 * @code
-
195 * printf("**IP\t\tMask\t\tGateway**\n");
-
196 * for(int i=0; i<gw.routingTableSize; i++){
-
197 * printf("%s \t",inet_ntoa(gw.routingStruct[i].ip));//inet_ntoa uses a statically assigned buffer, so the printf calls need to be done separately
-
198 * printf("%s \t",inet_ntoa(gw.routingStruct[i].mask));
-
199 * printf("%s\n", inet_ntoa(gw.routingStruct[i].gw));
-
200 * //std::cout << inet_ntoa(gw.routingStruct[i].ip) << " \t" << inet_ntoa(gw.routingStruct[i].mask) << " \t" << inet_ntoa(gw.routingStruct[i].gw) << std::endl;
-
201 * }
-
202 * printf("*****\n");
-
203 *
-
204 * Users can modify the routing table as desired, but changes made in code will not currently be saved to file
-
205 *
-
206 * @endcode
-
207 *
-
208 */
-
- -
210 {
-
211 struct in_addr ip;
-
212 struct in_addr mask;
-
213 struct in_addr gw;
-
214 };
-
-
215
-
216 /**
-
217 * The array that holds the routing structure data. See routeStruct
-
218 */
- -
220
-
221 /**
-
222 * The size of the existing routing table loaded into memory. See routeStruct
-
223 */
- -
225
-
226private:
-
227 radio_t& radio;
-
228 network_t& network;
-
229 mesh_t& mesh;
-
230
-
231 bool begin(bool configTUN, bool meshEnable, uint16_t address, uint8_t mesh_nodeID, rf24_datarate_e data_rate, uint8_t _channel);
-
232 bool mesh_enabled;
-
233
-
234 uint32_t droppedIncoming;
+
100 * Calling update() keeps the network and mesh layers active and processing data. This needs to be called regularly.
+
101 * @code
+
102 * gw.update();
+
103 * if(network.available()){
+
104 * ...do something
+
105 * }
+
106 * @endcode
+
107 * @param interrupts Set true if called from an interrupt handler & call poll() from the main loop or a thread.
+
108 */
+
109 void update(bool interrupts = 0);
+
110
+
111 /**
+
112 * gw.poll(); needs to be called to handle incoming data from the network interface.
+
113 * The function will perform a delayed wait of max 3ms unless otherwise specified.
+
114 * @param waitDelay How long in milliseconds this function will wait for incoming data.
+
115 */
+
116 void poll(uint32_t waitDelay = 3);
+
117
+
118 /**
+
119 * When using interrupts (gwNodeInt, ncursesInt examples) users need to call
+
120 * this function to disable interrupts before accessing the radio and again to
+
121 * re-enable interrupts when complete
+
122 * @param enable 0 to disable interrupts and access the radio, 1 to re-enable
+
123 */
+
124 void interrupts(bool enable = 1);
+
125
+
126 /**@}*/
+
127 /**
+
128 * @name Advanced Operation
+
129 *
+
130 * More advanced methods and options
+
131 */
+
132 /**@{*/
+
133
+
134 uint16_t thisNodeAddress; /**< Address of our node in Octal format (01,021, etc) */
+
135 uint8_t thisNodeID; /**< NodeID (0-255) */
+
136
+
137 bool meshEnabled(); /**< Is RF24Mesh enabled? */
+
138 bool config_TUN; /**< Using a TAP(false) or TUN(true) interface */
+ +
140
+
141 uint32_t ifDropped()
+
142 {
+
143 return droppedIncoming;
+
144 }
+
145
+
146 void sendUDP(uint8_t nodeID, RF24NetworkFrame frame);
+
147
+
148 /**@}*/
+
149 /**
+
150 * @name Routing Table
+
151 *
+
152 * Utilizing a routing table to provide complete connectivity
+
153 */
+
154 /**@{*/
+
155
+
156 /**
+
157 * If a user has created a file "routing.txt" in the RF24Gateway working directory, it will be loaded <br>
+
158 * at startup into the routing table. The file should contain standard routing table entries as follows: <br>
+
159 * IP<space>NetMask<space>Gateway <br>
+
160 * ie: routing.txt
+
161 * @code
+
162 * 10.1.4.0 255.255.255.0 10.1.3.33
+
163 * 0.0.0.0 0.0.0.0 10.1.3.34 @endcode
+
164 *
+
165 * The first example entry would route all traffic to the 10.1.4.x subnet to 10.1.3.33 <br>
+
166 * All other traffic not destined for the RF24 nodes will use 10.1.3.34 as the gateway
+
167 *
+
168 * Data can be accessed using standard linux Internet address manipulation routines as follows:
+
169 * @code
+
170 * printf("**IP\t\tMask\t\tGateway**\n");
+
171 * for(int i=0; i<gw.routingTableSize; i++){
+
172 * printf("%s \t",inet_ntoa(gw.routingStruct[i].ip));//inet_ntoa uses a statically assigned buffer, so the printf calls need to be done separately
+
173 * printf("%s \t",inet_ntoa(gw.routingStruct[i].mask));
+
174 * printf("%s\n", inet_ntoa(gw.routingStruct[i].gw));
+
175 * //std::cout << inet_ntoa(gw.routingStruct[i].ip) << " \t" << inet_ntoa(gw.routingStruct[i].mask) << " \t" << inet_ntoa(gw.routingStruct[i].gw) << std::endl;
+
176 * }
+
177 * printf("*****\n");
+
178 *
+
179 * Users can modify the routing table as desired, but changes made in code will not currently be saved to file
+
180 *
+
181 * @endcode
+
182 *
+
183 */
+ +
185 {
+
186 struct in_addr ip;
+
187 struct in_addr mask;
+
188 struct in_addr gw;
+
189 };
+
190
+
191 /**
+
192 * The array that holds the routing structure data. See routeStruct
+
193 */
+ +
195
+
196 /**
+
197 * The size of the existing routing table loaded into memory. See routeStruct
+
198 */
+ +
200
+
201private:
+
202 RF24& radio;
+
203 RF24Network& network;
+
204 RF24Mesh& mesh;
+
205
+
206 bool begin(bool configTUN, bool meshEnable, uint16_t address, uint8_t mesh_nodeID, rf24_datarate_e data_rate, uint8_t _channel);
+
207 bool mesh_enabled;
+
208
+
209 uint32_t droppedIncoming;
+
210
+
211 uint8_t channel;
+
212 rf24_datarate_e dataRate;
+
213 char tunName[IFNAMSIZ];
+
214 int tunFd;
+
215
+
216 unsigned long packets_sent; /**< How many have we sent already */
+
217 uint32_t interfaceInTimer;
+
218
+
219 void handleRadioOut();
+
220 void handleRadioIn();
+
221 void handleRX(uint32_t waitDelay = 0);
+
222 void handleTX();
+
223 volatile bool gotInterrupt;
+
224 int configDevice(uint16_t address);
+
225 int allocateTunDevice(char* dev, int flags, uint16_t address);
+
226
+
227 struct msgStruct
+
228 {
+
229 std::uint8_t message[MAX_PAYLOAD_SIZE];
+
230 std::size_t size;
+
231 };
+
232
+
233 std::queue<msgStruct> rxQueue;
+
234 std::queue<msgStruct> txQueue;
235
-
236 uint8_t channel;
-
237 rf24_datarate_e dataRate;
-
238 char tunName[IFNAMSIZ];
-
239 int tunFd;
-
240
-
241 unsigned long packets_sent; /**< How many have we sent already */
-
242 uint32_t interfaceInTimer;
+
236 void printPayload(std::string buffer, std::string debugMsg = "");
+
237 void printPayload(char* buffer, int nread, std::string debugMsg = "");
+
238
+
239 int s; // Socket variable for sending UDP
+
240 void setupSocket();
+
241 struct sockaddr_in addr;
+
242 struct in_addr getLocalIP();
243
-
244 void handleRadioOut();
-
245 void handleRadioIn();
-
246 void handleRX(uint32_t waitDelay = 0);
-
247 void handleTX();
-
248 volatile bool gotInterrupt;
-
249 int configDevice(uint16_t address);
-
250 int allocateTunDevice(char* dev, int flags, uint16_t address);
-
251
-
252 struct msgStruct
-
253 {
-
254 std::uint8_t message[MAX_PAYLOAD_SIZE];
-
255 std::size_t size;
-
256 };
-
257
-
258 std::queue<msgStruct> rxQueue;
-
259 std::queue<msgStruct> txQueue;
-
260
-
261 // void printPayload(std::string buffer, std::string debugMsg = "");
-
262 // void printPayload(char* buffer, int nread, std::string debugMsg = "");
-
263
-
264 int s; // Socket variable for sending UDP
-
265 void setupSocket();
-
266 struct sockaddr_in addr;
-
267 struct in_addr getLocalIP();
-
268
-
269 void loadRoutingTable();
-
270};
-
+
244 void loadRoutingTable();
+
245};
+
246
+
247/**
+
248 * @example RF24GatewayNode.cpp
+
249 *
+
250 * A simple example of using RF24Gateway node to forward IP traffic automatically to a network interface, while
+
251 * managing standard RF24Network user payloads independently.
+
252 */
+
253
+
254/**
+
255 * @example RF24Gateway_ncurses.cpp
+
256 * RF24Gateway NCurses interface - TMRh20 2015 <br>
+
257 * This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.
+
258 *
+
259 * The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway: <br>
+
260 * a: Interface statistics from /proc/net/dev <br>
+
261 * b: RF24Mesh address/id assignments <br>
+
262 * c: RF24Network/Radio information <br>
+
263 * d: Active IP connections (optional) <br>
+
264 *
+
265 * **Requirements: NCurses** <br>
+
266 * Install NCurses: apt-get install libncurses5-dev
+
267 * Optional: Enable nf_conntrack: @code modprobe nf_conntrack_ipv4 @endcode
+
268 *
+
269 * @image html ncurses.JPG
+
270 */
271
272/**
-
273 * A type definition of the template class `ESBGateway` to maintain backward compatibility.
-
274 *
-
275 * ```.cpp
-
276 * RF24 radio(7, 8);
-
277 * RF24Network network(radio);
-
278 * RF24Mesh mesh(radio, network);
-
279 *
-
280 * RF24Gateway gateway(radio, network, mesh);
-
281 * // is equivalent to
-
282 * ESBGateway<ESBMesh<ESBNetwork<RF24>, RF24>, ESBNetwork<RF24>, RF24> gateway(radio, network, mesh);
-
283 * ```
-
284 */
-
285typedef ESBGateway<ESBMesh<ESBNetwork<RF24>, RF24>, ESBNetwork<RF24>, RF24> RF24Gateway;
-
286
-
287/**
-
288 * @example RF24GatewayNode.cpp
-
289 *
-
290 * A simple example of using RF24Gateway node to forward IP traffic automatically to a network interface, while
-
291 * managing standard RF24Network user payloads independently.
+
273 * @example RF24GatewayNodeInt.cpp
+
274 * A copy of the RF24GatewayNode example using interrupts.
+
275 */
+
276
+
277/**
+
278 * @example RF24Gateway_ncursesInt.cpp
+
279 * A copy of the ncurses example using interrupts.
+
280 */
+
281
+
282/**
+
283 * @example bClient.sh
+
284 * Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with
+
285 * the sensor nodes. <br>Example of on demand LED/Lighting control using a Bash script.
+
286 */
+
287
+
288/**
+
289 * @example nodeClient.js
+
290 * Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with
+
291 * the sensor nodes. <br> Example of on demand LED/Lighting control using a NodeJS script.
292 */
293
294/**
-
295 * @example RF24Gateway_ncurses.cpp
-
296 * RF24Gateway NCurses interface - TMRh20 2015 <br>
-
297 * This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.
-
298 *
-
299 * The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway: <br>
-
300 * a: Interface statistics from /proc/net/dev <br>
-
301 * b: RF24Mesh address/id assignments <br>
-
302 * c: RF24Network/Radio information <br>
-
303 * d: Active IP connections (optional) <br>
-
304 *
-
305 * **Requirements: NCurses** <br>
-
306 * Install NCurses: apt-get install libncurses5-dev
-
307 * Optional: Enable nf_conntrack: @code modprobe nf_conntrack_ipv4 @endcode
-
308 *
-
309 * @image html ncurses.JPG
-
310 */
-
311
-
312/**
-
313 * @example RF24GatewayNodeInt.cpp
-
314 * A copy of the RF24GatewayNode example using interrupts.
-
315 */
-
316
-
317/**
-
318 * @example RF24Gateway_ncursesInt.cpp
-
319 * A copy of the ncurses example using interrupts.
-
320 */
-
321
-
322/**
-
323 * @example bClient.sh
-
324 * Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with
-
325 * the sensor nodes. <br>Example of on demand LED/Lighting control using a Bash script.
-
326 */
-
327
-
328/**
-
329 * @example nodeClient.js
-
330 * Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with
-
331 * the sensor nodes. <br> Example of on demand LED/Lighting control using a NodeJS script.
-
332 */
-
333
-
334/**
-
335 * @example pyClient.py
-
336 * Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with
-
337 * the sensor nodes. <br> Example of scheduled LED/Lighting control using a Python script.
-
338 */
-
339
-
340#endif
-
Definition RF24Gateway.h:66
-
bool config_TUN
-
bool meshEnabled()
-
uint16_t thisNodeAddress
-
int setIP(char *ip_addr, char *mask)
-
routeStruct routingStruct[256]
-
void interrupts(bool enable=1)
-
void poll(uint32_t waitDelay=3)
-
ESBGateway(radio_t &_radio, network_t &_network, mesh_t &_mesh)
-
void begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)
-
uint32_t ifDropped()
-
uint8_t thisNodeID
-
void update(bool interrupts=0)
-
bool fifoCleared
-
uint8_t routingTableSize
-
void sendUDP(uint8_t nodeID, RF24NetworkFrame frame)
-
Definition RF24Gateway.h:48
-
Definition RF24Gateway.h:45
-
-
struct in_addr ip
-
struct in_addr mask
-
struct in_addr gw
+
295 * @example pyClient.py
+
296 * Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with
+
297 * the sensor nodes. <br> Example of scheduled LED/Lighting control using a Python script.
+
298 */
+
299
+
300#endif
+
Definition: RF24Gateway.h:47
+
uint16_t thisNodeAddress
Definition: RF24Gateway.h:134
+
int setIP(char *ip_addr, char *mask)
+
void interrupts(bool enable=1)
+
uint8_t thisNodeID
Definition: RF24Gateway.h:135
+
bool meshEnabled()
+
uint32_t ifDropped()
Definition: RF24Gateway.h:141
+
uint8_t routingTableSize
Definition: RF24Gateway.h:199
+
void begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)
Definition: RF24Gateway.cpp:19
+
void sendUDP(uint8_t nodeID, RF24NetworkFrame frame)
+
void update(bool interrupts=0)
+
routeStruct routingStruct[256]
Definition: RF24Gateway.h:194
+
bool fifoCleared
Definition: RF24Gateway.h:139
+
bool config_TUN
Definition: RF24Gateway.h:138
+
void poll(uint32_t waitDelay=3)
+
Definition: RF24Gateway.h:185
+
struct in_addr mask
Definition: RF24Gateway.h:187
+
struct in_addr gw
Definition: RF24Gateway.h:188
+
struct in_addr ip
Definition: RF24Gateway.h:186
- diff --git a/RF24Gateway_ncursesInt_8cpp-example.html b/RF24Gateway_ncursesInt_8cpp-example.html index 44b811c..4590886 100644 --- a/RF24Gateway_ncursesInt_8cpp-example.html +++ b/RF24Gateway_ncursesInt_8cpp-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24Gateway_ncursesInt.cpp - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
RF24 radio(22, 0);
RF24Network network(radio);
RF24Mesh mesh(radio, network);
-
RF24Gateway gw(radio, network, mesh);
+
RF24Gateway gw(radio, network, mesh);
uint8_t nodeID = 0;
int interruptPin = 24;
@@ -258,10 +242,8 @@
wclear(renewPad);
mvwprintw(renewPad, 0, 0, "*Renewing Address*");
prefresh(renewPad, 0, 0, 3, 26, 4, 55);
-
ok = mesh.renewAddress() != MESH_DEFAULT_ADDRESS;
-
if (ok)
+
if ((ok = mesh.renewAddress()))
{
-
ok = true;
wclear(renewPad);
prefresh(renewPad, 0, 0, 3, 26, 4, 55);
}
@@ -278,26 +260,29 @@
{
++networkPacketsRX;
RF24NetworkHeader header;
+
// un-needed variables
// size_t size = network.peek(header);
// uint8_t buf[size];
-
network.read(header, /*buf*/ 0, /*size*/ 0); // pop the RX payload from network.queue
-
// send a timestamp to master
-
struct timeStruct
+
if (header.type == 1) // header.type is uninitialized
{
-
uint8_t hr;
-
uint8_t min;
-
} myTime;
-
-
time_t mTime;
-
time(&mTime);
-
struct tm* tm = localtime(&mTime);
-
-
myTime.hr = tm->tm_hour;
-
myTime.min = tm->tm_min;
-
RF24NetworkHeader hdr(header.from_node, 1);
-
network.write(hdr, &myTime, sizeof(myTime));
+
struct timeStruct
+
{
+
uint8_t hr;
+
uint8_t min;
+
} myTime;
+
+
time_t mTime;
+
time(&mTime);
+
struct tm* tm = localtime(&mTime);
+
+
myTime.hr = tm->tm_hour;
+
myTime.min = tm->tm_min;
+
RF24NetworkHeader hdr(header.from_node, 1);
+
network.write(hdr, &myTime, sizeof(myTime));
+
}
+
network.read(header, 0, 0);
}
}
else
@@ -493,7 +478,9 @@
for (int j = 0; j < mesh.addrListTop; j++) {
if (mesh.addrList[j].address == i) {
-
int x = getcurx(connPad);
+
int y = 0;
+
int x = 0;
+
getyx(connPad, y, x);
if (x > connPadmaxX - 77) {
wprintw(connPad, "\n");
}
@@ -513,7 +500,9 @@
for (int j = 0; j < mesh.addrListTop; j++) {
if (mesh.addrList[j].address == i) {
-
int x = getcurx(connPad);
+
int y = 0;
+
int x = 0;
+
getyx(connPad, y, x);
if (x > connPadmaxX - 77) {
wprintw(connPad, "\n");
}
@@ -533,7 +522,9 @@
for (int j = 0; j < mesh.addrListTop; j++) {
if (mesh.addrList[j].address == i) {
-
int x = getcurx(connPad);
+
int y = 0;
+
int x = 0;
+
getyx(connPad, y, x);
if (x > connPadmaxX - 77) {
wprintw(connPad, "\n");
}
@@ -588,7 +579,7 @@
//This is an IP interface, display the IP
if (family == AF_INET || family == AF_INET6)
{
-
s = getnameinfo(ifa->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+
s = getnameinfo(ifa->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (s == 0)
{
wprintw(win, "IP: %s\n", host);
@@ -646,8 +637,7 @@
sleep(1);
wattron(win, COLOR_PAIR(1));
-
mvwprintw(win, 4, 1, isConf ? "IP Configuration\n" : "**Interface Not Configured:**\n");
-
mvwprintw(win, 5, 1, "IP 10.10.2.2 and Subnet Mask 255.255.255.0 is default\n");
+
mvwprintw(win, 5, 1, isConf ? "IP Configuration\n" : "**Interface Not Configured:**\n");
wattroff(win, COLOR_PAIR(1));
mvwprintw(win, 6, 1, "Enter IP Address: \n");
refresh();
@@ -662,17 +652,7 @@
if (strlen(ip) >= 6 && strlen(mask) >= 7)
{
-
if (gw.setIP(ip, mask) < 0) {
-
mvwprintw(win, 8, 1, "Unable to set IP/Subnet \n");
-
uint32_t UID = getuid();
-
if (UID) {
-
mvwprintw(win, 9, 1, "Not running as root, configure as follows:\n");
-
mvwprintw(win, 10, 1, "sudo ip tuntap add dev tun_nrf24 mode tun user %s multi_queue\n", getlogin());
-
mvwprintw(win, 11, 1, "sudo ifconfig tun_nrf24 10.10.2.2/24\n");
-
}
-
refresh();
-
sleep(10);
-
}
+
gw.setIP(ip, mask);
}
else
{
@@ -792,7 +772,7 @@
wprintw(rf24Pad, "TX Packets(sys): %u\n", ok);
wprintw(rf24Pad, "TX Drops: %u\n", fail);
#endif
-
wprintw(rf24Pad, "RX Packets(user): %lu\n", networkPacketsRX);
+
wprintw(rf24Pad, "RX Packets(user): %u\n", networkPacketsRX);
if (gw.fifoCleared)
{
++fifoClears;
@@ -845,7 +825,7 @@
fnd = line.find_last_of(" ", fnd - 2);
unsigned findEnd = line.find(" mark=");
line = line.substr(fnd, findEnd - fnd);
-
mvwprintw(connPad, ctr++, 0, "%ld %s\n", lCtr++, line.c_str());
+
mvwprintw(connPad, ctr++, 0, "%d %s\n", lCtr++, line.c_str());
if (ctr > maxX - 15)
{
@@ -860,12 +840,11 @@
}
/******************************************************************/
-
Definition RF24Gateway.h:66
+
Definition: RF24Gateway.h:47
- diff --git a/RF24Gateway_ncurses_8cpp-example.html b/RF24Gateway_ncurses_8cpp-example.html index 0b7df3b..c9b93a3 100644 --- a/RF24Gateway_ncurses_8cpp-example.html +++ b/RF24Gateway_ncurses_8cpp-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24Gateway_ncurses.cpp - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
RF24Gateway_ncurses.cpp
-

RF24Gateway NCurses interface - TMRh20 2015
+

RF24Gateway NCurses interface - TMRh20 2015
This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.

-

The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway:
+

The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway:
a: Interface statistics from /proc/net/dev
b: RF24Mesh address/id assignments
c: RF24Network/Radio information
@@ -153,7 +137,7 @@

RF24 radio(22, 0);
RF24Network network(radio);
RF24Mesh mesh(radio, network);
-
RF24Gateway gw(radio, network, mesh);
+
RF24Gateway gw(radio, network, mesh);
/******************************************************************/
@@ -478,7 +462,9 @@
for (int j = 0; j < mesh.addrListTop; j++) {
if (mesh.addrList[j].address == i) {
-
int x = getcurx(connPad);
+
int y = 0;
+
int x = 0;
+
getyx(connPad, y, x);
if (x > connPadmaxX - 77) {
wprintw(connPad, "\n");
}
@@ -498,7 +484,9 @@
for (int j = 0; j < mesh.addrListTop; j++) {
if (mesh.addrList[j].address == i) {
-
int x = getcurx(connPad);
+
int y = 0;
+
int x = 0;
+
getyx(connPad, y, x);
if (x > connPadmaxX - 77) {
wprintw(connPad, "\n");
}
@@ -518,7 +506,9 @@
for (int j = 0; j < mesh.addrListTop; j++) {
if (mesh.addrList[j].address == i) {
-
int x = getcurx(connPad);
+
int y = 0;
+
int x = 0;
+
getyx(connPad, y, x);
if (x > connPadmaxX - 77) {
wprintw(connPad, "\n");
}
@@ -573,7 +563,7 @@
//This is an IP interface, display the IP
if (family == AF_INET || family == AF_INET6)
{
-
s = getnameinfo(ifa->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+
s = getnameinfo(ifa->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (s == 0)
{
wprintw(win, "IP: %s\n", host);
@@ -631,8 +621,7 @@
sleep(1);
wattron(win, COLOR_PAIR(1));
-
mvwprintw(win, 4, 1, isConf ? "IP Configuration\n" : "**Interface Not Configured:**\n");
-
mvwprintw(win, 5, 1, "IP 10.10.2.2 and Subnet Mask 255.255.255.0 is default\n");
+
mvwprintw(win, 5, 1, isConf ? "IP Configuration\n" : "**Interface Not Configured:**\n");
wattroff(win, COLOR_PAIR(1));
mvwprintw(win, 6, 1, "Enter IP Address: \n");
refresh();
@@ -647,17 +636,7 @@
if (strlen(ip) >= 6 && strlen(mask) >= 7)
{
-
if (gw.setIP(ip, mask) < 0) {
-
mvwprintw(win, 8, 1, "Unable to set IP/Subnet \n");
-
uint32_t UID = getuid();
-
if (UID) {
-
mvwprintw(win, 9, 1, "Not running as root, configure as follows:\n");
-
mvwprintw(win, 10, 1, "sudo ip tuntap add dev tun_nrf24 mode tun user %s multi_queue\n", getlogin());
-
mvwprintw(win, 11, 1, "sudo ifconfig tun_nrf24 10.10.2.2/24\n");
-
}
-
refresh();
-
sleep(10);
-
}
+
gw.setIP(ip, mask);
}
else
{
@@ -775,7 +754,7 @@
wprintw(rf24Pad, "TX Packets: %u\n", ok);
wprintw(rf24Pad, "TX Drops: %u\n", fail);
#endif
-
wprintw(rf24Pad, "RX Packets(user): %lu\n", networkPacketsRX);
+
wprintw(rf24Pad, "RX Packets(user): %u\n", networkPacketsRX);
if (padSelection == 1)
{
@@ -822,7 +801,7 @@
fnd = line.find_last_of(" ", fnd - 2);
unsigned findEnd = line.find(" mark=");
line = line.substr(fnd, findEnd - fnd);
-
mvwprintw(connPad, ctr++, 0, "%ld %s\n", lCtr++, line.c_str());
+
mvwprintw(connPad, ctr++, 0, "%d %s\n", lCtr++, line.c_str());
if (ctr > maxX - 15)
{
@@ -837,12 +816,11 @@
}
/******************************************************************/
-
Definition RF24Gateway.h:66
+
Definition: RF24Gateway.h:47
- diff --git a/annotated.html b/annotated.html index 38c2aec..42733f5 100644 --- a/annotated.html +++ b/annotated.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Class List - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 12]
- - - - +
[detail level 12]
 CESBGateway
 CrouteStruct
 CESBMesh
 CESBNetwork
+ +
 CRF24Gateway
 CrouteStruct
-
diff --git a/bClient_8sh-example.html b/bClient_8sh-example.html index 545d7aa..608da36 100644 --- a/bClient_8sh-example.html +++ b/bClient_8sh-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: bClient.sh - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + -
-
-
bClient.sh
-

Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with the sensor nodes.
+

Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with the sensor nodes.
Example of on demand LED/Lighting control using a Bash script.

#!/bin/bash
@@ -127,8 +111,7 @@
- diff --git a/bdwn.png b/bdwn.png new file mode 100644 index 0000000000000000000000000000000000000000..940a0b950443a0bb1b216ac03c45b8a16c955452 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T - - - - - - -RF24Gateway - TCP/IP over RF24Network: Member List - - - - - - - - - - - - - - - - -
-
- - - - - - -
-
RF24Gateway - TCP/IP over RF24Network v2.1.0 -
-
TMRh20 - Pushing the practical limits of RF24 modules
-
-
- - - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
-
-
ESBGateway< mesh_t, network_t, radio_t > Member List
-
- - - -
- - diff --git a/classESBGateway.html b/classESBGateway.html deleted file mode 100644 index 12898a0..0000000 --- a/classESBGateway.html +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - - -RF24Gateway - TCP/IP over RF24Network: ESBGateway< mesh_t, network_t, radio_t > Class Template Reference - - - - - - - - - - - - - - - - -
-
- - - - - - -
-
RF24Gateway - TCP/IP over RF24Network v2.1.0 -
-
TMRh20 - Pushing the practical limits of RF24 modules
-
-
- - - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
-
- -
ESBGateway< mesh_t, network_t, radio_t > Class Template Reference
-
-
- -

#include <RF24Gateway.h>

- - - - -

-Classes

struct  routeStruct
 
- - - - - - - - - - - - - - - - - -

-Public Member Functions

RF24Gateway (RPi/Linux)

RF24Gateway library for devices with an IP stack

-
 ESBGateway (radio_t &_radio, network_t &_network, mesh_t &_mesh)
 
void begin (uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)
 
void begin (uint16_t address, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS, bool meshEnable=0, uint8_t nodeID=0)
 
int setIP (char *ip_addr, char *mask)
 
void update (bool interrupts=0)
 
void poll (uint32_t waitDelay=3)
 
void interrupts (bool enable=1)
 
- - - - - - - - - - - - - - - - -

Advanced Operation

More advanced methods and options

-
uint16_t thisNodeAddress
 
uint8_t thisNodeID
 
bool config_TUN
 
bool fifoCleared
 
bool meshEnabled ()
 
uint32_t ifDropped ()
 
void sendUDP (uint8_t nodeID, RF24NetworkFrame frame)
 
- - - - - - -

Routing Table

Utilizing a routing table to provide complete connectivity

-
routeStruct routingStruct [256]
 
uint8_t routingTableSize
 
-

Detailed Description

-
template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
-class ESBGateway< mesh_t, network_t, radio_t >
Template Parameters
- - - - -
mesh_tThe mesh object's type. Defaults to RF24Mesh 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.
network_tThe network object's type. Defaults to RF24Network 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.
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
RF24GatewayNode.cpp, RF24GatewayNodeInt.cpp, RF24Gateway_ncurses.cpp, and RF24Gateway_ncursesInt.cpp.
-
- -

Definition at line 65 of file RF24Gateway.h.

-

Constructor & Destructor Documentation

- -

◆ ESBGateway()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - - - - - - - - - - -
ESBGateway< mesh_t, network_t, radio_t >::ESBGateway (radio_t & _radio,
network_t & _network,
mesh_t & _mesh )
-
-

ESBGateway constructor.

RF24 radio(7,8);
-
RF24Network network(radio);
-
RF24Mesh mesh(radio,network);
-
RF24Gateway gateway(radio,network,mesh);
- -
-

Definition at line 13 of file RF24Gateway.cpp.

- -
-
-

Member Function Documentation

- -

◆ begin() [1/2]

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - - - - - - - - - - -
void ESBGateway< mesh_t, network_t, radio_t >::begin (uint8_t nodeID = 0,
uint8_t channel = 97,
rf24_datarate_e data_rate = RF24_1MBPS )
-
-

Begin function for use with RF24Mesh (TUN interface)

-
Parameters
- - - - -
nodeIDThe RF24Mesh nodeID to use
channelThe radio channel to use (1-127)
data_rateThe RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
-
-
-
gw.begin(); //Start the gateway using RF24Mesh, with nodeID 0 (Master)
-
uint8_t nodeID; gw.begin(nodeID); //Start the gateway using RF24Mesh, with nodeID 1 (Child node)
-
-

Definition at line 21 of file RF24Gateway.cpp.

- -
-
- -

◆ begin() [2/2]

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void ESBGateway< mesh_t, network_t, radio_t >::begin (uint16_t address,
uint8_t channel = 97,
rf24_datarate_e data_rate = RF24_1MBPS,
bool meshEnable = 0,
uint8_t nodeID = 0 )
-
-

Begin function for use with a TAP (Ethernet) interface. RF24Mesh can be used for address assignment, but ARP will be used to perform the lookups.

-
Parameters
- - - - - - -
addressThe RF24Network address to use
channelThe radio channel (0-127) to use
data_rateThe RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
meshEnableWhether to use RF24Mesh for address assignment
nodeIDThe RF24Mesh nodeID to use if meshEnable has been set to true
-
-
-
uint16_t address=00; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 00 (Master)
-
uint16_t address=01; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 01 (Child)
-
-

Definition at line 30 of file RF24Gateway.cpp.

- -
-
- -

◆ setIP()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - - - - - -
int ESBGateway< mesh_t, network_t, radio_t >::setIP (char * ip_addr,
char * mask )
-
-

Once the Gateway has been started via begin() , call setIP to configure the IP and subnet mask.

-
Parameters
- - - -
ip_addrA character array containing the numeric IP address ie: 192.168.1.1
maskA character array containing the subnet mask ie: 255.255.255.0
-
-
-
Returns
-1 if failed, 0 on success
- -

Definition at line 257 of file RF24Gateway.cpp.

- -
-
- -

◆ update()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - -
void ESBGateway< mesh_t, network_t, radio_t >::update (bool interrupts = 0)
-
-

Calling update() keeps the network and mesh layers active and processing data. This needs to be called regularly.

gw.update();
-
if(network.available()){
-
...do something
-
}
-
Parameters
- - -
interruptsSet true if called from an interrupt handler & call poll() from the main loop or a thread.
-
-
- -

Definition at line 327 of file RF24Gateway.cpp.

- -
-
- -

◆ poll()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - -
void ESBGateway< mesh_t, network_t, radio_t >::poll (uint32_t waitDelay = 3)
-
-

gw.poll(); needs to be called to handle incoming data from the network interface. The function will perform a delayed wait of max 3ms unless otherwise specified.

Parameters
- - -
waitDelayHow long in milliseconds this function will wait for incoming data.
-
-
- -

Definition at line 344 of file RF24Gateway.cpp.

- -
-
- -

◆ interrupts()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - -
void ESBGateway< mesh_t, network_t, radio_t >::interrupts (bool enable = 1)
-
-

When using interrupts (gwNodeInt, ncursesInt examples) users need to call this function to disable interrupts before accessing the radio and again to re-enable interrupts when complete

Parameters
- - -
enable0 to disable interrupts and access the radio, 1 to re-enable
-
-
- -

Definition at line 319 of file RF24Gateway.cpp.

- -
-
- -

◆ meshEnabled()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - -
bool ESBGateway< mesh_t, network_t, radio_t >::meshEnabled ()
-
-

Is RF24Mesh enabled?

- -

Definition at line 153 of file RF24Gateway.cpp.

- -
-
- -

◆ ifDropped()

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - - -
- - - - - - - -
uint32_t ESBGateway< mesh_t, network_t, radio_t >::ifDropped ()
-
-inline
-
- -

Definition at line 166 of file RF24Gateway.h.

- -
-
- -

◆ sendUDP()

- -
-
-
-template<class mesh_t , class network_t , class radio_t >
- - - - - - - - - - - -
void ESBGateway< mesh_t, network_t, radio_t >::sendUDP (uint8_t nodeID,
RF24NetworkFrame frame )
-
- -

Definition at line 725 of file RF24Gateway.cpp.

- -
-
-

Member Data Documentation

- -

◆ thisNodeAddress

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - -
uint16_t ESBGateway< mesh_t, network_t, radio_t >::thisNodeAddress
-
-

Address of our node in Octal format (01,021, etc)

- -

Definition at line 159 of file RF24Gateway.h.

- -
-
- -

◆ thisNodeID

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - -
uint8_t ESBGateway< mesh_t, network_t, radio_t >::thisNodeID
-
-

NodeID (0-255)

- -

Definition at line 160 of file RF24Gateway.h.

- -
-
- -

◆ config_TUN

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - -
bool ESBGateway< mesh_t, network_t, radio_t >::config_TUN
-
-

Using a TAP(false) or TUN(true) interface

- -

Definition at line 163 of file RF24Gateway.h.

- -
-
- -

◆ fifoCleared

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - -
bool ESBGateway< mesh_t, network_t, radio_t >::fifoCleared
-
- -

Definition at line 164 of file RF24Gateway.h.

- -
-
- -

◆ routingStruct

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - -
routeStruct ESBGateway< mesh_t, network_t, radio_t >::routingStruct[256]
-
-

The array that holds the routing structure data. See routeStruct

- -

Definition at line 219 of file RF24Gateway.h.

- -
-
- -

◆ routingTableSize

- -
-
-
-template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
- - - - -
uint8_t ESBGateway< mesh_t, network_t, radio_t >::routingTableSize
-
-

The size of the existing routing table loaded into memory. See routeStruct

- -

Definition at line 224 of file RF24Gateway.h.

- -
-
-
- - -
- - diff --git a/classESBNetwork.html b/classESBNetwork.html deleted file mode 100644 index 1f7c8b9..0000000 --- a/classESBNetwork.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -RF24Gateway - TCP/IP over RF24Network: ESBNetwork< radio_t > Class Template Reference - - - - - - - - - - - - - - - - -
-
- - - - - - -
-
RF24Gateway - TCP/IP over RF24Network v2.1.0 -
-
TMRh20 - Pushing the practical limits of RF24 modules
-
-
- - - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
-
-
ESBNetwork< radio_t > Class Template Reference
-
-
-

Detailed Description

-
template<class radio_t>
-class ESBNetwork< radio_t >
-

Definition at line 45 of file RF24Gateway.h.

-
- - -
- - diff --git a/classRF24Gateway-members.html b/classRF24Gateway-members.html new file mode 100644 index 0000000..0c2aac6 --- /dev/null +++ b/classRF24Gateway-members.html @@ -0,0 +1,103 @@ + + + + + + + +RF24Gateway - TCP/IP over RF24Network: Member List + + + + + + + + + + + +
+
+ + + + + + +
+
RF24Gateway - TCP/IP over RF24Network v1.1.1 +
+
TMRh20 - Pushing the practical limits of RF24 modules
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
RF24Gateway Member List
+
+
+ +

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

+ + + + + + + + + + + + + + + + + +
begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)RF24Gateway
begin(uint16_t address, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS, bool meshEnable=0, uint8_t nodeID=0)RF24Gateway
config_TUNRF24Gateway
fifoClearedRF24Gateway
ifDropped()RF24Gatewayinline
interrupts(bool enable=1)RF24Gateway
meshEnabled()RF24Gateway
poll(uint32_t waitDelay=3)RF24Gateway
RF24Gateway(RF24 &_radio, RF24Network &_network, RF24Mesh &_mesh)RF24Gateway
routingStructRF24Gateway
routingTableSizeRF24Gateway
sendUDP(uint8_t nodeID, RF24NetworkFrame frame)RF24Gateway
setIP(char *ip_addr, char *mask)RF24Gateway
thisNodeAddressRF24Gateway
thisNodeIDRF24Gateway
update(bool interrupts=0)RF24Gateway
+ + + + diff --git a/classRF24Gateway.html b/classRF24Gateway.html new file mode 100644 index 0000000..593df10 --- /dev/null +++ b/classRF24Gateway.html @@ -0,0 +1,607 @@ + + + + + + + +RF24Gateway - TCP/IP over RF24Network: RF24Gateway Class Reference + + + + + + + + + + + +
+
+ + + + + + +
+
RF24Gateway - TCP/IP over RF24Network v1.1.1 +
+
TMRh20 - Pushing the practical limits of RF24 modules
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+ +
RF24Gateway Class Reference
+
+
+ +

#include <RF24Gateway.h>

+ + + + +

+Classes

struct  routeStruct
 
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

RF24Gateway (RPi/Linux)

RF24Gateway library for devices with an IP stack

+
 RF24Gateway (RF24 &_radio, RF24Network &_network, RF24Mesh &_mesh)
 
void begin (uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)
 
void begin (uint16_t address, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS, bool meshEnable=0, uint8_t nodeID=0)
 
int setIP (char *ip_addr, char *mask)
 
void update (bool interrupts=0)
 
void poll (uint32_t waitDelay=3)
 
void interrupts (bool enable=1)
 
+ + + + + + + + + + + + + + + + +

Advanced Operation

More advanced methods and options

+
uint16_t thisNodeAddress
 
uint8_t thisNodeID
 
bool config_TUN
 
bool fifoCleared
 
bool meshEnabled ()
 
uint32_t ifDropped ()
 
void sendUDP (uint8_t nodeID, RF24NetworkFrame frame)
 
+ + + + + + +

Routing Table

Utilizing a routing table to provide complete connectivity

+
routeStruct routingStruct [256]
 
uint8_t routingTableSize
 
+

Detailed Description

+

Constructor & Destructor Documentation

+ +

◆ RF24Gateway()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
RF24Gateway::RF24Gateway (RF24 & _radio,
RF24Network & _network,
RF24Mesh & _mesh 
)
+
+

RF24Gateway constructor.

+ +

Definition at line 12 of file RF24Gateway.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ begin() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void RF24Gateway::begin (uint8_t nodeID = 0,
uint8_t channel = 97,
rf24_datarate_e data_rate = RF24_1MBPS 
)
+
+

Begin function for use with RF24Mesh (TUN interface)

+
Parameters
+ + + + +
nodeIDThe RF24Mesh nodeID to use
channelThe radio channel to use (1-127)
data_rateThe RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
+
+
+
gw.begin(); //Start the gateway using RF24Mesh, with nodeID 0 (Master)
+
uint8_t nodeID; gw.begin(nodeID); //Start the gateway using RF24Mesh, with nodeID 1 (Child node)
+
+

Definition at line 19 of file RF24Gateway.cpp.

+ +

References begin().

+ +

Referenced by begin().

+ +
+
+ +

◆ begin() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void RF24Gateway::begin (uint16_t address,
uint8_t channel = 97,
rf24_datarate_e data_rate = RF24_1MBPS,
bool meshEnable = 0,
uint8_t nodeID = 0 
)
+
+

Begin function for use with a TAP (Ethernet) interface. RF24Mesh can be used for address assignment, but ARP will be used to perform the lookups.

+
Parameters
+ + + + + + +
addressThe RF24Network address to use
channelThe radio channel (0-127) to use
data_rateThe RF24 datarate to use (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
meshEnableWhether to use RF24Mesh for address assignment
nodeIDThe RF24Mesh nodeID to use if meshEnable has been set to true
+
+
+
uint16_t address=00; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 00 (Master)
+
uint16_t address=01; gw.begin(address); //Start the gateway without using RF24Mesh, with RF24Network address 01 (Child)
+
+

Definition at line 27 of file RF24Gateway.cpp.

+ +

References begin().

+ +
+
+ +

◆ setIP()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int RF24Gateway::setIP (char * ip_addr,
char * mask 
)
+
+

Once the Gateway has been started via begin() , call setIP to configure the IP and subnet mask.

+
Parameters
+ + + +
ip_addrA character array containing the numeric IP address ie: 192.168.1.1
maskA character array containing the subnet mask ie: 255.255.255.0
+
+
+
Returns
-1 if failed, 0 on success
+ +

Definition at line 243 of file RF24Gateway.cpp.

+ +
+
+ +

◆ update()

+ +
+
+ + + + + + + + +
void RF24Gateway::update (bool interrupts = 0)
+
+

Calling update() keeps the network and mesh layers active and processing data. This needs to be called regularly.

gw.update();
+
if(network.available()){
+
...do something
+
}
+
Parameters
+ + +
interruptsSet true if called from an interrupt handler & call poll() from the main loop or a thread.
+
+
+ +

Definition at line 310 of file RF24Gateway.cpp.

+ +

References interrupts().

+ +
+
+ +

◆ poll()

+ +
+
+ + + + + + + + +
void RF24Gateway::poll (uint32_t waitDelay = 3)
+
+

gw.poll(); needs to be called to handle incoming data from the network interface. The function will perform a delayed wait of max 3ms unless otherwise specified.

Parameters
+ + +
waitDelayHow long in milliseconds this function will wait for incoming data.
+
+
+ +

Definition at line 326 of file RF24Gateway.cpp.

+ +

References fifoCleared.

+ +
+
+ +

◆ interrupts()

+ +
+
+ + + + + + + + +
void RF24Gateway::interrupts (bool enable = 1)
+
+

When using interrupts (gwNodeInt, ncursesInt examples) users need to call this function to disable interrupts before accessing the radio and again to re-enable interrupts when complete

Parameters
+ + +
enable0 to disable interrupts and access the radio, 1 to re-enable
+
+
+ +

Definition at line 303 of file RF24Gateway.cpp.

+ +

Referenced by update().

+ +
+
+ +

◆ meshEnabled()

+ +
+
+ + + + + + + +
bool RF24Gateway::meshEnabled ()
+
+

Is RF24Mesh enabled?

+ +

Definition at line 147 of file RF24Gateway.cpp.

+ +
+
+ +

◆ ifDropped()

+ +
+
+ + + + + +
+ + + + + + + +
uint32_t RF24Gateway::ifDropped ()
+
+inline
+
+ +

Definition at line 141 of file RF24Gateway.h.

+ +
+
+ +

◆ sendUDP()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void RF24Gateway::sendUDP (uint8_t nodeID,
RF24NetworkFrame frame 
)
+
+ +

Definition at line 696 of file RF24Gateway.cpp.

+ +
+
+

Member Data Documentation

+ +

◆ thisNodeAddress

+ +
+
+ + + + +
uint16_t RF24Gateway::thisNodeAddress
+
+

Address of our node in Octal format (01,021, etc)

+ +

Definition at line 134 of file RF24Gateway.h.

+ +
+
+ +

◆ thisNodeID

+ +
+
+ + + + +
uint8_t RF24Gateway::thisNodeID
+
+

NodeID (0-255)

+ +

Definition at line 135 of file RF24Gateway.h.

+ +
+
+ +

◆ config_TUN

+ +
+
+ + + + +
bool RF24Gateway::config_TUN
+
+

Using a TAP(false) or TUN(true) interface

+ +

Definition at line 138 of file RF24Gateway.h.

+ +
+
+ +

◆ fifoCleared

+ +
+
+ + + + +
bool RF24Gateway::fifoCleared
+
+ +

Definition at line 139 of file RF24Gateway.h.

+ +

Referenced by poll().

+ +
+
+ +

◆ routingStruct

+ +
+
+ + + + +
routeStruct RF24Gateway::routingStruct[256]
+
+

The array that holds the routing structure data. See routeStruct

+ +

Definition at line 194 of file RF24Gateway.h.

+ +
+
+ +

◆ routingTableSize

+ +
+
+ + + + +
uint8_t RF24Gateway::routingTableSize
+
+

The size of the existing routing table loaded into memory. See routeStruct

+ +

Definition at line 199 of file RF24Gateway.h.

+ +
+
+
+ + + + diff --git a/classes.html b/classes.html index b792d32..8dc24f2 100644 --- a/classes.html +++ b/classes.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Class Index - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
Class Index
- diff --git a/clipboard.js b/clipboard.js deleted file mode 100644 index 42c1fb0..0000000 --- a/clipboard.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - -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 deleted file mode 100644 index 53ad21d..0000000 --- a/cookie.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - 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 b9c7364..e2331dc 100644 --- a/darkmode_toggle.js +++ b/darkmode_toggle.js @@ -28,10 +28,6 @@ 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" @@ -61,30 +57,29 @@ class DarkModeToggle extends HTMLElement { const toggleButton = document.createElement('dark-mode-toggle') toggleButton.title = DarkModeToggle.title toggleButton.innerHTML = DarkModeToggle.icon - toggleButton.tabIndex = 0; function addButton() { - const titleArea = document.getElementById("titlearea"); - const searchBox = document.getElementById("MSearchBox"); - const mainMenu = document.getElementById("main-menu"); - const navRow1 = document.getElementById("navrow1"); - let mainMenuVisible = false; + var titleArea = document.getElementById("titlearea"); + var searchBox = document.getElementById("MSearchBox"); + var mainMenu = document.getElementById("main-menu"); + var navRow1 = document.getElementById("navrow1"); + var mainMenuVisible = false; if (mainMenu) { - const menuStyle = window.getComputedStyle(mainMenu); + var menuStyle = window.getComputedStyle(mainMenu); mainMenuVisible = menuStyle.display!=='none' } - const searchBoxPos1 = document.getElementById("searchBoxPos1"); + var searchBoxPos1 = document.getElementById("searchBoxPos1"); if (searchBox) { // (1) search box visible searchBox.parentNode.appendChild(toggleButton) } else if (navRow1) { // (2) no search box, static menu bar - const li = document.createElement('li'); + var li = document.createElement('li'); li.style = 'float: right;' li.appendChild(toggleButton); toggleButton.style = 'width: 24px; height: 25px; padding-top: 11px; float: right;'; - const row = document.querySelector('#navrow1 > ul:first-of-type'); + var row = document.querySelector('#navrow1 > ul:first-of-type'); row.appendChild(li) } else if (mainMenu && mainMenuVisible) { // (3) no search box + dynamic menu bar expanded - const li = document.createElement('li'); + var li = document.createElement('li'); li.style = 'float: right;' li.appendChild(toggleButton); toggleButton.style = 'width: 14px; height: 36px; padding-top: 10px; float: right;'; @@ -99,16 +94,11 @@ class DarkModeToggle extends HTMLElement { } } - $(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 - } + $(document).ready(function(){ + addButton(); + }) + $(window).resize(function(){ + addButton(); }) DarkModeToggle.setDarkModeVisibility(DarkModeToggle.darkModeEnabled) }) @@ -118,7 +108,32 @@ class DarkModeToggle extends HTMLElement { constructor() { super(); this.onclick=this.toggleDarkMode - this.onkeypress=function(e){if (e.keyCode==13) { 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); } /** @@ -129,29 +144,54 @@ class DarkModeToggle extends HTMLElement { } static get prefersDarkModeInLightMode() { - return Cookie.readSetting(DarkModeToggle.darkmode_cookie_name,'0')=='1'; + 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' + } } static set prefersDarkModeInLightMode(preference) { - if (preference) { - Cookie.writeSetting(DarkModeToggle.darkmode_cookie_name,'1'); + if (window.chrome) { + if (preference) { + localStorage.setItem(DarkModeToggle.prefersDarkModeInLightModeKey, true) + } else { + localStorage.removeItem(DarkModeToggle.prefersDarkModeInLightModeKey) + } } else { - Cookie.eraseSetting(DarkModeToggle.darkmode_cookie_name); + if (preference) { + DarkModeToggle.createCookie('doxygen_prefers_dark','1',365) + } else { + DarkModeToggle.eraseCookie('doxygen_prefers_dark') + } } } static get prefersLightModeInDarkMode() { - return Cookie.readSetting(DarkModeToggle.lightmode_cookie_name,'0')=='1' + 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' + } } static set prefersLightModeInDarkMode(preference) { - if (preference) { - Cookie.writeSetting(DarkModeToggle.lightmode_cookie_name,'1'); + if (window.chrome) { + if (preference) { + localStorage.setItem(DarkModeToggle.prefersLightModeInDarkModeKey, true) + } else { + localStorage.removeItem(DarkModeToggle.prefersLightModeInDarkModeKey) + } } else { - Cookie.eraseSetting(DarkModeToggle.lightmode_cookie_name); + if (preference) { + DarkModeToggle.createCookie('doxygen_prefers_light','1',365) + } else { + DarkModeToggle.eraseCookie('doxygen_prefers_light') + } } } + /** * @returns `true` for dark-mode, `false` for light-mode user preference */ @@ -179,7 +219,7 @@ class DarkModeToggle extends HTMLElement { } static setDarkModeVisibility(enable) { - let darkModeStyle, lightModeStyle; + var darkModeStyle, lightModeStyle; if(enable) { darkModeStyle = 'inline-block'; lightModeStyle = 'none' @@ -187,8 +227,12 @@ class DarkModeToggle extends HTMLElement { darkModeStyle = 'none'; lightModeStyle = 'inline-block' } - document.querySelectorAll('.dark-mode-visible' ).forEach(el => el.style.display = darkModeStyle); - document.querySelectorAll('.light-mode-visible').forEach(el => el.style.display = lightModeStyle); + document.querySelectorAll('.dark-mode-visible').forEach(function(el) { + el.style.display = darkModeStyle; + }); + document.querySelectorAll('.light-mode-visible').forEach(function(el) { + el.style.display = lightModeStyle; + }); } static enableDarkMode(enable) { if(enable) { diff --git a/dir_49e56c817e5e54854c35e136979f97ca.html b/dir_49e56c817e5e54854c35e136979f97ca.html index 2143a51..c11d23f 100644 --- a/dir_49e56c817e5e54854c35e136979f97ca.html +++ b/dir_49e56c817e5e54854c35e136979f97ca.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: docs Directory Reference - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,33 +32,23 @@
- + - - -
docs Directory Reference
@@ -98,8 +82,7 @@
- diff --git a/doc.png b/doc.png new file mode 100644 index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501 GIT binary patch literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t literal 0 HcmV?d00001 diff --git a/doc.svg b/doc.svg deleted file mode 100644 index 0b928a5..0000000 --- a/doc.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docd.png b/docd.png new file mode 100644 index 0000000000000000000000000000000000000000..d7c94fda9bf08ecc02c7190d968452b7a2dbf04b GIT binary patch literal 756 zcmV1wr-rhpn+wxm%q2)IkAYsr{iGq<}_z5JCD4J;FN?6Qh;@TCubdp(_XdD-^ zG_#)IP7_z6hKNdx5^+FGArwLWTWCG!j+oKji?U!hxA#d-ljgkN`+e^@-P+RWG{Bx= z2iQyYTtEf*o~ySWrIVW}HWHi0_hd4~$E6Jx1U`>Owo}EYJ1O>iZvS?!z8}B}QwLMA zC3Keqf1c}K@?C`X>68b(EUzYUYAS&OH^VPteZLPr{S&|nQvp@6W4GH-1U8!u&7l~A zx~RUSNH+>7@q38W6!BzirtjLFCzc|XGx)EF#G%^pWION*k@?vP<2O>|XkCD3ujl%1 z{55JSVkw{~HbX>iEZ2%yJ2eHj5Yh8OTpzs0A2;tZ^x!#5D+y-es{k1&0|Ns9-|+Xt ziGiTsZ8(^nUo#wdTpIDkb-Zp(3|A*FzW}GZ5SQD-r^R`&X@`26E3W|GyrwDIZjtQ& z$g5f8Sv=VgVtDien@J(!^BK+#l;s-LgP--p7C;7;E!ysXcXK6?+9D>_-B(?Wm(U zQbNm-5TyYxIU=rs0+)!ixqzhuxw(AqKc3?KKX32{D~Qibp*r0x&Wux5-9WCMMRi3U zTd6dOCQlj>a;gr;gLwRKulT&(m@^L{&HkSC(qH05HSSf$YEhynGvH zWNez``Z8FJXE+BSg=%ak{OR z+Nylcb{?evLYLuE1_HngYw0g%LC#=$a@?4~Tx>F9295Q>9UJ|_6v-KMw;!YZSgGj@ zR8fRov=hJ#QvsO@xw*{0%zH@OKVEUr - - - - - - - - - - diff --git a/doxygen-custom.css b/doxygen-custom.css index 4a3c469..7d56191 100644 --- a/doxygen-custom.css +++ b/doxygen-custom.css @@ -1,166 +1,3 @@ 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 d6d0679..1402220 100644 --- a/doxygen.css +++ b/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.11.0*/ +/* The standard CSS for doxygen 1.9.6*/ html { /* page base colors */ @@ -39,9 +39,7 @@ html { --icon-background-color: #728DC1; --icon-foreground-color: white; ---icon-doc-image: url('doc.svg'); ---icon-folder-open-image: url('folderopen.svg'); ---icon-folder-closed-image: url('folderclosed.svg'); +--icon-doc-image: url('doc.png'); /* brief member declaration list */ --memdecl-background-color: #F9FAFC; @@ -102,7 +100,6 @@ 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; @@ -128,7 +125,6 @@ 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; @@ -145,7 +141,6 @@ 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; @@ -153,15 +148,10 @@ 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: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-monospace: 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; @@ -169,28 +159,6 @@ 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 { @@ -232,9 +200,7 @@ html.dark-mode { --icon-background-color: #334975; --icon-foreground-color: #C4CFE5; ---icon-doc-image: url('docd.svg'); ---icon-folder-open-image: url('folderopend.svg'); ---icon-folder-closed-image: url('folderclosedd.svg'); +--icon-doc-image: url('docd.png'); /* brief member declaration list */ --memdecl-background-color: #0B101A; @@ -295,7 +261,6 @@ 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; @@ -321,15 +286,14 @@ 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: #C0C0C0; ---code-vhdl-keyword-color: #CF53C9; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; --code-vhdl-logic-color: #FF0000; --code-link-color: #79C0FF; --code-external-link-color: #79C0FF; --fragment-foreground-color: #C9D1D9; ---fragment-background-color: #090D16; +--fragment-background-color: black; --fragment-border-color: #30363D; --fragment-lineno-border-color: #30363D; --fragment-lineno-background-color: black; @@ -338,7 +302,6 @@ 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; @@ -346,15 +309,10 @@ 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: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-monospace: 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; @@ -362,28 +320,6 @@ 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 { @@ -401,6 +337,8 @@ 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%; @@ -533,12 +471,6 @@ 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; @@ -598,13 +530,7 @@ a { } a:hover { - 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); + text-decoration: underline; } a.el { @@ -655,24 +581,7 @@ 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; } @@ -697,70 +606,37 @@ ul.multicol { .fragment { text-align: left; direction: ltr; - overflow-x: auto; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ 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 { - 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; + 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; overflow: auto; - fill: var(--fragment-foreground-color); - justify-content: center; - align-items: center; - cursor: pointer; -} - -.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); + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: var(--font-family-monospace); + font-size: 105%; } -.clipboard.success { - border-color: var(--fragment-copy-ok-color); +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); } div.line { font-family: var(--font-family-monospace); font-size: 13px; min-height: 13px; - line-height: 1.2; + line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ @@ -793,18 +669,6 @@ 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; @@ -876,6 +740,10 @@ img.light-mode-visible { display: none; } +img.formulaDsp { + +} + img.formulaInl, img.inline { vertical-align: middle; } @@ -938,10 +806,6 @@ span.charliteral { color: var(--code-char-literal-color); } -span.xmlcdata { - color: var(--code-xml-cdata-color); -} - span.vhdldigit { color: var(--code-vhdl-digit-color); } @@ -1175,25 +1039,17 @@ 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 .paramdefval { - font-family: var(--font-family-monospace); +.paramname code { + line-height: 14px; } .params, .retval, .exception, .tparams { @@ -1364,7 +1220,8 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:var(--icon-folder-open-image); + background-image:url('folderopen.png'); + background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -1374,7 +1231,8 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:var(--icon-folder-closed-image); + background-image:url('folderclosed.png'); + background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -1527,6 +1385,7 @@ table.fieldtable { { height:32px; display:block; + text-decoration: none; outline: none; color: var(--nav-text-normal-color); font-family: var(--font-family-nav); @@ -1615,8 +1474,7 @@ 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; @@ -1629,7 +1487,7 @@ dl.note { border-color: #D0C000; } -dl.warning, dl.attention, dl.important { +dl.warning, dl.attention { margin-left: -7px; padding-left: 3px; border-left: 4px solid; @@ -1671,103 +1529,8 @@ 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: 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); + margin-bottom: 6px; } @@ -1782,12 +1545,12 @@ dl.invariant dt, dl.pre dt, dl.post dt { vertical-align: bottom; border-collapse: separate; } - + #projectlogo img -{ +{ border: 0px none; } - + #projectalign { vertical-align: middle; @@ -1888,7 +1651,7 @@ div.toc { } div.toc li { - background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 var(--font-family-toc); margin-top: 5px; padding-left: 10px; @@ -1917,11 +1680,11 @@ div.toc li.level2 { } div.toc li.level3 { - margin-left: 15px; + margin-left: 30px; } div.toc li.level4 { - margin-left: 15px; + margin-left: 45px; } span.emoji { diff --git a/doxygen.svg b/doxygen.svg index 79a7635..d42dad5 100644 --- a/doxygen.svg +++ b/doxygen.svg @@ -1,6 +1,4 @@ - @@ -19,7 +17,7 @@ - + diff --git a/doxygen_crawl.html b/doxygen_crawl.html deleted file mode 100644 index e096f69..0000000 --- a/doxygen_crawl.html +++ /dev/null @@ -1,108 +0,0 @@ - - - -Validator / crawler helper - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dynsections.js b/dynsections.js index 8985f42..1f4cd14 100644 --- a/dynsections.js +++ b/dynsections.js @@ -22,181 +22,106 @@ @licend The above is the entire license notice for the JavaScript code in this file */ - -function toggleVisibility(linkObj) { - return dynsection.toggleVisibility(linkObj); +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; } -let dynsection = { - - // helper function - updateStripes : function() { - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); - $('table.directory tr'). - removeClass('odd').filter(':visible:odd').addClass('odd'); - }, - - toggleVisibility : function(linkObj) { - const base = $(linkObj).attr('id'); - const summary = $('#'+base+'-summary'); - const content = $('#'+base+'-content'); - const trigger = $('#'+base+'-trigger'); - const 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; - }, - - toggleLevel : function(level) { - $('table.directory tr').each(function() { - const l = this.id.split('_').length-1; - const i = $('#img'+this.id.substring(3)); - const 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); - }); - }, -}; +function toggleInherit(id) +{ + var rows = $('tr.inherit.'+id); + var img = $('tr.inherit_header.'+id+' img'); + var src = $(img).attr('src'); + if (rows.filter(':first').is(':visible')===true) { + rows.css('display','none'); + $(img).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + rows.css('display','table-row'); // using show() causes jump in firefox + $(img).attr('src',src.substring(0,src.length-10)+'open.png'); + } +} /* @license-end */ -$(function() { +$(document).ready(function() { $('.code,.codeRef').each(function() { $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html()); $.fn.powerTip.smartPlacementLists.s = [ 's', 'n', 'ne', 'se' ]; diff --git a/examples.html b/examples.html index 57d10e1..1ac6194 100644 --- a/examples.html +++ b/examples.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Examples - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
-
diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index c15a1650af557d6ec815ebd7c0b5dbf5cc080676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmc(iTT@%t8HTmbTLO|^B{RuQF8dF1+sS`u|3GnV5NCurSYW$$;sBD+2}$S-;$VR> z*!ajn#&(=Z-R9)9?o6jMz3hMR?3p+3S{oE}NPB1FS+=ab*Lv3Xt?zxmg~y}t&nKUF z#NVEqzwvlJ@OV7G<=|JI-*JfVf9*%_oqePG=NxOG=-7*E4&Qs5*y0{Sc65_ zxlNG&Hiskmy>qbo^6(~C-zHnIT>f|pwm%O$@s9XCv#@)!u;VN5EPkUm0$=F}T^rw^ ztNIsoZoNdu_Fv(<{|df4-@&){J-iQofcMdlu=iiVKKcpP@jqZae+~1+KVf~%!O!A5 z@ytGW<-WVeIh-rj=-By|YyM5H-Bo=lSZ@9qKkEQ`ZwR`70s5r^^noa}p%}E`IJD6O zw6P@AiyYU=P^VH*gJ~!;87Nmct}Q{ip5@57|DQ?A=kmRYMLACka1F7}bP?KMOs=o@ zM;+=_PX@TIokOW%Sw zvkmXkHtg(e>T(BmVHb9B7gqTWtd+a4Dtj>3?!nyPsNRRU^}rqC^G%NRd$3mdPLc15 zIVH{)Yvj3B?l#xv$ZR{pdzb@w&o9CE4(d;vNQ)ehpM^JGdF%DB`R85!g*N;TKZNI_ zkN)@g_+xlfwQ=A7Z_ep+`j6H(?=T0jdvXo&E1!Of_iO*6MqZ+mTItxL79YQcZ@#%bpF{=GSp2O#yGWf zeG{tOLlpYlohJS?w5=EPfkpDk{E|AIt3r$3fp%q?{20{HD6H_~6Mo3iE-t$Lr-}bw z_9^`+Og~tHcc%tBwGK0}0c-s(%=n&MOaF2gdh~4kA#YnIhK68uM8{R#LpfxpY+Dh z+wj+(F@EwlUo`T=cxif5P|rOD%lw68WPs7}svM z#ILWCe}(+DC$0R%BbT2zkms)sh9%z|DuMT}Mt+*}d&2PcH1W@M!^>yd2>DmHTlp(b zpNB>59b*6g9nA0mG+#9l*2tQ|iD?}cJx{DPl4;a_gUFCRu zWD*AX+T^sOlFuB#94*WGKE3~)p1*M+1mAh`WBGb+RPud`HTppm=FF{@_>JNd>Ym!; zeWJPkv<&NSiu}xx8~-r*!K~D_&{qSWXDs=DDzx&GNAxA~gVa`2{Tq4mZ?IPv4qN%z z1E`l4VPtDAe2Ja_E zj$T0jQ)jY{Ivjy#wjQqg`n3Lou8uf21kx#$XmfG-(hw^NU!U=zr z@sE%{u|obvL;kyj|I&Ya=jaX1@kdYi4MCCGTBh4PRd*G;oA7EbCm-WjP*UV5e){wX-s{!`du_%ma8@`Btwsg{)*Btd)N$i0=nYm#ds>5Oa%ew~qyEe{! z_VI2q%(F?A>v2dH{UK;m8F@bt9!f8B=ZhX6Ab+6^zarvKLJ7v9d{JLbCpQx%!9SJ6*+RygSpod4H6581`|My-fOPFvIm? ij#+u`=)qupp7^Zoy>yf-DMy)(JIbZl8`j1<{rMRY83?oh diff --git a/folderclosed.png b/folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..bb8ab35edce8e97554e360005ee9fc5bffb36e66 GIT binary patch literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000 - - - - - - - - - diff --git a/folderclosedd.svg b/folderclosedd.svg deleted file mode 100644 index 52f0166..0000000 --- a/folderclosedd.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/folderopen.png b/folderopen.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c7f676a3b3ef8c2c307d319dff3c6a604eb227 GIT binary patch literal 597 zcmV-b0;>IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA literal 0 HcmV?d00001 diff --git a/folderopen.svg b/folderopen.svg deleted file mode 100644 index f6896dd..0000000 --- a/folderopen.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/folderopend.svg b/folderopend.svg deleted file mode 100644 index 2d1f06e..0000000 --- a/folderopend.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/functions.html b/functions.html index ca14dd3..28a5a19 100644 --- a/functions.html +++ b/functions.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Class Members - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + -
-
-
Here is a list of all class members with links to the classes they belong to:
-
diff --git a/functions_func.html b/functions_func.html index 58573f4..95ab915 100644 --- a/functions_func.html +++ b/functions_func.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Class Members - Functions - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + - -
-
-
Here is a list of all functions with links to the classes they belong to:
-
diff --git a/functions_vars.html b/functions_vars.html index 9e1cf44..6799a1c 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Class Members - Variables - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + -
-
-
-
Here is a list of all variables with links to the classes they belong to:
-
diff --git a/index.html b/index.html index 353b834..d5fce66 100644 --- a/index.html +++ b/index.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: RF24Gateway - - - - - @@ -28,7 +23,7 @@ -
RF24Gateway - TCP/IP over RF24Network v2.1.0 +
RF24Gateway - TCP/IP over RF24Network v1.1.1
TMRh20 - Pushing the practical limits of RF24 modules
@@ -37,35 +32,24 @@
- + -
-
-
-
RF24Gateway
+
-

-

RF24Gateway is a library style replacement for the standalone RF24toTUN application, used with RF24Ethernet.

-

In addition to passing TCP/IP payloads to a network interface, RF24Gateway also allows users to send and receive standard RF24Network payloads.

+

+

RF24Gateway is a library style replacement for the standalone RF24toTUN application, used with RF24Ethernet.

+

In addition to passing TCP/IP payloads to a network interface, RF24Gateway also allows users to send and receive standard RF24Network payloads.

This allows users to deploy and manage hybrid networks, consisting of nodes communicating via TCP/IP and RF24Network Messages

-

-News - 2023 API Changes

-

Introducing RF24Network, RF24Mesh & RF24Gateway 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;
    - - -
  • -
  • Third party libs should also be able to use the backward-compatible typedef in their template: -
  • -
  • 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.
  • -
-

+

Installation

See http://nRF24.github.io/RF24 for installation instructions using the installer, or clone the RF24 libs and run 'make install' for each one.

-

After running the installer, RF24Gateway will be installed at rf24libs/RF24Gateway. Examples are included for operating the gateway as well as client scripts & programs to control nodes via http requests.

-

Note: RF24Gateway is tested with and defaults to using RF24Mesh. Sensor nodes must also use RF24Mesh or be statically assigned within RF24Mesh.

-

See http://nRF24.github.io/RF24Ethernet/ for related documentation for use with RF24Gateway.

-

+

After running the installer, RF24Gateway will be installed at rf24libs/RF24Gateway. Examples are included for operating the gateway as well as client scripts & programs to control nodes via http requests.

+

Note: RF24Gateway is tested with and defaults to using RF24Mesh. Sensor nodes must also use RF24Mesh or be statically assigned within RF24Mesh.

+

See http://nRF24.github.io/RF24Ethernet/ for related documentation for use with RF24Gateway.

+

How It Works

-

RF24Gateway is relatively simple in design, and uses the Universal TUN/TAP driver for Linux

+

RF24Gateway is relatively simple in design, and uses the Universal TUN/TAP driver for Linux

Data incoming from the RF24 communication stack (designated as external data) is passed to the interface without modification. Conversely, incoming TCP/IP or other data received on the TUN/TAP interface is passed directly into the radio network and designated as external data.

-

Linux devices running RF24Gateway can establish network links using the built-in TCP/IP stack, and users can include Arduino/AVR devices or additional RPi devices to automatically extend the wireless range.

+

Linux devices running RF24Gateway can establish network links using the built-in TCP/IP stack, and users can include Arduino/AVR devices or additional RPi devices to automatically extend the wireless range.

Arduino/AVR devices, etc must utilize a software IP stack such as uIP.

-

+

Simple Configuration

In the standard configuration, a single Linux/RF24Gateway node is used to provide connectivity to one or more Arduino nodes running RF24Ethernet. In this case the master node could be configured with IP 10.1.3.1 netmask 255.255.255.0 and nodeID 0 The remaining Arduino nodes can used nodeIDs 2-253, and would be assigned IP addresses 10.1.3.2-253 and netmask 255.255.255.0

If there are problems starting the examples, the following commands can be run to configure the interface:

@@ -157,9 +114,9 @@

sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -j MASQUERADE

See http://nRF24.github.io/RF24Ethernet/ConfigAndSetup.html for more info

-

+

Advanced Configuration

-

In a more advanced configuration, users can use two or more nodes running RF24Gateway together, along with Arduino Nodes running RF24Ethernet In this case the master node could be configured differently with IP 10.1.3.1 netmask 255.255.0.0 and nodeID 0 The child RPi2 node could be assigned IP 10.1.3.33 netmask 255.255.0.0 and nodeID 33 Another device, lets say usb0 connected to the child RPi2 node is assigned IP 10.1.5.1 netmask 255.255.255.0

+

In a more advanced configuration, users can use two or more nodes running RF24Gateway together, along with Arduino Nodes running RF24Ethernet In this case the master node could be configured differently with IP 10.1.3.1 netmask 255.255.0.0 and nodeID 0 The child RPi2 node could be assigned IP 10.1.3.33 netmask 255.255.0.0 and nodeID 33 Another device, lets say usb0 connected to the child RPi2 node is assigned IP 10.1.5.1 netmask 255.255.255.0

In this configuration, connectivity between all nodes in the mesh would be established, but a routing table is needed to include attached and internet devices.

To fully enable routing beyond the RPi devices, a routing table needs to be added to the Master node:

    @@ -167,17 +124,17 @@

  1. Edit the file accordingly
  2. Restart the gateway example to reload routing info
-

+

Network Configuration Example

Local WiFi/Ethernet Network (Windows,Linux,RPi devices etc) - 10.10.1.0 - 255.255.255.0 ( 10.10.1.x network )
RPi devices (tun_nrf24 interfaces & all connected devices) - 10.1.0.0 - 255.255.0.0 ( 10.1.x.x network )

-

+

Explanation

-

The RF24Gateway/RF24Mesh network supports about 253 hosts. I setup the RF24Gateway and all associated devices with a much larger subnet in this config to encompass all devices directly accessible via the RF24Gateway network.

+

The RF24Gateway/RF24Mesh network supports about 253 hosts. I setup the RF24Gateway and all associated devices with a much larger subnet in this config to encompass all devices directly accessible via the RF24Gateway network.

ie: RPi master 10.1.3.1/16, RPi2 child 10.1.3.33/16, RPi2 child usb0 10.1.5.1/24

-

+

Routing Configuration

-

In the RF24Gateway example working directory, create a file "routing.txt". Add routing entries in a standard kind of format:

+

In the RF24Gateway example working directory, create a file "routing.txt". Add routing entries in a standard kind of format:

IP<space>NetMask<space>Gateway

Example routing.txt file:

    @@ -187,11 +144,11 @@

  • Traffic for 10.1.4.x will use 10.1.3.34 as the gateway

    10.1.4.0 255.255.255.0 10.1.3.34
  • -
  • Traffic not in the RF24Gateway network will be sent via 10.10.3.33 by default

    +
  • Traffic not in the RF24Gateway network will be sent via 10.10.3.33 by default

    0.0.0.0 0.0.0.0 10.10.3.33
-

+

Additional Routing Configuration

You can specify any combination of IP/Netmask in the routing.txt file to create unique subnets for routing traffic.

Examples are:

@@ -205,17 +162,15 @@

  • Traffic for 10.1.5.(65-94) will use 10.1.3.35 as the gateway

    10.1.5.64 255.255.255.224 10.1.3.35
  • -
  • Traffic not in the RF24Gateway network will be sent via 10.10.3.32 by default

    +
  • Traffic not in the RF24Gateway network will be sent via 10.10.3.32 by default

    0.0.0.0 0.0.0.0 10.10.3.32
  • -
    -
    diff --git a/md_CHANGELOG.html b/md_CHANGELOG.html new file mode 100644 index 0000000..412b1fd --- /dev/null +++ b/md_CHANGELOG.html @@ -0,0 +1,311 @@ + + + + + + + +RF24Gateway - TCP/IP over RF24Network: Changelog + + + + + + + + + + + +
    +
    + + + + + + +
    +
    RF24Gateway - TCP/IP over RF24Network v1.1.1 +
    +
    TMRh20 - Pushing the practical limits of RF24 modules
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    Changelog
    +
    +
    +

    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/RF24Gateway/compare/v1.1.0...v1.1.1" >1.1.1</a> - 2024-10-06

    +

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

    +
      +
    • Enable building IRQ-based examples in 17834a4
    • +
    +

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

    +
      +
    • Change DEBUG_LEVEL into RF24GATEWAY_DEBUG_LEVEL in 2983da0
    • +
    +

    Full commit diff: v1.1.0...v1.1.1

    +

    +<a href="https://github.com/nRF24/RF24Gateway/compare/v1.0.4...v1.1.0" >1.1.0</a> - 2024-06-11

    +

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

    +
      +
    • Simplify interrupt handling in 9fb4e28
    • +
    +

    +<!-- 8 --> 📝 Documentation

    +
      +
    • Manually trigger docs CI by @2bndy5 in 308ced6
    • +
    • Doc updates and reusable CI by @2bndy5 in #24
    • +
    +

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

    +
      +
    • Update RF24Gateway_ncurses.cpp in ea6e953
    • +
    • 1.x update clang format in 099fb39
    • +
    • Comment out setStaticAddress in be07b9f
    • +
    +

    Full commit diff: v1.0.4...v1.1.0

    +

    +<a href="https://github.com/nRF24/RF24Gateway/compare/v1.0.3...v1.0.4" >1.0.4</a> - 2022-06-24

    +

    +<!-- 1 --> 🚀 Added

    +
      +
    • Add user packets counter by @TMRh20 in 6cccf88
    • +
    • Add label by @TMRh20 in 28002fb
    • +
    • Add to interrupt example by @TMRh20 in 6c11bff
    • +
    • Add images by @TMRh20 in e656ba2
    • +
    • Add better image by @TMRh20 in ec0da50
    • +
    • Merge pull request #22 from nRF24/topology by @TMRh20 in #22
    • +
    • Add clang-format config by @2bndy5 in c9ac4d9
    • +
    +

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

    +
      +
    • Adjust RF24Pad by @TMRh20 in 75346fc
    • +
    • [cmake] link examples to pigpio if detected by @2bndy5 in 9bf626f
    • +
    • Forgot about the sniffer example by @2bndy5 in d8948f0
    • +
    • [cmake] build examples w/ a specified driver by @2bndy5 in ae80da8
    • +
    • Skip build irq examples for mraa/wiringPi by @2bndy5 in 9561200
    • +
    • -DRF24_NO_IRQ when no pigpio while building lib by @2bndy5 in 01a6164
    • +
    • Allow RF24_NO_IRQ for building examples by @2bndy5 in 0f8711f
    • +
    • Only build irq examples when able by @2bndy5 in 67b4f70
    • +
    • Merge branch 'pigpio-support' by @TMRh20 in 3f06838
    • +
    • Linux CI use master branch of RF24 by @2bndy5 in 88fb4c1
    • +
    • Draw topology in ncurses example by @TMRh20 in 3abe2b4
    • +
    • Word wrapping by @TMRh20 in 490d832
    • +
    • Make CI use clang-format by @2bndy5 in 6fde253
    • +
    • Ran clang-format on al C++ sources by @2bndy5 in 2445bd1
    • +
    • Ignore long inline conditions by @2bndy5 in 5a4e8f7
    • +
    • Merge pull request #23 from nRF24/clang-format by @TMRh20 in #23
    • +
    +

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

    +

    +<a href="https://github.com/nRF24/RF24Gateway/compare/v1.0.2...v1.0.3" >1.0.3</a> - 2021-11-21

    +

    +<!-- 1 --> 🚀 Added

    +
      +
    • Add License; CMake builds this fine locally by @2bndy5 in 0b4542b
    • +
    • Add linux_build CI by @2bndy5 in 0da85b4
    • +
    • Merge pull request #18 from nRF24/CMake-4-Linux by @TMRh20 in #18
    • +
    +

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

    +
      +
    • That worked; remove debug prompts by @2bndy5 in ee7b259
    • +
    • [cmake] remove old STRIP cmds by @2bndy5 in d0d12d7
    • +
    +

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

    +
      +
    • Fix examples compilation by @TMRh20 in 1cefcdb
    • +
    +

    +<!-- 8 --> 📝 Documentation

    +
      +
    • [CI] use RF24* master; save doc builds as artifact by @2bndy5 in f35b293
    • +
    +

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

    +
      +
    • Oops! c-n-p much? by @2bndy5 in 8c50a95
    • +
    • [LinuxCI] forgot the "with:" line by @2bndy5 in 9df2a8f
    • +
    • Linux FS is case sensitive by @2bndy5 in c610e09
    • +
    • This will fail in CI; I need to debug it more by @2bndy5 in 5def5e4
    • +
    • Use regex to detect if returned url ends with .git by @2bndy5 in 5109a13
    • +
    • Better regex pattern by @2bndy5 in eabc7af
    • +
    • Show me what git describe returns on GH runner by @2bndy5 in 6a91d3f
    • +
    • Try with fetch-depth = 0 by @2bndy5 in 4a05041
    • +
    • [no ci] rename workflow assets DL file by @2bndy5 in c396585
    • +
    • [no ci] code fmt; prep rename casing of READMEs by @2bndy5 in 029709e
    • +
    • Rename READMEs in uppercase by @2bndy5 in 2b56b88
    • +
    • Clean up linux CI workflow by @2bndy5 in 4309008
    • +
    • [no ci] add a comment by @2bndy5 in 26960fb
    • +
    • Update CONTRIBUTING.md by @2bndy5 in a76581d
    • +
    • Manually trigger CI workflows by @2bndy5 in b3cb626
    • +
    • Gimme that badge by @2bndy5 in 461cb2c
    • +
    • Use CMake CLI to change debugging level by @2bndy5 in 501d9ea
    • +
    • Limit Doxygen CI trigger during open PR by @2bndy5 in 9ea06ee
    • +
    • Update mqttLogger.py by @2bndy5 in fecc698
    • +
    • Adjust mesh display by @TMRh20 in 49ea85e
    • +
    +

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

    +

    +<a href="https://github.com/nRF24/RF24Gateway/compare/v1.0.1...v1.0.2" >1.0.2</a> - 2021-03-31

    +

    +<!-- 8 --> 📝 Documentation

    +
      +
    • Docs abstraction & code formating by @2bndy5 in #17
    • +
    +

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

    +

    +<a href="https://github.com/nRF24/RF24Gateway/compare/v1.0.0...v1.0.1" >1.0.1</a> - 2020-11-29

    +

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

    +
      +
    • Fix warnings by @2bndy5 in 87b4ae6
    • +
    +

    +<!-- 8 --> 📝 Documentation

    +
      +
    • Redirect doc links to nRF24 org by @2bndy5 in a076209
    • +
    • Merge pull request #15 from 2bndy5/master by @TMRh20 in #15
    • +
    +

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

    +
      +
    • Edit doxyfile OUTPUT_DIR & add workflow by @2bndy5 in 451a08e
    • +
    • Format doxygen css file & include latest changes by @2bndy5 in 92a4a71
    • +
    • Only run doxygen on master branch by @2bndy5 in 511fefc
    • +
    +

    Full commit diff: v1.0.0...v1.0.1

    +

    +<a href="https://github.com/nRF24/RF24Gateway/compare/077eb338ecc8e3454973804e8d9b957ebf081868...v1.0.0" >1.0.0</a> - 2020-08-13

    +

    +<!-- 1 --> 🚀 Added

    +
      +
    • Add missing include to example by @TMRh20 in 78e716a
    • +
    • Add delay for latest RF24Network changes by @TMRh20 in 3f3caf5
    • +
    • Add interrupt code by @TMRh20 in 50a037d
    • +
    • Address renewal improvements by @TMRh20 in 21373ca
    • +
    • Add initial code of simple python logger by @TMRh20 in 684cd1a
    • +
    • Add RF24Network sniffer by @TMRh20 in 625aebd
    • +
    • Add routing functionality by @TMRh20 in 70644f0
    • +
    • Add failure recovery to examples by @TMRh20 in d4455dd
    • +
    +

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

    +
      +
    • Update interrupt code by @TMRh20 in 68477bc
    • +
    • Remove unneeded delay, fix non-interrupt version by @TMRh20 in ed44440
    • +
    • Update RF24Gateway.cpp by @TMRh20 in 874f771
    • +
    • Use radio masking of IRQs by @TMRh20 in 1d0686e
    • +
    • Interrupt fix: Examples by @TMRh20 in 85d4591
    • +
    • Reliabiity fixes by @TMRh20 in 3508adc
    • +
    +

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

    +
      +
    • Fix ncurses example, channel setting with RF24Mesh by @TMRh20 in fd3e767
    • +
    • Broken comms for nodes w/16-bit addresses by @TMRh20 in 68dc95d
    • +
    • Fix ncurses keyboard controls/inputs with SPIDEV by @TMRh20 in afe76e0
    • +
    • Fix/Update address renewal for ncurses interfaces by @TMRh20 in 9a38f5d
    • +
    • Fix broken ncurses example by @TMRh20 in 7757e07
    • +
    • Fix for last update by @TMRh20 in 5530c4e
    • +
    • Fix stability probs using interrupts by @TMRh20 in 2116017
    • +
    • Fix node list printout by @TMRh20 in aeee05b
    • +
    • Bad memory leak by @TMRh20 in 6e0506c
    • +
    • Missing address requests by @TMRh20 in 6505d3c
    • +
    +

    +<!-- 8 --> 📝 Documentation

    +
      +
    • Update .h file (doc changes) by @TMRh20 in 0b8c5b2
    • +
    • Routing files & doc by @TMRh20 in 307db39
    • +
    • Minor doc fix by @TMRh20 in dff739c
    • +
    • Minor fix & doc update by @TMRh20 in 207c960
    • +
    +

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

    +
      +
    • :confetti_ball: Added .gitattributes by @TMRh20 in 077eb33
    • +
    • Creation of RF24Gateway library by @TMRh20 in 2ebf603
    • +
    • Drop packets if writing to network interface fails by @TMRh20 in 23cc843
    • +
    • Update for latest RF24Network_Dev changes by @TMRh20 in 47f8963
    • +
    • Enable IP config internally, add NCurses example by @TMRh20 in a3235a8
    • +
    • Minor changes, Add client examples, Update examples by @TMRh20 in 342203e
    • +
    • Rem int handling code from non-interrupt example by @TMRh20 in b7ccb68
    • +
    • Mask radio tx irqs for interrupt examples by @TMRh20 in d097b70
    • +
    • Further modifications for interrupt testing by @TMRh20 in 159c098
    • +
    • Merge remote-tracking branch 'refs/remotes/origin/Interrupts' by @TMRh20 in bde1eda
    • +
    • RPI2 autodetection by @yozik04 in 4b6f6fd
    • +
    • Merge pull request #6 from yozik04/master by @TMRh20 in 82b89b3
    • +
    • Lower cpu usage on non-interrupt examples by @TMRh20 in 31f6603
    • +
    • Revert change: breaks application by @TMRh20 in fb36bd2
    • +
    • RPi Bugfix: Interrupts & ncursesInt example update by @TMRh20 in bc6b671
    • +
    • NcursesInt revert pins, adjust gw.poll placement by @TMRh20 in 7db01a1
    • +
    • Output of data via UDP + create WireShark dissector by @TMRh20 in 32c70bf
    • +
    • Minor Fixes & Cleanup by @TMRh20 in c0a57ed
    • +
    • Err, count var needs to be 16-bit by @TMRh20 in 1acd057
    • +
    • Forgot the channel again... by @TMRh20 in 81c7627
    • +
    • Forgot to re-enable interrupts by @TMRh20 in 930fac3
    • +
    +

    Full commit diff: 077eb33...v1.0.0

    +

    +New Contributors

    +
      +
    • @yozik04 made their first contribution
    • +
    +
    +
    + + + + diff --git a/md_CONTRIBUTING.html b/md_CONTRIBUTING.html index e8bc417..c4e71cf 100644 --- a/md_CONTRIBUTING.html +++ b/md_CONTRIBUTING.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: CONTRIBUTING - - - - - @@ -28,7 +23,7 @@ -
    RF24Gateway - TCP/IP over RF24Network v2.1.0 +
    RF24Gateway - TCP/IP over RF24Network v1.1.1
    TMRh20 - Pushing the practical limits of RF24 modules
    @@ -37,33 +32,23 @@
    - + - -
    -
    -
    CONTRIBUTING
    +
    CONTRIBUTING
    -

    These are the current requirements for getting your code included in RF24Gateway:

    +

    These are the current requirements for getting your code included in RF24Gateway:

    -
    diff --git a/menu.js b/menu.js index 0fd1e99..b0b2693 100644 --- a/menu.js +++ b/menu.js @@ -22,14 +22,15 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { function makeTree(data,relPath) { - let result=''; + var result=''; if ('children' in data) { result+='
      '; - for (let i in data.children) { - let url; - const link = data.children[i].url; + for (var i in data.children) { + var url; + var link; + link = data.children[i].url; if (link.substring(0,1)=='^') { url = link.substring(1); } else { @@ -43,7 +44,7 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { } return result; } - let searchBoxHtml; + var searchBoxHtml; if (searchEnabled) { if (serverSide) { searchBoxHtml='
      '+ @@ -87,28 +88,29 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { if (searchBoxHtml) { $('#main-menu').append('
    • '); } - const $mainMenuState = $('#main-menu-state'); - let prevWidth = 0; + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; if ($mainMenuState.length) { - const initResizableIfExists = function() { - if (typeof initResizable==='function') initResizable(treeview); + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); } // animate mobile menu - $mainMenuState.change(function() { - const $menu = $('#main-menu'); - let options = { duration: 250, step: initResizableIfExists }; + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; if (this.checked) { - options['complete'] = () => $menu.css('display', 'block'); + options['complete'] = function() { $menu.css('display', 'block') }; $menu.hide().slideDown(options); } else { - options['complete'] = () => $menu.css('display', 'none'); + options['complete'] = function() { $menu.css('display', 'none') }; $menu.show().slideUp(options); } }); // set default menu visibility - const resetState = function() { - const $menu = $('#main-menu'); - const newWidth = $(window).outerWidth(); + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); if (newWidth!=prevWidth) { if ($(window).outerWidth()<768) { $mainMenuState.prop('checked',false); $menu.hide(); diff --git a/minus.svg b/minus.svg deleted file mode 100644 index f70d0c1..0000000 --- a/minus.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/minusd.svg b/minusd.svg deleted file mode 100644 index 5f8e879..0000000 --- a/minusd.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/navtree.css b/navtree.css deleted file mode 100644 index 69211d4..0000000 --- a/navtree.css +++ /dev/null @@ -1,149 +0,0 @@ -#nav-tree .children_ul { - margin:0; - padding:4px; -} - -#nav-tree ul { - list-style:none outside none; - margin:0px; - padding:0px; -} - -#nav-tree li { - white-space:nowrap; - margin:0px; - padding:0px; -} - -#nav-tree .plus { - margin:0px; -} - -#nav-tree .selected { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: var(--nav-text-active-color); - text-shadow: var(--nav-text-active-shadow); -} - -#nav-tree .selected .arrow { - color: var(--nav-arrow-selected-color); - text-shadow: none; -} - -#nav-tree img { - margin:0px; - padding:0px; - border:0px; - vertical-align: middle; -} - -#nav-tree a { - text-decoration:none; - padding:0px; - margin:0px; -} - -#nav-tree .label { - margin:0px; - padding:0px; - font: 12px var(--font-family-nav); -} - -#nav-tree .label a { - padding:2px; -} - -#nav-tree .selected a { - text-decoration:none; - color:var(--nav-text-active-color); -} - -#nav-tree .children_ul { - margin:0px; - padding:0px; -} - -#nav-tree .item { - margin:0px; - padding:0px; -} - -#nav-tree { - padding: 0px 0px; - font-size:14px; - overflow:auto; -} - -#doc-content { - overflow:auto; - display:block; - padding:0px; - margin:0px; - -webkit-overflow-scrolling : touch; /* iOS 5+ */ -} - -#side-nav { - padding:0 6px 0 0; - margin: 0px; - display:block; - position: absolute; - left: 0px; - width: $width; - overflow : hidden; -} - -.ui-resizable .ui-resizable-handle { - display:block; -} - -.ui-resizable-e { - background-image:var(--nav-splitbar-image); - background-size:100%; - background-repeat:repeat-y; - background-attachment: scroll; - cursor:ew-resize; - height:100%; - right:0; - top:0; - width:6px; -} - -.ui-resizable-handle { - display:none; - font-size:0.1px; - position:absolute; - z-index:1; -} - -#nav-tree-contents { - margin: 6px 0px 0px 0px; -} - -#nav-tree { - background-repeat:repeat-x; - background-color: var(--nav-background-color); - -webkit-overflow-scrolling : touch; /* iOS 5+ */ -} - -#nav-sync { - position:absolute; - top:5px; - right:24px; - z-index:0; -} - -#nav-sync img { - opacity:0.3; -} - -#nav-sync img:hover { - opacity:0.9; -} - -@media print -{ - #nav-tree { display: none; } - div.ui-resizable-handle { display: none; position: relative; } -} - diff --git a/nodeClient_8js-example.html b/nodeClient_8js-example.html index 3431fd4..ad3ee48 100644 --- a/nodeClient_8js-example.html +++ b/nodeClient_8js-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: nodeClient.js - - - - - @@ -28,7 +23,7 @@ -
      RF24Gateway - TCP/IP over RF24Network v2.1.0 +
      RF24Gateway - TCP/IP over RF24Network v1.1.1
      TMRh20 - Pushing the practical limits of RF24 modules
      @@ -37,35 +32,24 @@
      - + -
      -
      -
      nodeClient.js
      -

      Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with the sensor nodes.
      +

      Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with the sensor nodes.
      Example of on demand LED/Lighting control using a NodeJS script.

      var request = require('request')
      var url = 'http://10.10.2.4:1000/ON' // input your url here /ON to turn on and /OFF to turn off
      @@ -114,8 +98,7 @@
      -
    diff --git a/pages.html b/pages.html index d97f89d..c1a10ce 100644 --- a/pages.html +++ b/pages.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: Related Pages - - - - - @@ -28,7 +23,7 @@ -
    RF24Gateway - TCP/IP over RF24Network v2.1.0 +
    RF24Gateway - TCP/IP over RF24Network v1.1.1
    TMRh20 - Pushing the practical limits of RF24 modules
    @@ -37,35 +32,24 @@
    - + -
    -
    -
    Here is a list of all related documentation pages:
    -
    diff --git a/plus.svg b/plus.svg deleted file mode 100644 index 0752016..0000000 --- a/plus.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/plusd.svg b/plusd.svg deleted file mode 100644 index 0c65bfe..0000000 --- a/plusd.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/pyClient_8py-example.html b/pyClient_8py-example.html index 1059035..fad3991 100644 --- a/pyClient_8py-example.html +++ b/pyClient_8py-example.html @@ -3,17 +3,12 @@ - + RF24Gateway - TCP/IP over RF24Network: pyClient.py - - - - - @@ -28,7 +23,7 @@ -
    RF24Gateway - TCP/IP over RF24Network v2.1.0 +
    RF24Gateway - TCP/IP over RF24Network v1.1.1
    TMRh20 - Pushing the practical limits of RF24 modules
    @@ -37,35 +32,24 @@
    - + -
    -
    -
    pyClient.py
    -

    Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with the sensor nodes.
    +

    Once RF24Gateway and RF24Ethernet are configured, standard tools can be used to interact with the sensor nodes.
    Example of scheduled LED/Lighting control using a Python script.

    1#!/usr/bin/env python
    2"""
    @@ -169,8 +153,7 @@
    -
    diff --git a/resize.js b/resize.js deleted file mode 100644 index 7d8cdc7..0000000 --- a/resize.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - 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. - - @licend The above is the entire license notice for the JavaScript code in this file - */ - -function initResizable(treeview) { - let sidenav,navtree,content,header,footer,barWidth=6; - const RESIZE_COOKIE_NAME = ''+'width'; - - function resizeWidth() { - const sidenavWidth = $(sidenav).outerWidth(); - content.css({marginLeft:parseInt(sidenavWidth)+"px"}); - if (typeof page_layout!=='undefined' && page_layout==1) { - footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); - } - Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); - } - - function restoreWidth(navWidth) { - content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); - if (typeof page_layout!=='undefined' && page_layout==1) { - footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); - } - sidenav.css({width:navWidth + "px"}); - } - - function resizeHeight(treeview) { - const headerHeight = header.outerHeight(); - const windowHeight = $(window).height(); - let contentHeight; - if (treeview) - { - const footerHeight = footer.outerHeight(); - let navtreeHeight,sideNavHeight; - if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ - contentHeight = windowHeight - headerHeight - footerHeight; - navtreeHeight = contentHeight; - sideNavHeight = contentHeight; - } else if (page_layout==1) { /* DISABLE_INDEX=YES */ - contentHeight = windowHeight - footerHeight; - navtreeHeight = windowHeight - headerHeight; - sideNavHeight = windowHeight; - } - navtree.css({height:navtreeHeight + "px"}); - sidenav.css({height:sideNavHeight + "px"}); - } - else - { - contentHeight = windowHeight - headerHeight; - } - content.css({height:contentHeight + "px"}); - if (location.hash.slice(1)) { - (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); - } - } - - function collapseExpand() { - let newWidth; - if (sidenav.width()>0) { - newWidth=0; - } else { - const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); - newWidth = (width>250 && width<$(window).width()) ? width : 250; - } - restoreWidth(newWidth); - const sidenavWidth = $(sidenav).outerWidth(); - Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); - } - - header = $("#top"); - content = $("#doc-content"); - footer = $("#nav-path"); - sidenav = $("#side-nav"); - if (!treeview) { -// title = $("#titlearea"); -// titleH = $(title).height(); -// let animating = false; -// content.on("scroll", function() { -// slideOpts = { duration: 200, -// step: function() { -// contentHeight = $(window).height() - header.outerHeight(); -// content.css({ height : contentHeight + "px" }); -// }, -// done: function() { animating=false; } -// }; -// if (content.scrollTop()>titleH && title.css('display')!='none' && !animating) { -// title.slideUp(slideOpts); -// animating=true; -// } else if (content.scrollTop()<=titleH && title.css('display')=='none' && !animating) { -// title.slideDown(slideOpts); -// animating=true; -// } -// }); - } else { - navtree = $("#nav-tree"); - $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); - $(sidenav).resizable({ minWidth: 0 }); - } - $(window).resize(function() { resizeHeight(treeview); }); - if (treeview) - { - const device = navigator.userAgent.toLowerCase(); - const touch_device = device.match(/(iphone|ipod|ipad|android)/); - if (touch_device) { /* wider split bar for touch only devices */ - $(sidenav).css({ paddingRight:'20px' }); - $('.ui-resizable-e').css({ width:'20px' }); - $('#nav-sync').css({ right:'34px' }); - barWidth=20; - } - const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); - if (width) { restoreWidth(width); } else { resizeWidth(); } - } - resizeHeight(treeview); - const url = location.href; - const i=url.indexOf("#"); - if (i>=0) window.location.hash=url.substr(i); - const _preventDefault = function(evt) { evt.preventDefault(); }; - if (treeview) - { - $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); - $(".ui-resizable-handle").dblclick(collapseExpand); - } - $(window).on('load',resizeHeight); -} -/* @license-end */ diff --git a/search/all_0.js b/search/all_0.js index b948451..452bf20 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['2023_20api_20changes_0',['News - 2023 API Changes',['../index.html#autotoc_md1',1,'']]] + ['begin_0',['begin',['../classRF24Gateway.html#a9005d67e041ab3352cdd57ac358b6024',1,'RF24Gateway::begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)'],['../classRF24Gateway.html#a409e9363e3ed47bc111fa36eeb3ef67b',1,'RF24Gateway::begin(uint16_t address, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS, bool meshEnable=0, uint8_t nodeID=0)']]] ]; diff --git a/search/all_1.js b/search/all_1.js index 8fcf341..91230c0 100644 --- a/search/all_1.js +++ b/search/all_1.js @@ -1,6 +1,6 @@ var searchData= [ - ['additional_20routing_20configuration_0',['Additional Routing Configuration',['../index.html#autotoc_md9',1,'']]], - ['advanced_20configuration_1',['Advanced Configuration',['../index.html#autotoc_md5',1,'']]], - ['api_20changes_2',['News - 2023 API Changes',['../index.html#autotoc_md1',1,'']]] + ['changelog_0',['Changelog',['../md_CHANGELOG.html',1,'']]], + ['config_5ftun_1',['config_TUN',['../classRF24Gateway.html#ab5845650441bbb0e6dc6d46581a8defd',1,'RF24Gateway']]], + ['contributing_2',['CONTRIBUTING',['../md_CONTRIBUTING.html',1,'']]] ]; diff --git a/search/all_10.js b/search/all_10.js deleted file mode 100644 index 4ce7175..0000000 --- a/search/all_10.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['works_0',['How It Works',['../index.html#autotoc_md3',1,'']]] -]; diff --git a/search/all_2.js b/search/all_2.js index 6f552a6..c2f96f6 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['begin_0',['begin',['../classESBGateway.html#a63aa12d91a100713af306be07a091736',1,'ESBGateway::begin(uint8_t nodeID=0, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS)'],['../classESBGateway.html#a86d7e067cda97af1a810a42269c2e231',1,'ESBGateway::begin(uint16_t address, uint8_t channel=97, rf24_datarate_e data_rate=RF24_1MBPS, bool meshEnable=0, uint8_t nodeID=0)']]] + ['fifocleared_0',['fifoCleared',['../classRF24Gateway.html#ab1c6dca6e041f4b53d505be6ceedee76',1,'RF24Gateway']]] ]; diff --git a/search/all_3.js b/search/all_3.js index dbc9d8b..39622d0 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -1,8 +1,4 @@ var searchData= [ - ['changes_0',['News - 2023 API Changes',['../index.html#autotoc_md1',1,'']]], - ['config_5ftun_1',['config_TUN',['../classESBGateway.html#a0530f6b4fa80e1bb4632326e15dd8113',1,'ESBGateway']]], - ['configuration_2',['Configuration',['../index.html#autotoc_md9',1,'Additional Routing Configuration'],['../index.html#autotoc_md5',1,'Advanced Configuration'],['../index.html#autotoc_md8',1,'Routing Configuration'],['../index.html#autotoc_md4',1,'Simple Configuration']]], - ['configuration_20example_3',['Network Configuration Example',['../index.html#autotoc_md6',1,'']]], - ['contributing_4',['CONTRIBUTING',['../md_CONTRIBUTING.html',1,'']]] + ['gw_0',['gw',['../structRF24Gateway_1_1routeStruct.html#ab026ce6c7ca06f9d299065b5ca36b245',1,'RF24Gateway::routeStruct']]] ]; diff --git a/search/all_4.js b/search/all_4.js index 87d10dd..f0add3e 100644 --- a/search/all_4.js +++ b/search/all_4.js @@ -1,10 +1,6 @@ var searchData= [ - ['esbgateway_0',['ESBGateway',['../classESBGateway.html',1,'ESBGateway< mesh_t, network_t, radio_t >'],['../classESBGateway.html#a32e99edaeaad744ac078c89667fea97e',1,'ESBGateway::ESBGateway()']]], - ['esbmesh_1',['ESBMesh',['../classESBMesh.html',1,'']]], - ['esbmesh_3c_20esbnetwork_3c_20rf24_20_3e_2c_20rf24_20_3e_2',['ESBMesh< ESBNetwork< RF24 >, RF24 >',['../classESBMesh.html',1,'']]], - ['esbnetwork_3',['ESBNetwork',['../classESBNetwork.html',1,'']]], - ['esbnetwork_3c_20rf24_20_3e_4',['ESBNetwork< RF24 >',['../classESBNetwork.html',1,'']]], - ['example_5',['Network Configuration Example',['../index.html#autotoc_md6',1,'']]], - ['explanation_6',['Explanation',['../index.html#autotoc_md7',1,'']]] + ['ifdropped_0',['ifDropped',['../classRF24Gateway.html#a8b4479e126d180037f71f77f9aaf40c0',1,'RF24Gateway']]], + ['interrupts_1',['interrupts',['../classRF24Gateway.html#a318c35eb1ecce02e12062822e714d38c',1,'RF24Gateway']]], + ['ip_2',['ip',['../structRF24Gateway_1_1routeStruct.html#acc7b96511f6e94f2afef69a4c63679e0',1,'RF24Gateway::routeStruct']]] ]; diff --git a/search/all_5.js b/search/all_5.js index 01f6c50..e789459 100644 --- a/search/all_5.js +++ b/search/all_5.js @@ -1,4 +1,5 @@ var searchData= [ - ['fifocleared_0',['fifoCleared',['../classESBGateway.html#adfee55530c62d956bbe655909b57c6e5',1,'ESBGateway']]] + ['mask_0',['mask',['../structRF24Gateway_1_1routeStruct.html#a7742cff2aabb92931ee8828cbee2d68c',1,'RF24Gateway::routeStruct']]], + ['meshenabled_1',['meshEnabled',['../classRF24Gateway.html#a7dad81701804d1fb5cd55d0370d1a2df',1,'RF24Gateway']]] ]; diff --git a/search/all_6.js b/search/all_6.js index 3f03e23..d839120 100644 --- a/search/all_6.js +++ b/search/all_6.js @@ -1,4 +1,4 @@ var searchData= [ - ['gw_0',['gw',['../structESBGateway_1_1routeStruct.html#aa46d4e51c8c6d75066115b6614a25e34',1,'ESBGateway::routeStruct']]] + ['poll_0',['poll',['../classRF24Gateway.html#afd57521e1958f45b210888c9a957adb3',1,'RF24Gateway']]] ]; diff --git a/search/all_7.js b/search/all_7.js index cf7cdbc..9be0930 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -1,4 +1,7 @@ var searchData= [ - ['how_20it_20works_0',['How It Works',['../index.html#autotoc_md3',1,'']]] + ['rf24gateway_0',['RF24Gateway',['../index.html',1,'(Global Namespace)'],['../classRF24Gateway.html',1,'RF24Gateway'],['../classRF24Gateway.html#a939a9d63e37fb627847ebe70d4fb6043',1,'RF24Gateway::RF24Gateway(RF24 &_radio, RF24Network &_network, RF24Mesh &_mesh)']]], + ['routestruct_1',['routeStruct',['../structRF24Gateway_1_1routeStruct.html',1,'RF24Gateway']]], + ['routingstruct_2',['routingStruct',['../classRF24Gateway.html#aaac15d895072ec085e051ee9f4d60b48',1,'RF24Gateway']]], + ['routingtablesize_3',['routingTableSize',['../classRF24Gateway.html#a8f8bcb7aad7a40d882268cfb3d6a3090',1,'RF24Gateway']]] ]; diff --git a/search/all_8.js b/search/all_8.js index f15549e..19e3e74 100644 --- a/search/all_8.js +++ b/search/all_8.js @@ -1,8 +1,5 @@ var searchData= [ - ['ifdropped_0',['ifDropped',['../classESBGateway.html#a9a307c3c9e320944592a20d0587644bc',1,'ESBGateway']]], - ['installation_1',['Installation',['../index.html#autotoc_md2',1,'']]], - ['interrupts_2',['interrupts',['../classESBGateway.html#a30757aeb509a6eb1cbcb4dce84eae514',1,'ESBGateway']]], - ['ip_3',['ip',['../structESBGateway_1_1routeStruct.html#a55d3ef4a67bbe45aa3417c5fbae13cdb',1,'ESBGateway::routeStruct']]], - ['it_20works_4',['How It Works',['../index.html#autotoc_md3',1,'']]] + ['sendudp_0',['sendUDP',['../classRF24Gateway.html#a9128f60a993cc25b5abe89757b06350e',1,'RF24Gateway']]], + ['setip_1',['setIP',['../classRF24Gateway.html#a1dcb8921636e754ae4a7f21d59fcfb3e',1,'RF24Gateway']]] ]; diff --git a/search/all_9.js b/search/all_9.js index f91e603..86a69a9 100644 --- a/search/all_9.js +++ b/search/all_9.js @@ -1,5 +1,5 @@ var searchData= [ - ['mask_0',['mask',['../structESBGateway_1_1routeStruct.html#a77a1be906770ad3ceb94755d4601cf85',1,'ESBGateway::routeStruct']]], - ['meshenabled_1',['meshEnabled',['../classESBGateway.html#a0e89668c66169cc98d8398e54966f38e',1,'ESBGateway']]] + ['thisnodeaddress_0',['thisNodeAddress',['../classRF24Gateway.html#a1312aa864c8edbd44f7af75081e25caf',1,'RF24Gateway']]], + ['thisnodeid_1',['thisNodeID',['../classRF24Gateway.html#a33c259fdc8989208a39a2eeb5a1761de',1,'RF24Gateway']]] ]; diff --git a/search/all_a.js b/search/all_a.js index 271598c..2ac38cc 100644 --- a/search/all_a.js +++ b/search/all_a.js @@ -1,5 +1,4 @@ var searchData= [ - ['network_20configuration_20example_0',['Network Configuration Example',['../index.html#autotoc_md6',1,'']]], - ['news_202023_20api_20changes_1',['News - 2023 API Changes',['../index.html#autotoc_md1',1,'']]] + ['update_0',['update',['../classRF24Gateway.html#a91c25cc30c580baa4afac301fd9a0f00',1,'RF24Gateway']]] ]; diff --git a/search/all_b.js b/search/all_b.js deleted file mode 100644 index dc3a891..0000000 --- a/search/all_b.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['poll_0',['poll',['../classESBGateway.html#a3174228b62901c8575d8fb1905d4559e',1,'ESBGateway']]] -]; diff --git a/search/all_c.js b/search/all_c.js deleted file mode 100644 index c852bd2..0000000 --- a/search/all_c.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['rf24gateway_0',['RF24Gateway',['../index.html',1,'']]], - ['routestruct_1',['routeStruct',['../structESBGateway_1_1routeStruct.html',1,'ESBGateway']]], - ['routing_20configuration_2',['Routing Configuration',['../index.html#autotoc_md9',1,'Additional Routing Configuration'],['../index.html#autotoc_md8',1,'Routing Configuration']]], - ['routingstruct_3',['routingStruct',['../classESBGateway.html#a1a3e6c55fcc931364823fd09106befbd',1,'ESBGateway']]], - ['routingtablesize_4',['routingTableSize',['../classESBGateway.html#ae48103de27d41f7d5187a7c32463fde7',1,'ESBGateway']]] -]; diff --git a/search/all_d.js b/search/all_d.js deleted file mode 100644 index 5c1ebbf..0000000 --- a/search/all_d.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['sendudp_0',['sendUDP',['../classESBGateway.html#af1efe5211f53be4bade8c2e6be10d966',1,'ESBGateway']]], - ['setip_1',['setIP',['../classESBGateway.html#a16f0a977e0e77d894e555ace9999568d',1,'ESBGateway']]], - ['simple_20configuration_2',['Simple Configuration',['../index.html#autotoc_md4',1,'']]] -]; diff --git a/search/all_e.js b/search/all_e.js deleted file mode 100644 index f268585..0000000 --- a/search/all_e.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['thisnodeaddress_0',['thisNodeAddress',['../classESBGateway.html#a0f17365f6cce8bd10f05b8113b9f2180',1,'ESBGateway']]], - ['thisnodeid_1',['thisNodeID',['../classESBGateway.html#aa12a1cbda71c18074fc519d0dda025bf',1,'ESBGateway']]] -]; diff --git a/search/all_f.js b/search/all_f.js deleted file mode 100644 index c0131d1..0000000 --- a/search/all_f.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['update_0',['update',['../classESBGateway.html#aaf1214fabf2485bcffb30f9460c2e2b2',1,'ESBGateway']]] -]; diff --git a/search/classes_0.js b/search/classes_0.js index 6c14710..0040c0c 100644 --- a/search/classes_0.js +++ b/search/classes_0.js @@ -1,8 +1,5 @@ var searchData= [ - ['esbgateway_0',['ESBGateway',['../classESBGateway.html',1,'']]], - ['esbmesh_1',['ESBMesh',['../classESBMesh.html',1,'']]], - ['esbmesh_3c_20esbnetwork_3c_20rf24_20_3e_2c_20rf24_20_3e_2',['ESBMesh< ESBNetwork< RF24 >, RF24 >',['../classESBMesh.html',1,'']]], - ['esbnetwork_3',['ESBNetwork',['../classESBNetwork.html',1,'']]], - ['esbnetwork_3c_20rf24_20_3e_4',['ESBNetwork< RF24 >',['../classESBNetwork.html',1,'']]] + ['rf24gateway_0',['RF24Gateway',['../classRF24Gateway.html',1,'']]], + ['routestruct_1',['routeStruct',['../structRF24Gateway_1_1routeStruct.html',1,'RF24Gateway']]] ]; diff --git a/search/classes_1.js b/search/classes_1.js deleted file mode 100644 index dde857f..0000000 --- a/search/classes_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['routestruct_0',['routeStruct',['../structESBGateway_1_1routeStruct.html',1,'ESBGateway']]] -]; diff --git a/search/close.svg b/search/close.svg index 337d6cc..a933eea 100644 --- a/search/close.svg +++ b/search/close.svg @@ -1,14 +1,27 @@ - + + + + image/svg+xml + + + + + - + + + + image/svg+xml + + + + + - + + + + image/svg+xml + + + + + - + + sodipodi:docname="mag_sel.svg" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> + + + + image/svg+xml + + + + + + + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + inkscape:connector-curvature="0" /> diff --git a/search/mag_seld.svg b/search/mag_seld.svg index c906f84..6e720dc 100644 --- a/search/mag_seld.svg +++ b/search/mag_seld.svg @@ -1,31 +1,74 @@ - + + sodipodi:docname="mag_sel.svg" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> + + + + image/svg+xml + + + + + + + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + inkscape:connector-curvature="0" /> diff --git a/search/pages_0.js b/search/pages_0.js index 6732985..35be66b 100644 --- a/search/pages_0.js +++ b/search/pages_0.js @@ -1,4 +1,5 @@ var searchData= [ - ['contributing_0',['CONTRIBUTING',['../md_CONTRIBUTING.html',1,'']]] + ['changelog_0',['Changelog',['../md_CHANGELOG.html',1,'']]], + ['contributing_1',['CONTRIBUTING',['../md_CONTRIBUTING.html',1,'']]] ]; diff --git a/search/search.js b/search/search.js index 666af01..e103a26 100644 --- a/search/search.js +++ b/search/search.js @@ -22,9 +22,58 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -const SEARCH_COOKIE_NAME = ''+'search_grp'; +function convertToId(search) +{ + var result = ''; + for (i=0;i document.getElementById("MSearchField"); - this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); - this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); - this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); - this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); - this.DOMSearchClose = () => document.getElementById("MSearchClose"); - this.DOMSearchBox = () => document.getElementById("MSearchBox"); + this.DOMSearchField = function() + { return document.getElementById("MSearchField"); } + + this.DOMSearchSelect = function() + { return document.getElementById("MSearchSelect"); } + + this.DOMSearchSelectWindow = function() + { return document.getElementById("MSearchSelectWindow"); } + + this.DOMPopupSearchResults = function() + { return document.getElementById("MSearchResults"); } + + this.DOMPopupSearchResultsWindow = function() + { return document.getElementById("MSearchResultsWindow"); } + + this.DOMSearchClose = function() + { return document.getElementById("MSearchClose"); } + + this.DOMSearchBox = function() + { return document.getElementById("MSearchBox"); } // ------------ Event Handlers // Called when focus is added or removed from the search field. - this.OnSearchFieldFocus = function(isActive) { + this.OnSearchFieldFocus = function(isActive) + { this.Activate(isActive); } - this.OnSearchSelectShow = function() { - const searchSelectWindow = this.DOMSearchSelectWindow(); - const searchField = this.DOMSearchSelect(); + this.OnSearchSelectShow = function() + { + var searchSelectWindow = this.DOMSearchSelectWindow(); + var searchField = this.DOMSearchSelect(); - const left = getXPos(searchField); - const top = getYPos(searchField) + searchField.offsetHeight; + var left = getXPos(searchField); + var top = getYPos(searchField); + top += searchField.offsetHeight; // show search selection popup searchSelectWindow.style.display='block'; @@ -102,44 +146,55 @@ function SearchBox(name, resultsPath, extension) { searchSelectWindow.style.top = top + 'px'; // stop selection hide timer - if (this.hideTimeout) { + if (this.hideTimeout) + { clearTimeout(this.hideTimeout); this.hideTimeout=0; } return false; // to avoid "image drag" default event } - this.OnSearchSelectHide = function() { - this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), + this.OnSearchSelectHide = function() + { + this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()", this.closeSelectionTimeout); } // Called when the content of the search field is changed. - this.OnSearchFieldChange = function(evt) { - if (this.keyTimeout) { // kill running timer + this.OnSearchFieldChange = function(evt) + { + if (this.keyTimeout) // kill running timer + { clearTimeout(this.keyTimeout); this.keyTimeout = 0; } - const e = evt ? evt : window.event; // for IE - if (e.keyCode==40 || e.keyCode==13) { - if (e.shiftKey==1) { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) + { + if (e.shiftKey==1) + { this.OnSearchSelectShow(); - const win=this.DOMSearchSelectWindow(); - for (let i=0;i do a search + var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); + if (searchValue!="" && this.searchActive) // something was found -> do a search + { this.Search(); } } - this.OnSearchSelectKey = function(evt) { - const e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) { // Up + } + else if (e.keyCode==38 && this.searchIndex>0) // Up + { this.searchIndex--; this.OnSelectItem(this.searchIndex); - } else if (e.keyCode==13 || e.keyCode==27) { - e.stopPropagation(); + } + else if (e.keyCode==13 || e.keyCode==27) + { this.OnSelectItem(this.searchIndex); this.CloseSelectionWindow(); this.DOMSearchField().focus(); @@ -239,75 +299,78 @@ function SearchBox(name, resultsPath, extension) { // --------- Actions // Closes the results window. - this.CloseResultsWindow = function() { + this.CloseResultsWindow = function() + { this.DOMPopupSearchResultsWindow().style.display = 'none'; this.DOMSearchClose().style.display = 'none'; this.Activate(false); } - this.CloseSelectionWindow = function() { + this.CloseSelectionWindow = function() + { this.DOMSearchSelectWindow().style.display = 'none'; } // Performs a search. - this.Search = function() { + this.Search = function() + { this.keyTimeout = 0; // strip leading whitespace - const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - const code = searchValue.toLowerCase().charCodeAt(0); - let idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { idxChar = searchValue.substr(0, 2); } - let jsFile; - let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) { - const hexCode=idx.toString(16); - jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + var jsFile; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; } - const loadJS = function(url, impl, loc) { - const scriptTag = document.createElement('script'); + var loadJS = function(url, impl, loc){ + var scriptTag = document.createElement('script'); scriptTag.src = url; scriptTag.onload = impl; scriptTag.onreadystatechange = impl; loc.appendChild(scriptTag); } - const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - const domSearchBox = this.DOMSearchBox(); - const domPopupSearchResults = this.DOMPopupSearchResults(); - const domSearchClose = this.DOMSearchClose(); - const resultsPath = this.resultsPath; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + var domSearchBox = this.DOMSearchBox(); + var domPopupSearchResults = this.DOMPopupSearchResults(); + var domSearchClose = this.DOMSearchClose(); + var resultsPath = this.resultsPath; - const handleResults = function() { + var handleResults = function() { document.getElementById("Loading").style.display="none"; if (typeof searchData !== 'undefined') { createResults(resultsPath); document.getElementById("NoMatches").style.display="none"; } + + searchResults.Search(searchValue); - if (idx!=-1) { - searchResults.Search(searchValue); - } else { // no file with search results => force empty search results - searchResults.Search('===='); - } - - if (domPopupSearchResultsWindow.style.display!='block') { + if (domPopupSearchResultsWindow.style.display!='block') + { domSearchClose.style.display = 'inline-block'; - let left = getXPos(domSearchBox) + 150; - let top = getYPos(domSearchBox) + 20; + var left = getXPos(domSearchBox) + 150; + var top = getYPos(domSearchBox) + 20; domPopupSearchResultsWindow.style.display = 'block'; left -= domPopupSearchResults.offsetWidth; - const maxWidth = document.body.clientWidth; - const maxHeight = document.body.clientHeight; - let width = 300; + var maxWidth = document.body.clientWidth; + var maxHeight = document.body.clientHeight; + var width = 300; if (left<10) left=10; if (width+left+8>maxWidth) width=maxWidth-left-8; - let height = 400; + var height = 400; if (height+top+8>maxHeight) height=maxHeight-top-8; domPopupSearchResultsWindow.style.top = top + 'px'; domPopupSearchResultsWindow.style.left = left + 'px'; @@ -329,13 +392,17 @@ function SearchBox(name, resultsPath, extension) { // Activates or deactivates the search panel, resetting things to // their default values if necessary. - this.Activate = function(isActive) { + this.Activate = function(isActive) + { if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) { + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { this.DOMSearchBox().className = 'MSearchBoxActive'; this.searchActive = true; - } else if (!isActive) { // directly remove the panel + } + else if (!isActive) // directly remove the panel + { this.DOMSearchBox().className = 'MSearchBoxInactive'; this.searchActive = false; this.lastSearchValue = '' @@ -348,347 +415,402 @@ function SearchBox(name, resultsPath, extension) { // ----------------------------------------------------------------------- // The class that handles everything on the search results page. -function SearchResults() { - - function convertToId(search) { - let result = ''; - for (let i=0;i. - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) { - const parentElement = document.getElementById(id); - let element = parentElement.firstChild; + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); - while (element && element!=parentElement) { - if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { - return element; + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } } + } - if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { - element = element.firstChild; - } else if (element.nextSibling) { - element = element.nextSibling; - } else { - do { - element = element.parentNode; + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) { - element = element.nextSibling; + else + { + element.style.display = 'block'; } } } - } - this.Toggle = function(id) { - const element = this.FindChildElement(id); - if (element) { - if (element.style.display == 'block') { - element.style.display = 'none'; - } else { - element.style.display = 'block'; + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); } - } - } - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) { - if (!search) { // get search word from URL - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - const resultRows = document.getElementsByTagName("div"); - let matches = 0; - - let i = 0; - while (i < resultRows.length) { - const row = resultRows.item(i); - if (row.className == "SRResult") { - let rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) { - row.style.display = 'block'; - matches++; - } else { - row.style.display = 'none'; + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } } + i++; } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) { // no results - document.getElementById("NoMatches").style.display='block'; - } else { // at least one result - document.getElementById("NoMatches").style.display='none'; + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; } - this.lastMatchCount = matches; - return true; - } - // return the first item with index index or higher that is visible - this.NavNext = function(index) { - let focusItem; - for (;;) { - const focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { - break; - } else if (!focusItem) { // last element - break; - } - focusItem=null; - index++; - } - return focusItem; - } + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } - this.NavPrev = function(index) { - let focusItem; - for (;;) { - const focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { - break; - } else if (!focusItem) { // last element - break; + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; } - focusItem=null; - index--; + return focusItem; } - return focusItem; - } - this.ProcessKeys = function(e) { - if (e.type == "keydown") { - this.repeatOn = false; - this.lastKey = e.keyCode; - } else if (e.type == "keypress") { - if (!this.repeatOn) { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } } - } else if (e.type == "keyup") { - this.lastKey = 0; - this.repeatOn = false; + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; } - return this.lastKey!=0; - } - this.Nav = function(evt,itemIndex) { - const e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) { // Up - const newIndex = itemIndex-1; - let focusItem = this.NavPrev(newIndex); - if (focusItem) { - let child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') { // children visible - let n=0; - let tmpElem; - for (;;) { // search for last child - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) { - focusItem = tmpElem; - } else { // found it! - break; + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; } - n++; } } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); } - if (focusItem) { - focusItem.focus(); - } else { // return focus to search field + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + searchBox.CloseResultsWindow(); document.getElementById("MSearchField").focus(); } - } else if (this.lastKey==40) { // Down - const newIndex = itemIndex+1; - let focusItem; - const item = document.getElementById('Item'+itemIndex); - const elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') { // children visible - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } else if (this.lastKey==39) { // Right - const item = document.getElementById('Item'+itemIndex); - const elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } else if (this.lastKey==37) { // Left - const item = document.getElementById('Item'+itemIndex); - const elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } else if (this.lastKey==27) { // Escape - e.stopPropagation(); - searchBox.CloseResultsWindow(); - document.getElementById("MSearchField").focus(); - } else if (this.lastKey==13) { // Enter - return true; + else if (this.lastKey==13) // Enter + { + return true; + } + return false; } - return false; - } - this.NavChild = function(evt,itemIndex,childIndex) { - const e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) { // Up - if (childIndex>0) { - const newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } else { // already at first child, jump to parent - document.getElementById('Item'+itemIndex).focus(); - } - } else if (this.lastKey==40) { // Down - const newIndex = childIndex+1; - let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) { // last child, jump to parent next parent - elem = this.NavNext(itemIndex+1); - } - if (elem) { - elem.focus(); - } - } else if (this.lastKey==27) { // Escape - e.stopPropagation(); - searchBox.CloseResultsWindow(); - document.getElementById("MSearchField").focus(); - } else if (this.lastKey==13) { // Enter - return true; + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; } - return false; - } } -function createResults(resultsPath) { - - function setKeyActions(elem,action) { - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); - } +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} - function setClassAttr(elem,attr) { - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); - } +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} - const results = document.getElementById("SRResults"); +function createResults(resultsPath) +{ + var results = document.getElementById("SRResults"); results.innerHTML = ''; - searchData.forEach((elem,index) => { - const id = elem[0]; - const srResult = document.createElement('div'); + for (var e=0; e - - - - - - -RF24Gateway - TCP/IP over RF24Network: Member List - - - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    RF24Gateway - TCP/IP over RF24Network v2.1.0 -
    -
    TMRh20 - Pushing the practical limits of RF24 modules
    -
    -
    - - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    -
    ESBGateway< mesh_t, network_t, radio_t >::routeStruct Member List
    -
    - - - -
    - - diff --git a/classESBMesh.html b/structRF24Gateway_1_1routeStruct-members.html similarity index 58% rename from classESBMesh.html rename to structRF24Gateway_1_1routeStruct-members.html index 33834fe..4175caf 100644 --- a/classESBMesh.html +++ b/structRF24Gateway_1_1routeStruct-members.html @@ -3,17 +3,12 @@ - + -RF24Gateway - TCP/IP over RF24Network: ESBMesh< network_t, radio_t > Class Template Reference - +RF24Gateway - TCP/IP over RF24Network: Member List - - - - @@ -28,7 +23,7 @@ -
    RF24Gateway - TCP/IP over RF24Network v2.1.0 +
    RF24Gateway - TCP/IP over RF24Network v1.1.1
    TMRh20 - Pushing the practical limits of RF24 modules
    @@ -37,33 +32,23 @@
    - + - -
    +
    -
    -
    ESBMesh< network_t, radio_t > Class Template Reference
    +
    RF24Gateway::routeStruct Member List
    -

    Detailed Description

    -
    template<class network_t, class radio_t>
    -class ESBMesh< network_t, radio_t >
    -

    Definition at line 48 of file RF24Gateway.h.

    -
    + +

    This is the complete list of members for RF24Gateway::routeStruct, including all inherited members.

    + + + + +
    gwRF24Gateway::routeStruct
    ipRF24Gateway::routeStruct
    maskRF24Gateway::routeStruct
    - diff --git a/structESBGateway_1_1routeStruct.html b/structRF24Gateway_1_1routeStruct.html similarity index 50% rename from structESBGateway_1_1routeStruct.html rename to structRF24Gateway_1_1routeStruct.html index a4e0cb7..0ef0d90 100644 --- a/structESBGateway_1_1routeStruct.html +++ b/structRF24Gateway_1_1routeStruct.html @@ -3,17 +3,12 @@ - + -RF24Gateway - TCP/IP over RF24Network: ESBGateway< mesh_t, network_t, radio_t >::routeStruct Struct Reference - +RF24Gateway - TCP/IP over RF24Network: RF24Gateway::routeStruct Struct Reference - - - - @@ -28,7 +23,7 @@ -
    RF24Gateway - TCP/IP over RF24Network v2.1.0 +
    RF24Gateway - TCP/IP over RF24Network v1.1.1
    TMRh20 - Pushing the practical limits of RF24 modules
    @@ -37,33 +32,23 @@
    - + - - -
    -
    ESBGateway< mesh_t, network_t, radio_t >::routeStruct Struct Reference
    +List of all members
    +
    RF24Gateway::routeStruct Struct Reference
    @@ -103,16 +87,15 @@ - - - - - - + + + + + +

    Public Attributes

    struct in_addr ip
     
    struct in_addr mask
     
    struct in_addr gw
     
    struct in_addr ip
     
    struct in_addr mask
     
    struct in_addr gw
     

    Detailed Description

    -
    template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
    -struct ESBGateway< mesh_t, network_t, radio_t >::routeStruct

    If a user has created a file "routing.txt" in the RF24Gateway working directory, it will be loaded
    +

    If a user has created a file "routing.txt" in the RF24Gateway working directory, it will be loaded
    at startup into the routing table. The file should contain standard routing table entries as follows:
    IP<space>NetMask<space>Gateway
    ie: routing.txt

    10.1.4.0 255.255.255.0 10.1.3.33
    @@ -120,78 +103,71 @@

    The first example entry would route all traffic to the 10.1.4.x subnet to 10.1.3.33
    All other traffic not destined for the RF24 nodes will use 10.1.3.34 as the gateway

    Data can be accessed using standard linux Internet address manipulation routines as follows:

    printf("**IP\t\tMask\t\tGateway**\n");
    -
    for(int i=0; i<gw.routingTableSize; i++){
    -
    printf("%s \t",inet_ntoa(gw.routingStruct[i].ip));//inet_ntoa uses a statically assigned buffer, so the printf calls need to be done separately
    -
    printf("%s \t",inet_ntoa(gw.routingStruct[i].mask));
    -
    printf("%s\n", inet_ntoa(gw.routingStruct[i].gw));
    +
    for(int i=0; i<gw.routingTableSize; i++){
    +
    printf("%s \t",inet_ntoa(gw.routingStruct[i].ip));//inet_ntoa uses a statically assigned buffer, so the printf calls need to be done separately
    +
    printf("%s \t",inet_ntoa(gw.routingStruct[i].mask));
    +
    printf("%s\n", inet_ntoa(gw.routingStruct[i].gw));
    //std::cout << inet_ntoa(gw.routingStruct[i].ip) << " \t" << inet_ntoa(gw.routingStruct[i].mask) << " \t" << inet_ntoa(gw.routingStruct[i].gw) << std::endl;
    }
    printf("*****\n");
    Users can modify the routing table as desired, but changes made in code will not currently be saved to file
    - +
    -

    Definition at line 209 of file RF24Gateway.h.

    +

    Definition at line 184 of file RF24Gateway.h.

    Member Data Documentation

    - -

    ◆ ip

    + +

    ◆ ip

    -
    -template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
    - +
    struct in_addr ESBGateway< mesh_t, network_t, radio_t >::routeStruct::ipstruct in_addr RF24Gateway::routeStruct::ip
    -

    Definition at line 211 of file RF24Gateway.h.

    +

    Definition at line 186 of file RF24Gateway.h.

    - -

    ◆ mask

    + +

    ◆ mask

    -
    -template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
    - +
    struct in_addr ESBGateway< mesh_t, network_t, radio_t >::routeStruct::maskstruct in_addr RF24Gateway::routeStruct::mask
    -

    Definition at line 212 of file RF24Gateway.h.

    +

    Definition at line 187 of file RF24Gateway.h.

    - -

    ◆ gw

    + +

    ◆ gw

    -
    -template<class mesh_t = ESBMesh<ESBNetwork<RF24>, RF24>, class network_t = ESBNetwork<RF24>, class radio_t = RF24>
    - +
    struct in_addr ESBGateway< mesh_t, network_t, radio_t >::routeStruct::gwstruct in_addr RF24Gateway::routeStruct::gw
    -

    Definition at line 213 of file RF24Gateway.h.

    +

    Definition at line 188 of file RF24Gateway.h.

    -
    diff --git a/tabs.css b/tabs.css index fe4854a..71c8a47 100644 --- a/tabs.css +++ b/tabs.css @@ -1 +1 @@ -.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important;color:var(--nav-menu-foreground-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file