CCSDSPack
C++ Library for CCSDS Space Packet manipulation. i.e. generation, extraction, analisys and more
|
Handles validation of CCSDS packets. More...
#include <CCSDSValidator.h>
Public Member Functions | |
Validator ()=default | |
Default constructor. | |
~Validator ()=default | |
Default destructor. | |
Validator (const Packet &templatePacket) | |
Constructs a Validator with a template packet. | |
void | setTemplatePacket (const Packet &templatePacket) |
Sets the template packet for validation. | |
void | configure (bool validatePacketCoherence, bool validateSequenceCount, bool validateAgainstTemplate) |
Configures validation options. | |
bool | validate (const Packet &packet) |
Validates a given packet. | |
std::vector< bool > | getReport () const |
Returns a report of performed validation checks. | |
void | clear () |
Clears the validator, resets counter. | |
Private Attributes | |
Packet | m_templatePacket |
Template packet used for validation. | |
bool | m_validatePacketCoherence {true} |
Whether to validate packet length and CRC (default is true). | |
bool | m_validateAgainstTemplate {false} |
Whether to validate against the template packet (default is false). | |
bool | m_validateSegmentedCount {true} |
Whether to validate the count of segmented packets. | |
uint16_t | m_sequenceCounter {1} |
Counter for segmented Packets. | |
std::vector< bool > | m_report {} |
List of boolean results representing performed checks. | |
size_t | m_reportSize {6} |
Expected size of the validation report. | |
CRC16Config | m_CRCConfig |
Handles validation of CCSDS packets.
The Validator class checks packet coherence and compares packets against a template.
Definition at line 14 of file CCSDSValidator.h.
|
default |
Default constructor.
|
default |
Default destructor.
|
inlineexplicit |
Constructs a Validator with a template packet.
templatePacket | The packet template to use for validation. |
Definition at line 26 of file CCSDSValidator.h.
void CCSDS::Validator::clear | ( | ) |
Clears the validator, resets counter.
Definition at line 62 of file CCSDSValidator.cpp.
void CCSDS::Validator::configure | ( | bool | validatePacketCoherence, |
bool | validateSequenceCount, | ||
bool | validateAgainstTemplate | ||
) |
Configures validation options.
validatePacketCoherence | Enables/disables packet coherence validation. |
validateSequenceCount | |
validateAgainstTemplate | Enables/disables comparison against the template. |
Definition at line 4 of file CCSDSValidator.cpp.
|
inline |
Returns a report of performed validation checks.
Definition at line 64 of file CCSDSValidator.h.
|
inline |
Sets the template packet for validation.
templatePacket | The new template packet. |
Definition at line 33 of file CCSDSValidator.h.
bool CCSDS::Validator::validate | ( | const Packet & | packet | ) |
Validates a given packet.
packet | The packet to validate. |
Definition at line 9 of file CCSDSValidator.cpp.
|
private |
Definition at line 80 of file CCSDSValidator.h.
|
private |
List of boolean results representing performed checks.
Definition at line 78 of file CCSDSValidator.h.
|
private |
|
private |
|
private |
Template packet used for validation.
Definition at line 73 of file CCSDSValidator.h.
|
private |
Whether to validate against the template packet (default is false).
Definition at line 75 of file CCSDSValidator.h.
|
private |
Whether to validate packet length and CRC (default is true).
Definition at line 74 of file CCSDSValidator.h.
|
private |
Whether to validate the count of segmented packets.
Definition at line 76 of file CCSDSValidator.h.