Static class, that groups static methods to decode node disconnect packet.
More...
#include <meshPacketDecoders.h>
Static class, that groups static methods to decode node disconnect packet.
◆ DisconnectPD()
DisconnectPD::DisconnectPD |
( |
| ) |
|
|
inlineprivate |
◆ Construct()
Constructs packet of current type.
- Parameters
-
[in] | packet | System packet to construct. |
| sourceAddr | Source node address. |
| destAddr | Destination node address. |
| disconnectType | Disconnect packet type. |
- Returns
- Returns true when packet was constructed successfully.
◆ GetDisconnectType()
Gets disconnect packet type.
- Parameters
-
[in] | packet | System packet to decode. |
- Returns
- Disconnect packet type.
- Warning
- Always check, if packet is valid using IsValid() method, else exception can be thrown.
◆ IsSameType()
static bool DisconnectPD::IsSameType |
( |
const MeshPacket & |
packet | ) |
|
|
inlinestatic |
Checks if system packet type match decoder type, but does not check its validity.
- Parameters
-
[in] | packet | System packet to decode. |
- Returns
- True when this decoder should be used to decode current system packet.
◆ IsValid()
static bool DisconnectPD::IsValid |
( |
const MeshPacket & |
packet | ) |
|
|
inlinestatic |
Checks if packet is valid.
- Parameters
-
[in] | packet | System packet to decode. |
- Returns
- True when packet is valid and can be decoded.
- Warning
- Invalid packet should not be decoded, because it can cause exception.
◆ SetDisconnectType()
Sets disconnect packet type.
- Parameters
-
[in] | packet | System packet to decode. |
| disconnectType | Disconnect packet type. |
- Warning
- Always check, if packet is valid using IsValid() method, else exception can be thrown.
◆ Type
Type of system packet, that can be decoded with current decoder.
The documentation for this class was generated from the following file: