MeshNet
1.0.0
|
Static class, that groups static methods to decode relayied network connection response packet. More...
#include <meshPacketDecoders.h>
Static Public Member Functions | |
static bool | IsSameType (const MeshPacket &packet) |
Checks if system packet type match decoder type, but does not check its validity. More... | |
static bool | IsValid (const MeshPacket &packet) |
Checks if packet is valid. More... | |
static bool | IsValid (const MeshPacketHeader &packetHeader, const uint8_t *frameData, uint8_t frameDataSize) |
Checks if packet is valid. Designed for packet header checking in MeshPacketBuilder. More... | |
static uint16_t | GetFlags (const MeshPacket &packet) |
Gets network connect flags. More... | |
static void | SetFlags (MeshPacket &packet, uint16_t flags) |
Sets network connect flags. More... | |
static MeshMAC | GetRequesterMAC (const MeshPacket &packet) |
Gets MAC address of node, which requests network connection. More... | |
static void | SetRequesterMAC (MeshPacket &packet, MeshMAC requesterMAC) |
SetsMAC address of node, which requests network connection. More... | |
static uint8_t | GetAssignedAddr (const MeshPacket &packet) |
Gets address assigned to node which requested connection. More... | |
static void | SetAssignedAddr (MeshPacket &packet, uint8_t address) |
Sets address assigned to node which requested connection. More... | |
static bool | IsRefusedConnection (MeshPacket &packet) |
Checks if connection is refused. More... | |
static NetConRespRefuseReason | GetRefuseReason (MeshPacket &packet) |
Gets refuse reason when connection was refused. More... | |
static void | SetRefuseReason (MeshPacket &packet, NetConRespRefuseReason reason) |
Sets refuse reason when connection was refused. More... | |
static uint16_t | GetReservedTime (const MeshPacket &packet) |
Gets reserved time in DHCP table in minutes. More... | |
static void | SetReservedTime (MeshPacket &packet, uint16_t time) |
Sets reserved time in DHCP table in minutes. More... | |
static bool | Construct (MeshPacket &packet, uint8_t sourceAddr, uint8_t destAddr, uint16_t flags, MeshMAC requesterMAC, uint8_t address, uint16_t time) |
Constructs packet of current type. More... | |
static bool | ConstructRefused (MeshPacket &packet, uint8_t sourceAddr, uint8_t destAddr, uint16_t flags, MeshMAC requesterMAC, NetConRespRefuseReason reason) |
Constructs refused connection response packet of current type. More... | |
Static Public Attributes | |
const static SystemPacketType | Type = SPT_Connect |
Type of system packet, that can be decoded with current decoder. More... | |
Private Member Functions | |
RelNetConRespPD () | |
Static class, that groups static methods to decode relayied network connection response packet.
|
inlineprivate |
|
inlinestatic |
Constructs packet of current type.
[in] | packet | System packet to construct. |
sourceAddr | Source node address. | |
destAddr | Destination node address. | |
flags | Network scan flags. | |
requesterMAC | MAC address of node, which requests network connection. | |
address | Address assigned to node which requested connection. | |
time | Reserved time in DHCP table in minutes. |
|
inlinestatic |
Constructs refused connection response packet of current type.
[in] | packet | System packet to construct. |
sourceAddr | Source node address. | |
destAddr | Destination node address. | |
flags | Network scan flags. | |
requesterMAC | MAC address of node, which requests network connection. | |
reason | Refuse reason. |
|
inlinestatic |
Gets address assigned to node which requested connection.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets network connect flags.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets refuse reason when connection was refused.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets MAC address of node, which requests network connection.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets reserved time in DHCP table in minutes.
[in] | packet | System packet to decode. |
|
inlinestatic |
Checks if connection is refused.
|
inlinestatic |
Checks if system packet type match decoder type, but does not check its validity.
[in] | packet | System packet to decode. |
|
inlinestatic |
Checks if packet is valid.
[in] | packet | System packet to decode. |
|
inlinestatic |
Checks if packet is valid. Designed for packet header checking in MeshPacketBuilder.
[in] | packetHeader | Received packet header. |
[in] | frameData | Pointer to data contained in first frame (excluding fields reserved for packet header). |
[in] | frameDataSize | Size of frame data in bytes. |
|
inlinestatic |
Sets address assigned to node which requested connection.
[in] | packet | System packet to decode. |
address | Address assigned to node which requested connection. |
|
inlinestatic |
Sets network connect flags.
[in] | packet | System packet to decode. |
flags | Network connect flags. |
|
inlinestatic |
Sets refuse reason when connection was refused.
[in] | packet | System packet to decode. |
reason | Refuse reason to set. |
|
inlinestatic |
SetsMAC address of node, which requests network connection.
[in] | packet | System packet to decode. |
requesterMAC | MAC address of node, which requests network connection. |
|
inlinestatic |
Sets reserved time in DHCP table in minutes.
[in] | packet | System packet to decode. |
time | Reserved time in DHCP table in minutes. |
|
static |
Type of system packet, that can be decoded with current decoder.