MeshNet
1.0.0
|
Static class, that groups static methods to decode ERR_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 Source 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 Source 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 ERR_ACK_ErrorCode | GetErrorCode (const MeshPacket &packet) |
Gets error code, that describes error. More... | |
static void | SetErrorCode (MeshPacket &packet, ERR_ACK_ErrorCode ErrorCode) |
Sets error code, that describes error. More... | |
static uint8_t | GetRepairValue (const MeshPacket &packet) |
Gets value, that can be used for solving the error. Some error codes does not contains this value. More... | |
static void | SetRepairValue (MeshPacket &packet, uint8_t RepairValue) |
Sets value, that can be used for solving the error. Some error codes does not contains this value. 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, ERR_ACK_ErrorCode ErrorCode, uint8_t RepairValue=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, uint8_t ExpectedSize, ERR_ACK_ErrorCode ErrorCode, uint8_t RepairValue=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, ERR_ACK_ErrorCode ErrorCode, uint8_t RepairValue=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, ERR_ACK_ErrorCode ErrorCode, uint8_t RepairValue=0) |
Constructs packet of current type. More... | |
Static Public Attributes | |
const static SystemPacketType | Type = SPT_ERR_ACK |
Type of system packet, that can be decoded with current decoder. More... | |
Private Member Functions | |
ERR_ACKPD () | |
Static class, that groups static methods to decode ERR_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. | |
ErrorCode | Error code, that describes error. | |
RepairValue | Value that can be used for solving the error. Its value depends on error code. |
|
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. | |
ErrorCode | Error code, that describes error. | |
RepairValue | Value that can be used for solving the error. Its value depends on error code. |
|
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. | |
foreignBSSID | BSSID of foreign network, which has to receive this frame. | |
ErrorCode | Error code, that describes error. | |
RepairValue | Value that can be used for solving the error. Its value depends on error code. |
|
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. | |
ErrorCode | Error code, that describes error. | |
RepairValue | Value that can be used for solving the error. Its value depends on error code. |
|
inlinestatic |
Gets ID of packet (which with Source 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 error code, that describes error.
[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 |
Gets value, that can be used for solving the error. Some error codes does not contains this value.
[in] | packet | System packet to decode. |
|
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 Source 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 error code, that describes error.
[in] | packet | System packet to decode. |
ErrorCode | Error code. |
|
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. |
|
inlinestatic |
Sets value, that can be used for solving the error. Some error codes does not contains this value.
[in] | packet | System packet to decode. |
RepairValue | Value that can be used for solving the error. Its value depends on error code. |
|
static |
Type of system packet, that can be decoded with current decoder.