MeshNet
1.0.0
|
Static class, that groups static methods to decode ACK 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 uint8_t | GetACK_ID (const MeshPacket &packet) |
Gets ID of packet (which with Souce creates unique packet identifier), that is being acknowledged. More... | |
static void | SetACK_ID (MeshPacket &packet, uint8_t ACK_ID) |
Sets ID of packet (which with Souce creates unique packet identifier), that is being acknowledged. More... | |
static uint8_t | GetACK_Source (const MeshPacket &packet) |
Gets Source of packet (which with ID creates unique packet identifier), that is being acknowledged. More... | |
static void | SetACK_Source (MeshPacket &packet, uint8_t ACK_Source) |
Sets Source of packet (which with ID creates unique packet identifier), that is being acknowledged. More... | |
static uint8_t | GetExpectedFrameSize (const uint8_t *frameData) |
Gets size of frame, which is expected to be received after this acknowledgement. Designed for packet header checking in MeshPacketBuilder. This has to be used, when packet is splitted to multiple frames and each frame has to be acknowledged. It can help prevent to hidden terminal problem. All transmitters which receive this ACK frame has to calculate time, they has to wait until transmission. More... | |
static uint8_t | GetExpectedFrameSize (const MeshPacket &packet) |
Gets size of frame, which is expected to be received after this acknowledgement. This has to be used, when packet is splitted to multiple frames and each frame has to be acknowledged. It can help prevent to hidden terminal problem. All transmitters which receive this ACK frame has to calculate time, they has to wait until transmission. More... | |
static void | SetExpectedFrameSize (MeshPacket &packet, uint8_t ExpectedSize) |
Sets size of frame, which is expected to be received after this acknowledgement. This has to be used, when packet is splitted to multiple frames and each frame has to be acknowledged. It can help prevent to hidden terminal problem. All transmitters which receive this ACK frame has to calculate time, they has to wait until transmission. More... | |
static bool | IsForeignNet (const MeshPacket &packet) |
Checks if frame is for foreign network. More... | |
static bool | IsForeignNet (uint8_t frameDataSize) |
Checks if frame is for foreign network. Designed for packet header checking in MeshPacketBuilder. More... | |
static MeshMAC | GetForeignNetBSSID (const MeshPacket &packet) |
Gets BSSID of foreign network, which has to receive this frame. More... | |
static MeshMAC | GetForeignNetBSSID (const uint8_t *frameData) |
Gets BSSID of foreign network, which has to receive this frame. Designed for packet header checking in MeshPacketBuilder. More... | |
static void | SetForeignNetBSSID (MeshPacket &packet, MeshMAC foreignBSSID) |
Sets BSSID of foreign network, which has to receive this frame. More... | |
static bool | Construct (MeshPacket &packet, uint8_t sourceAddr, uint8_t destAddr, uint8_t ACK_ID, uint8_t ACK_Source, uint8_t ExpectedSize=0) |
Constructs packet of current type. More... | |
static bool | Construct (MeshPacket &packet, uint8_t sourceAddr, uint8_t destAddr, uint8_t ACK_ID, uint8_t ACK_Source, MeshMAC foreignBSSID, uint8_t ExpectedSize=0) |
Constructs packet of current type. More... | |
Static Public Attributes | |
const static SystemPacketType | Type = SPT_ACK |
Type of system packet, that can be decoded with current decoder. More... | |
Private Member Functions | |
ACKPD () | |
Static class, that groups static methods to decode ACK packet.
|
inlineprivate |
|
inlinestatic |
Constructs packet of current type.
[in] | packet | System packet to construct. |
sourceAddr | Source node address. | |
destAddr | Destination node address. | |
ACK_ID | ID of acknowledged packet. | |
ACK_Source | Source address of acknowledged packet. | |
foreignBSSID | BSSID of foreign network, which has to receive this frame. | |
ExpectedSize | Expected size of next carriage frame to be received. If there is no next frame, set to 0. |
|
inlinestatic |
Constructs packet of current type.
[in] | packet | System packet to construct. |
sourceAddr | Source node address. | |
destAddr | Destination node address. | |
ACK_ID | ID of acknowledged packet. | |
ACK_Source | Source address of acknowledged packet. | |
ExpectedSize | Expected size of next carriage frame to be received. If there is no next frame, set to 0. |
|
inlinestatic |
Gets ID of packet (which with Souce creates unique packet identifier), that is being acknowledged.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets Source of packet (which with ID creates unique packet identifier), that is being acknowledged.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets size of frame, which is expected to be received after this acknowledgement. This has to be used, when packet is splitted to multiple frames and each frame has to be acknowledged. It can help prevent to hidden terminal problem. All transmitters which receive this ACK frame has to calculate time, they has to wait until transmission.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets size of frame, which is expected to be received after this acknowledgement. Designed for packet header checking in MeshPacketBuilder. This has to be used, when packet is splitted to multiple frames and each frame has to be acknowledged. It can help prevent to hidden terminal problem. All transmitters which receive this ACK frame has to calculate time, they has to wait until transmission.
[in] | frameData | Pointer to data contained in first frame (excluding fields reserved for packet header). |
|
inlinestatic |
Gets BSSID of foreign network, which has to receive this frame.
[in] | packet | System packet to decode. |
|
inlinestatic |
Gets BSSID of foreign network, which has to receive this frame. Designed for packet header checking in MeshPacketBuilder.
[in] | frameData | Pointer to data contained in first frame (excluding fields reserved for packet header). |
|
inlinestatic |
Checks if frame is for foreign network.
|
inlinestatic |
Checks if frame is for foreign network. Designed for packet header checking in MeshPacketBuilder.
|
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 ID of packet (which with Souce creates unique packet identifier), that is being acknowledged.
[in] | packet | System packet to decode. |
ACK_ID | ID of acknowledged packet. |
|
inlinestatic |
Sets Source of packet (which with ID creates unique packet identifier), that is being acknowledged.
[in] | packet | System packet to decode. |
ACK_Source | Source address of acknowledged packet. |
|
inlinestatic |
Sets size of frame, which is expected to be received after this acknowledgement. This has to be used, when packet is splitted to multiple frames and each frame has to be acknowledged. It can help prevent to hidden terminal problem. All transmitters which receive this ACK frame has to calculate time, they has to wait until transmission.
[in] | packet | System packet to decode. |
ExpectedSize | Expected size of next carriage frame to be received. If there is no next frame, set to 0. |
|
inlinestatic |
Sets BSSID of foreign network, which has to receive this frame.
[in] | packet | System packet to decode. |
foreignBSSID | BSSID of foreign network, which has to receive this frame. |
|
static |
Type of system packet, that can be decoded with current decoder.