MeshNet  1.0.0
Data Structures | Enumerations
mesh.h File Reference

This file contains class called MeshNet, which implements sensory mesh protocol for microcontrollers. More...

#include <meshPacket.h>
#include <meshTables.h>
#include <meshBuffers.h>
#include <meshPacketBuilder.h>
#include <meshPacketSplitter.h>
#include <meshPacketDecoders.h>
#include <RFInterface.h>
#include <wirish.h>
Include dependency graph for mesh.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  MeshNet
 This class implements MeshNet protocol for microcontrollers. More...
 

Enumerations

enum  MeshConnectionState {
  MeshDisconnected = 0, MeshConnectionScan, MeshConnectionRequest, MeshConnected,
  MeshDisconnecting
}
 Enumeration that represents connection state of MeshNet. More...
 
enum  MeshDisconnectReason {
  MDR_None = 0, MDR_NotFound = 1, MDR_ConnectionRefused = 2, MDR_NetworkFull = 3,
  MDR_ConnectionError = 4, MDR_ConnectionRemoteError = 5, MDR_ConnectionTimeout = 6, MDR_DisconnectCalled = 30,
  MDR_DisconnectRequest = 31, MDR_NetworkDrop = 32, MDR_Unknown = 255
}
 Enumeration that represents disconnect or connection fail reason of MeshNet. More...
 
enum  MeshPacketError {
  MPE_OK = 0, MPE_OIDT_Overwrritten = -1, MPE_Timeout = -2, MPE_NodeLost = -3,
  MPE_NoNetwork = -4, MPE_Full_outFIFO = -5, MPE_Full_waitingFIFO = -6, MPE_LostRemote = -7,
  MPE_NoRoute = -8, MPE_Invalid = -9, MPE_GenErr = -10, MPE_AllocErr = -11
}
 Enumeration that represents state or error of sent MeshPacket in MeshNet. More...
 

Detailed Description

This file contains class called MeshNet, which implements sensory mesh protocol for microcontrollers.

See also
MeshNet

Credits

Author
Matej Fitoš
Date
May 4, 2022

Enumeration Type Documentation

◆ MeshConnectionState

Enumeration that represents connection state of MeshNet.

Enumerator
MeshDisconnected 

Node is disconnected from any network.

MeshConnectionScan 

Node is connecting to network. Network scan started.

MeshConnectionRequest 

Node is connecting to network. Connection request was sent.

MeshConnected 

Node is connected to network.

MeshDisconnecting 

Node is disconnecting.

◆ MeshDisconnectReason

Enumeration that represents disconnect or connection fail reason of MeshNet.

Enumerator
MDR_None 

None disconnect reason

MDR_NotFound 

Network, the node wants to connect to was not found. This can happened only after calling connection.

MDR_ConnectionRefused 

Network, the node wants to connect to refused connection. This can happened only after calling connection.

MDR_NetworkFull 

Network, the node wants to connect to refused connection. This can happened only after calling connection.

MDR_ConnectionError 

Some error happened during connection. This can happened only after calling connection.

MDR_ConnectionRemoteError 

Some error happened during connection, but not in current node. This can happened only after calling connection.

MDR_ConnectionTimeout 

Connection timed out. This can happened only after calling connection.

MDR_DisconnectCalled 

Disconnected after calling disconnect() method.

MDR_DisconnectRequest 

Gateway node requests current node disconnect.

MDR_NetworkDrop 

Network has dropped, all nodes was disconnected.

MDR_Unknown 

Unknown reason.

◆ MeshPacketError

Enumeration that represents state or error of sent MeshPacket in MeshNet.

Enumerator
MPE_OK 

No packet error.

MPE_OIDT_Overwrritten 

Record of sent packet was overwritten in OIDTable. This is warning sign, that OID table is full and maybe you have to set it's capacity to larger number.

MPE_Timeout 

Packet has timed out and no response has been received. This can happened only if packet was sent with response request (ACK-R) or when specific system packet was sent. Packet timeouts are stored in OIDTable.

MPE_NodeLost 

Packet lost, because destination node is no longer accessible.

MPE_NoNetwork 

Packet was lost, because node was disconnected from network it belongs to.

MPE_Full_outFIFO 

Packet was lost, because buffer, where it has to be stored was already full. It is recommended to create same packet and send it again. This could happened only occasionally and it indicates, that outFIFO buffer has small size.

MPE_Full_waitingFIFO 

Packet was lost, because buffer, where it has to be stored was already full. It is recommended to create same packet and send it again. This could happened only occasionally and it indicates, that waitingFIFO buffer has small size.

MPE_LostRemote 

Packet was lost, but not in current node. Same action has to be done to handle this as with MPE_Lost error.

MPE_NoRoute 

Packet was lost, because route to destination node was not created or discovery process has failed.

MPE_Invalid 

Packet was scrapped, because it was marked as invalid.

MPE_GenErr 

Generic error happened during action.

MPE_AllocErr 

Packet was lost, because it's memory cannot be allocated.