Go to the documentation of this file.
11 #ifndef MESH_NET_GATEWAY_h
12 #define MESH_NET_GATEWAY_h
24 dhcpTable.descriptor =
"dhcp";
52 bool begin()
override;
89 reqNodeDiscFailed = callback;
104 connectionPermissionFunc = callback;
115 #if (MESH_IMPL_CONSOLE_ITEM == 1)
119 bool respond(SerialConsole *console, Stream *stream, CommandWords &cmd)
override;
121 #endif //MESH_IMPL_CONSOLE_ITEM == 1
158 void onNodeLost(uint8_t address,
bool nodeLostForever)
override;
177 #if (MESH_IMPL_CONSOLE_ITEM == 1)
186 void showGatewayHelp(SerialConsole *console, Stream *stream);
188 #endif //MESH_IMPL_CONSOLE_ITEM == 1
203 bool(*reqNodeDiscFailed)(
MeshNet*, uint8_t) = NULL;
209 #endif // !MESH_NET_GATEWAY_h
Mesh MAC table, is lookup table for node address and MAC address. It acts as DHCP table....
Definition: meshTables.h:1168
void setOnConnectionPermissionCallback(bool(*callback)(MeshNetGateway *, uint16_t, uint16_t, MeshMAC))
Sets pointer to function, which is called when gateway has to decide, if node can be connected to net...
Definition: meshNetGateway.h:103
Radio frequency interface, that helps to use meshNet with different radios or communication types....
Definition: RFInterface.h:48
bool begin(MeshMAC mac, RFInterface &RFI) override
This method cannot be used with gateway, that's why it always returns false.
Definition: meshNetGateway.h:42
void setDiscRequestFailedCallback(bool(*callback)(MeshNet *, uint8_t))
This timeout is called, when requestNodeDisconnect() failed, because response was not received until ...
Definition: meshNetGateway.h:88
This class implements MeshNet protocol for microcontrollers.
Definition: mesh.h:104
bool end() override
Disables mesh node. It is recommended to drop network before calling this method to get know to nodes...
Definition: meshNetGateway.cpp:30
Definition: meshNetGateway.h:15
bool begin() override
Starts MeshNet gateway instance for current node with last setings.
Definition: meshNetGateway.cpp:26
bool requestNodeDisconnect(uint8_t address)
Request node disconnection from network. Node may ignore this request or may not receive this request...
Definition: meshNetGateway.cpp:47
void onNodeLost(uint8_t address, bool nodeLostForever) override
This method is called, when some node is disconnected from network or does not responds to sent packe...
Definition: meshNetGateway.cpp:247
void onDHCPValidityChanged(int16_t index, bool valid, bool removed)
This method is called when DHCP row validity has changed. There can be 3 states of validity:
Definition: meshNetGateway.cpp:263
void routeTableUpdate(const MeshPacketHeader &header, MeshMAC BSSID, int8_t rssi) override
Updates route table when valid packet from node with same network is received.ň
Definition: meshNetGateway.cpp:236
void processPacket(MeshPacket &packet, MeshMAC BSSID) override
Processed received packet. Called in processReceived() method.
Definition: meshNetGateway.cpp:77
void handle() override
This method has to be called in main program loop as often as possible.
Definition: meshNetGateway.cpp:269
Class, that stores mesh packet with it's data. The size of this class can be slightly bigger then rea...
Definition: meshPacket.h:158
MeshNetGateway()
Definition: meshNetGateway.h:18
This file contains class called MeshNet, which implements sensory mesh protocol for microcontrollers.
#define OSTREAM
Definition: meshConfig.h:41
virtual void onPacketError(MeshPacketError error, uint8_t packetID, uint8_t packetDest, SystemPacketType packetType, const MeshPacket *packet_ptr) override
This method is called when some error happened to any packet created by current node.
Definition: meshNetGateway.cpp:224
bool printDHCPTable(OSTREAM *stream)
Definition: meshNetGateway.cpp:69
#define DHCPTABLE_ROW_LIFETIME
Definition: meshConfig.h:150
Structure that represents physical MAC address used in MeshNEt protocol. MeshMAC address unlike MAC a...
Definition: meshHelper.h:207
void makeInvalidDHCPRow(uint8_t address)
Makes invalid row in DHCP table by assigned address.
Definition: meshNetGateway.cpp:255
bool dropNetwork(bool forced)
Drops whole network, all nodes will be disconnected when they receive this packet....
Definition: meshNetGateway.cpp:38
MeshPacketError
Enumeration that represents state or error of sent MeshPacket in MeshNet.
Definition: mesh.h:80