ldas-tools-framecpp 3.0.4
Loading...
Searching...
No Matches
FrameCPP::Common::Verify Class Reference

#include <Verify.hh>

Public Types

typedef VerifyException::error_type error_type
typedef std::unique_ptr< FrameFilenameframe_filename_ptr_type
typedef boost::shared_ptr< std::exception > error_info_type
typedef std::list< error_info_typeerror_info_container_type
typedef INT_4U chkType_type
typedef INT_4U chkSum_type
typedef VerifyException::error_type error_type
typedef std::unique_ptr< FrameFilenameframe_filename_ptr_type
typedef boost::shared_ptr< std::exception > error_info_type
typedef std::list< error_info_typeerror_info_container_type
typedef INT_4U chkType_type
typedef INT_4U chkSum_type

Public Member Functions

 Verify ()
 Default constructor.
INT_8U BufferSize () const
 Query the size of the I/O buffer.
void BufferSize (INT_8U Bytes)
 Change the size of the I/O buffer.
bool CheckDataValid () const
 Query if the data valid field of the FrAdcData must be zero.
void CheckDataValid (bool Check)
 Change requirement if the data valid field of the FrAdcData must be zero.
bool CheckDataValidAll () const
 Query if the data valid field of all the FrAdcData must be zero.
void CheckDataValidAll (bool Check)
 Change requirement to check all channels for dataValid.
void CheckFast (bool Check)
 Request fast checking.
bool CheckFast () const
 Query if fast checking has been requested.
bool CheckFileChecksum () const
 Query if checksums will be calculated for a frame file.
void CheckFileChecksum (bool Check)
 Change requirement for calculating the checksum of a frame file.
bool CheckFileChecksumOnly () const
void CheckFileChecksumOnly (bool Check)
bool CheckForDuplicateChannelNames () const
 Query if duplicate channel name checking has been requested.
void CheckForDuplicateChannelNames (bool Check)
 Request checking for duplicate channel names.
bool CheckFrameChecksum () const
 Query if checksums will be calculated for the frames of a frame file.
void CheckFrameChecksum (bool Check)
 Change requirement for calculating the checksum of frames of a frame file.
bool CheckMD5Sum () const
 Query if md5sum will be calculated for the frame file.
void CheckMD5Sum (bool Check)
 Change requirement for calculating the md5sum value for the frame file.
void ChecksumHeader (chkSum_type Checksum)
 Establish the Checksum value for the FrHeader.
INT_4U ChecksumScheme () const
 Retrieve the value for the checksum scheme.
void ChecksumScheme (INT_4U Value)
 Set the value for the checksum scheme.
bool CollectAllErrors () const
 Retrieve the value for the checksum scheme.
void CollectAllErrors (bool Value)
 Set the value for the collect all errors state.
error_info_container_type ErrorInfoQueue () const
 Retrieve additional infomation about an error.
bool Expandability () const
 Retrieve the value governing checking of compressed data.
void Expandability (bool Value)
 Set the value governing validation of compressed data.
bool MustHaveEOFChecksum () const
 Query if the frame file must have the EOF checksum structure.
void MustHaveEOFChecksum (bool Conformance)
 Change requirement of the frame file having the EOF checksum structure.
void SeenFrEndOfFile (bool Value)
 Change status of having seen FrEndOfFile structure.
bool Strict () const
 Query strict conformance requirement.
void Strict (bool Strictness)
 Change strict conformance requirement.
bool UseMemoryMappedIO () const
 Query if memory mapped I/O will be used.
void UseMemoryMappedIO (bool UseMemoryMappedIO)
 Specify if to use memory mapped I/O.
bool ValidateMetadata () const
 Query if metadata should be validated.
void ValidateMetadata (bool ValidateMetadata)
 Specify if to validate metadata.
void operator() (const std::string &Filename)
 Verify a frame file.
void operator() (IFrameStream &Stream, frame_filename_ptr_type &Filename=NULL_FRAME_FILENAME)
 Verify a frame stream.
void ExamineFrEndOfFileChecksum (IFrameStream &Stream, chkType_type Type, chkSum_type Sum)
void ExamineFrHeaderChecksum (chkSum_type Checksum) const
 Verify the checksum for the FrHeader structure.
template<int>
void ExamineMagicNumber (const unsigned char *Source)
 Verify ()
 Default constructor.
INT_8U BufferSize () const
 Query the size of the I/O buffer.
void BufferSize (INT_8U Bytes)
 Change the size of the I/O buffer.
bool CheckDataValid () const
 Query if the data valid field of the FrAdcData must be zero.
void CheckDataValid (bool Check)
 Change requirement if the data valid field of the FrAdcData must be zero.
bool CheckDataValidAll () const
 Query if the data valid field of all the FrAdcData must be zero.
void CheckDataValidAll (bool Check)
 Change requirement to check all channels for dataValid.
void CheckFast (bool Check)
 Request fast checking.
bool CheckFast () const
 Query if fast checking has been requested.
bool CheckFileChecksum () const
 Query if checksums will be calculated for a frame file.
void CheckFileChecksum (bool Check)
 Change requirement for calculating the checksum of a frame file.
bool CheckFileChecksumOnly () const
void CheckFileChecksumOnly (bool Check)
bool CheckForDuplicateChannelNames () const
 Query if duplicate channel name checking has been requested.
void CheckForDuplicateChannelNames (bool Check)
 Request checking for duplicate channel names.
bool CheckFrameChecksum () const
 Query if checksums will be calculated for the frames of a frame file.
void CheckFrameChecksum (bool Check)
 Change requirement for calculating the checksum of frames of a frame file.
bool CheckMD5Sum () const
 Query if md5sum will be calculated for the frame file.
void CheckMD5Sum (bool Check)
 Change requirement for calculating the md5sum value for the frame file.
void ChecksumHeader (chkSum_type Checksum)
 Establish the Checksum value for the FrHeader.
INT_4U ChecksumScheme () const
 Retrieve the value for the checksum scheme.
void ChecksumScheme (INT_4U Value)
 Set the value for the checksum scheme.
bool CollectAllErrors () const
void CollectAllErrors (bool Value)
 Set the value for the collect all errors state.
error_info_container_type ErrorInfoQueue () const
 Retrieve additional infomation about an error.
bool Expandability () const
 Retrieve the value governing checking of compressed data.
void Expandability (bool Value)
 Set the value governing validation of compressed data.
bool MustHaveEOFChecksum () const
 Query if the frame file must have the EOF checksum structure.
void MustHaveEOFChecksum (bool Conformance)
 Change requirement of the frame file having the EOF checksum structure.
void SeenFrEndOfFile (bool Value)
 Change status of having seen FrEndOfFile structure.
bool Strict () const
 Query strict conformance requirement.
void Strict (bool Strictness)
 Change strict conformance requirement.
bool UseMemoryMappedIO () const
 Query if memory mapped I/O will be used.
void UseMemoryMappedIO (bool UseMemoryMappedIO)
 Specify if to use memory mapped I/O.
bool ValidateMetadata () const
 Query if metadata should be validated.
void ValidateMetadata (bool ValidateMetadata)
 Specify if to validate metadata.
void operator() (const std::string &Filename)
 Verify a frame file.
void operator() (IFrameStream &Stream, frame_filename_ptr_type &Filename=NULL_FRAME_FILENAME)
 Verify a frame stream.
void ExamineFrEndOfFileChecksum (IFrameStream &Stream, chkType_type Type, chkSum_type Sum)
void ExamineFrHeaderChecksum (chkSum_type Checksum) const
 Verify the checksum for the FrHeader structure.
template<int>
void ExamineMagicNumber (const unsigned char *Source)
template<>
void ExamineMagicNumber (const unsigned char *Source)
template<>
void ExamineMagicNumber (const unsigned char *Source)
template<>
void ExamineMagicNumber (const unsigned char *Source)
template<>
void ExamineMagicNumber (const unsigned char *Source)
template<>
void ExamineMagicNumber (const unsigned char *Source)
template<>
void ExamineMagicNumber (const unsigned char *Source)

Static Public Attributes

static frame_filename_ptr_type NULL_FRAME_FILENAME

Private Types

typedef boost::shared_ptr< FrHeaderfr_header_type
typedef LDASTools::AL::unordered_map< char, int > detector_validation_type
typedef LDASTools::AL::unordered_map< std::string, std::set< int > > name_cache_type
typedef boost::shared_ptr< FrHeaderfr_header_type
typedef LDASTools::AL::unordered_map< char, int > detector_validation_type
typedef LDASTools::AL::unordered_map< std::string, std::set< int > > name_cache_type

Private Member Functions

void crc_file_checksum_only (IStream &Stream, fr_header_type Header)
void is_unique (int ClassId, const std::string &Name)
 Verify that an object is uniquely named.
void thrower (const VerifyException &Except)
 Handle throwing of exception.
void verify_checksum (CheckSum *ExpectedCRC, CheckSum *CalculatedCRC, const std::string &FrStructure, bool MustBeNonZero, bool InFrame=true) const
 Verify Checksum values.
void set_channel_site (char Site)
template<class T>
void check_magic_number (const unsigned char *const Source, const T Ref)
void crc_file_checksum_only (IStream &Stream, fr_header_type Header)
void is_unique (int ClassId, const std::string &Name)
 Verify that an object is uniquely named.
void thrower (const VerifyException &Except)
 Handle throwing of exception.
void verify_checksum (CheckSum *ExpectedCRC, CheckSum *CalculatedCRC, const std::string &FrStructure, bool MustBeNonZero, bool InFrame=true) const
 Verify Checksum values.
void set_channel_site (char Site)
template<class T>
void check_magic_number (const unsigned char *const Source, const T Ref)

Private Attributes

name_cache_type name_cache
 Cache of channel names and object class ids.
detector_validation_type m_detector_validation
detector_validation_type m_detector_validation_excess
detector_validation_type m_channel_validation
detector_validation_type m_channel_validation_excess
INT_8U m_buffer_size
INT_4U frame_offset
bool check_for_duplicate_channel_names
 State of checking for duplicate channel names.
bool m_check_data_valid
bool m_check_data_valid_all
bool m_check_expandability
 Expandability checking.
bool m_check_fast
 Enable fast checking.
bool m_check_file_checksum
bool m_check_frame_checksum
bool m_check_md5sum
bool m_checksum_file_only
bool collect_all_errors
bool m_must_have_eof_checksum
bool m_strict
bool m_use_memory_mapped_io
bool m_validate_metadata
bool m_state_has_seen_fr_end_of_file
INT_4U m_checksum_scheme
chkSum_type m_checksum_frheader
 The checksum of the FrHeader structure upon reading the object.
error_info_container_type error_info_container

Friends

void FrameSpec::ObjectInterface::VerifyObject (Verify &Verifier, IFrameStream &Stream) const
void FrameSpec::ObjectInterface::VerifyObject (Verify &Verifier, IFrameStream &Stream) const

Member Typedef Documentation

◆ chkSum_type [1/2]

◆ chkSum_type [2/2]

◆ chkType_type [1/2]

◆ chkType_type [2/2]

◆ detector_validation_type [1/2]

typedef LDASTools::AL::unordered_map< char, int > FrameCPP::Common::Verify::detector_validation_type
private

◆ detector_validation_type [2/2]

typedef LDASTools::AL::unordered_map< char, int > FrameCPP::Common::Verify::detector_validation_type
private

◆ error_info_container_type [1/2]

◆ error_info_container_type [2/2]

◆ error_info_type [1/2]

typedef boost::shared_ptr< std::exception > FrameCPP::Common::Verify::error_info_type

◆ error_info_type [2/2]

typedef boost::shared_ptr< std::exception > FrameCPP::Common::Verify::error_info_type

◆ error_type [1/2]

◆ error_type [2/2]

◆ fr_header_type [1/2]

typedef boost::shared_ptr< FrHeader > FrameCPP::Common::Verify::fr_header_type
private

◆ fr_header_type [2/2]

typedef boost::shared_ptr< FrHeader > FrameCPP::Common::Verify::fr_header_type
private

◆ frame_filename_ptr_type [1/2]

◆ frame_filename_ptr_type [2/2]

◆ name_cache_type [1/2]

typedef LDASTools::AL::unordered_map< std::string, std::set< int > > FrameCPP::Common::Verify::name_cache_type
private

◆ name_cache_type [2/2]

typedef LDASTools::AL::unordered_map< std::string, std::set< int > > FrameCPP::Common::Verify::name_cache_type
private

Constructor & Destructor Documentation

◆ Verify() [1/2]

Verify::Verify ( )

Default constructor.

◆ Verify() [2/2]

FrameCPP::Common::Verify::Verify ( )

Default constructor.

Member Function Documentation

◆ BufferSize() [1/4]

INT_8U FrameCPP::Common::Verify::BufferSize ( ) const
inline

Query the size of the I/O buffer.

Returns
size of the I/O buffer

◆ BufferSize() [2/4]

INT_8U FrameCPP::Common::Verify::BufferSize ( ) const

Query the size of the I/O buffer.

Returns
size of the I/O buffer

◆ BufferSize() [3/4]

void FrameCPP::Common::Verify::BufferSize ( INT_8U Bytes)
inline

Change the size of the I/O buffer.

Parameters
[in]Bytesestablish the size in bytes of the I/O buffer. A value of 0 sets the buffer size to the system specified default.

◆ BufferSize() [4/4]

void FrameCPP::Common::Verify::BufferSize ( INT_8U Bytes)

Change the size of the I/O buffer.

Parameters
[in]Bytesestablish the size in bytes of the I/O buffer. A value of 0 sets the buffer size to the system specified default.

◆ check_magic_number() [1/2]

template<class T>
void FrameCPP::Common::Verify::check_magic_number ( const unsigned char *const Source,
const T Ref )
inlineprivate

◆ check_magic_number() [2/2]

template<class T>
void FrameCPP::Common::Verify::check_magic_number ( const unsigned char *const Source,
const T Ref )
private

◆ CheckDataValid() [1/4]

bool FrameCPP::Common::Verify::CheckDataValid ( ) const
inline

Query if the data valid field of the FrAdcData must be zero.

Returns
true if the data valid field of the FrAdcData must be zero, false otherwise

◆ CheckDataValid() [2/4]

bool FrameCPP::Common::Verify::CheckDataValid ( ) const

Query if the data valid field of the FrAdcData must be zero.

Returns
true if the data valid field of the FrAdcData must be zero, false otherwise

◆ CheckDataValid() [3/4]

void FrameCPP::Common::Verify::CheckDataValid ( bool Check)
inline

Change requirement if the data valid field of the FrAdcData must be zero.

Parameters
[in]CheckIf true, enable checking of the data valid field of the FrAdcData structure to be zero. If false, not checking of the data valid field is performed.

◆ CheckDataValid() [4/4]

void FrameCPP::Common::Verify::CheckDataValid ( bool Check)

Change requirement if the data valid field of the FrAdcData must be zero.

Parameters
[in]CheckIf true, enable checking of the data valid field of the FrAdcData structure to be zero. If false, not checking of the data valid field is performed.

◆ CheckDataValidAll() [1/4]

bool FrameCPP::Common::Verify::CheckDataValidAll ( ) const
inline

Query if the data valid field of all the FrAdcData must be zero.

Returns
state of checking that the data valid field is zero

◆ CheckDataValidAll() [2/4]

bool FrameCPP::Common::Verify::CheckDataValidAll ( ) const

Query if the data valid field of all the FrAdcData must be zero.

Returns
state of checking that the data valid field is zero

◆ CheckDataValidAll() [3/4]

void FrameCPP::Common::Verify::CheckDataValidAll ( bool Check)
inline

Change requirement to check all channels for dataValid.

Parameters
[in]CheckTrue if the data valid field must be zero, false otherwise.

◆ CheckDataValidAll() [4/4]

void FrameCPP::Common::Verify::CheckDataValidAll ( bool Check)

Change requirement to check all channels for dataValid.

Parameters
[in]CheckTrue if the data valid field must be zero, false otherwise.

◆ CheckFast() [1/4]

bool FrameCPP::Common::Verify::CheckFast ( ) const
inline

Query if fast checking has been requested.

Returns
True if fast checking should be attempted.

◆ CheckFast() [2/4]

bool FrameCPP::Common::Verify::CheckFast ( ) const

Query if fast checking has been requested.

Returns
True if fast checking should be attempted.

◆ CheckFast() [3/4]

void FrameCPP::Common::Verify::CheckFast ( bool Check)
inline

Request fast checking.

Parameters
[in]CheckIf true, then fast checking is enabled; If false, then fast checking is disabled.

◆ CheckFast() [4/4]

void FrameCPP::Common::Verify::CheckFast ( bool Check)

Request fast checking.

Parameters
[in]CheckIf true, then fast checking is enabled; If false, then fast checking is disabled.

◆ CheckFileChecksum() [1/4]

bool FrameCPP::Common::Verify::CheckFileChecksum ( ) const
inline

Query if checksums will be calculated for a frame file.

Returns
true if checksums for frame files need to be performed, false otherwise.

◆ CheckFileChecksum() [2/4]

bool FrameCPP::Common::Verify::CheckFileChecksum ( ) const

Query if checksums will be calculated for a frame file.

Returns
true if checksums for frame files need to be performed, false otherwise.

◆ CheckFileChecksum() [3/4]

void FrameCPP::Common::Verify::CheckFileChecksum ( bool Check)
inline

Change requirement for calculating the checksum of a frame file.

Parameters
[in]Checktrue if checksums for frame files need to be performed, false otherwise.

◆ CheckFileChecksum() [4/4]

void FrameCPP::Common::Verify::CheckFileChecksum ( bool Check)

Change requirement for calculating the checksum of a frame file.

Parameters
[in]Checktrue if checksums for frame files need to be performed, false otherwise.

◆ CheckFileChecksumOnly() [1/4]

bool FrameCPP::Common::Verify::CheckFileChecksumOnly ( ) const
inline

◆ CheckFileChecksumOnly() [2/4]

bool FrameCPP::Common::Verify::CheckFileChecksumOnly ( ) const

◆ CheckFileChecksumOnly() [3/4]

void FrameCPP::Common::Verify::CheckFileChecksumOnly ( bool Check)
inline

◆ CheckFileChecksumOnly() [4/4]

void FrameCPP::Common::Verify::CheckFileChecksumOnly ( bool Check)

◆ CheckForDuplicateChannelNames() [1/4]

bool FrameCPP::Common::Verify::CheckForDuplicateChannelNames ( ) const
inline

Query if duplicate channel name checking has been requested.

Returns
True if fast checking should be attempted.

◆ CheckForDuplicateChannelNames() [2/4]

bool FrameCPP::Common::Verify::CheckForDuplicateChannelNames ( ) const

Query if duplicate channel name checking has been requested.

Returns
True if fast checking should be attempted.

◆ CheckForDuplicateChannelNames() [3/4]

void FrameCPP::Common::Verify::CheckForDuplicateChannelNames ( bool Check)
inline

Request checking for duplicate channel names.

◆ CheckForDuplicateChannelNames() [4/4]

void FrameCPP::Common::Verify::CheckForDuplicateChannelNames ( bool Check)

Request checking for duplicate channel names.

◆ CheckFrameChecksum() [1/4]

bool FrameCPP::Common::Verify::CheckFrameChecksum ( ) const
inline

Query if checksums will be calculated for the frames of a frame file.

Returns
true if checksums for individual frames need to be performed, false otherwise.

◆ CheckFrameChecksum() [2/4]

bool FrameCPP::Common::Verify::CheckFrameChecksum ( ) const

Query if checksums will be calculated for the frames of a frame file.

Returns
true if checksums for individual frames need to be performed, false otherwise.

◆ CheckFrameChecksum() [3/4]

void FrameCPP::Common::Verify::CheckFrameChecksum ( bool Check)
inline

Change requirement for calculating the checksum of frames of a frame file.

Parameters
[in]Checktrue if checksums for individual frames need to be performed, false otherwise.

◆ CheckFrameChecksum() [4/4]

void FrameCPP::Common::Verify::CheckFrameChecksum ( bool Check)

Change requirement for calculating the checksum of frames of a frame file.

Parameters
[in]Checktrue if checksums for individual frames need to be performed, false otherwise.

◆ CheckMD5Sum() [1/4]

bool FrameCPP::Common::Verify::CheckMD5Sum ( ) const
inline

Query if md5sum will be calculated for the frame file.

Returns
true if md5sum for the frame file will be performed, false otherwise.

◆ CheckMD5Sum() [2/4]

bool FrameCPP::Common::Verify::CheckMD5Sum ( ) const

Query if md5sum will be calculated for the frame file.

Returns
true if md5sum for the frame file will be performed, false otherwise.

◆ CheckMD5Sum() [3/4]

void FrameCPP::Common::Verify::CheckMD5Sum ( bool Check)
inline

Change requirement for calculating the md5sum value for the frame file.

Parameters
[in]Checktrue if md5sum for the frame file should be performed, false otherwise.

◆ CheckMD5Sum() [4/4]

void FrameCPP::Common::Verify::CheckMD5Sum ( bool Check)

Change requirement for calculating the md5sum value for the frame file.

Parameters
[in]Checktrue if md5sum for the frame file should be performed, false otherwise.

◆ ChecksumHeader() [1/2]

void FrameCPP::Common::Verify::ChecksumHeader ( chkSum_type Checksum)
inline

Establish the Checksum value for the FrHeader.

This estalishes the checksum calculated from the reading of the FrHeader structure.

◆ ChecksumHeader() [2/2]

void FrameCPP::Common::Verify::ChecksumHeader ( chkSum_type Checksum)

Establish the Checksum value for the FrHeader.

◆ ChecksumScheme() [1/4]

INT_4U FrameCPP::Common::Verify::ChecksumScheme ( ) const
inline

Retrieve the value for the checksum scheme.

◆ ChecksumScheme() [2/4]

INT_4U FrameCPP::Common::Verify::ChecksumScheme ( ) const

Retrieve the value for the checksum scheme.

◆ ChecksumScheme() [3/4]

void FrameCPP::Common::Verify::ChecksumScheme ( INT_4U Value)
inline

Set the value for the checksum scheme.

Establish the value for the checksum scheme.

◆ ChecksumScheme() [4/4]

void FrameCPP::Common::Verify::ChecksumScheme ( INT_4U Value)

Set the value for the checksum scheme.

◆ CollectAllErrors() [1/4]

bool FrameCPP::Common::Verify::CollectAllErrors ( ) const
inline

Retrieve the value for the checksum scheme.

◆ CollectAllErrors() [2/4]

bool FrameCPP::Common::Verify::CollectAllErrors ( ) const

◆ CollectAllErrors() [3/4]

void FrameCPP::Common::Verify::CollectAllErrors ( bool Value)
inline

Set the value for the collect all errors state.

Establish the value for the checksum scheme.

Parameters
[in]ValueTrue if errors should be buffered till the end.
Note
With the buffering of errors, there may be a cascading effect.

◆ CollectAllErrors() [4/4]

void FrameCPP::Common::Verify::CollectAllErrors ( bool Value)

Set the value for the collect all errors state.

Parameters
[in]ValueTrue if errors should be buffered till the end.
Note
With the buffering of errors, there may be a cascading effect.

◆ crc_file_checksum_only() [1/2]

void Verify::crc_file_checksum_only ( IStream & Stream,
fr_header_type Header )
private

◆ crc_file_checksum_only() [2/2]

void FrameCPP::Common::Verify::crc_file_checksum_only ( IStream & Stream,
fr_header_type Header )
private

◆ ErrorInfoQueue() [1/2]

Verify::error_info_container_type FrameCPP::Common::Verify::ErrorInfoQueue ( ) const
inline

Retrieve additional infomation about an error.

◆ ErrorInfoQueue() [2/2]

error_info_container_type FrameCPP::Common::Verify::ErrorInfoQueue ( ) const

Retrieve additional infomation about an error.

◆ ExamineFrEndOfFileChecksum() [1/2]

void Verify::ExamineFrEndOfFileChecksum ( IFrameStream & Stream,
chkType_type Type,
chkSum_type Sum )

◆ ExamineFrEndOfFileChecksum() [2/2]

void FrameCPP::Common::Verify::ExamineFrEndOfFileChecksum ( IFrameStream & Stream,
chkType_type Type,
chkSum_type Sum )

◆ ExamineFrHeaderChecksum() [1/2]

void Verify::ExamineFrHeaderChecksum ( chkSum_type Checksum) const

Verify the checksum for the FrHeader structure.

Parameters
[in]ChecksumThe value of the expected checksum.

Beginning with version eight of the frame specification, the FrHeader structure has its own checksum. This routine is intended to be used to verify that checksum.

◆ ExamineFrHeaderChecksum() [2/2]

void FrameCPP::Common::Verify::ExamineFrHeaderChecksum ( chkSum_type Checksum) const

Verify the checksum for the FrHeader structure.

Parameters
[in]ChecksumThe value of the expected checksum.

◆ ExamineMagicNumber() [1/8]

template<int>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)

◆ ExamineMagicNumber() [2/8]

template<>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)
inline

◆ ExamineMagicNumber() [3/8]

template<>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)
inline

◆ ExamineMagicNumber() [4/8]

template<>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)
inline

◆ ExamineMagicNumber() [5/8]

template<int>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)

◆ ExamineMagicNumber() [6/8]

template<>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)
inline

◆ ExamineMagicNumber() [7/8]

template<>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)
inline

◆ ExamineMagicNumber() [8/8]

template<>
void FrameCPP::Common::Verify::ExamineMagicNumber ( const unsigned char * Source)
inline

◆ Expandability() [1/4]

bool FrameCPP::Common::Verify::Expandability ( ) const
inline

Retrieve the value governing checking of compressed data.

Returns
A value of true if compressed data should be expanded as part of data validation. A value of false is returned if this data check should not be performed.

◆ Expandability() [2/4]

bool FrameCPP::Common::Verify::Expandability ( ) const

Retrieve the value governing checking of compressed data.

Returns
A value of true if compressed data should be expanded as part of data validation. A value of false is returned if this data check should not be performed.

◆ Expandability() [3/4]

void FrameCPP::Common::Verify::Expandability ( bool Value)
inline

Set the value governing validation of compressed data.

Parameters
[in]ValueIf Value is true, then compressed data should be expanded as part of data validation. If Value is false, then compressed data should not be expanded as part of data validation.

◆ Expandability() [4/4]

void FrameCPP::Common::Verify::Expandability ( bool Value)

Set the value governing validation of compressed data.

Parameters
[in]ValueIf Value is true, then compressed data should be expanded as part of data validation. If Value is false, then compressed data should not be expanded as part of data validation.

◆ is_unique() [1/2]

void Verify::is_unique ( int ClassId,
const std::string & Name )
private

Verify that an object is uniquely named.

Parameters
[in]ClassIdThe class id that uniquely identifies the class type.
[in]NameThe name of the object.

◆ is_unique() [2/2]

void FrameCPP::Common::Verify::is_unique ( int ClassId,
const std::string & Name )
private

Verify that an object is uniquely named.

Parameters
[in]ClassIdThe class id that uniquely identifies the class type.
[in]NameThe name of the object.

◆ MustHaveEOFChecksum() [1/4]

bool FrameCPP::Common::Verify::MustHaveEOFChecksum ( ) const
inline

Query if the frame file must have the EOF checksum structure.

Returns
true if the frame file must have the EOF checksum structure, false otherwise

◆ MustHaveEOFChecksum() [2/4]

bool FrameCPP::Common::Verify::MustHaveEOFChecksum ( ) const

Query if the frame file must have the EOF checksum structure.

Returns
true if the frame file must have the EOF checksum structure, false otherwise

◆ MustHaveEOFChecksum() [3/4]

void FrameCPP::Common::Verify::MustHaveEOFChecksum ( bool Conformance)
inline

Change requirement of the frame file having the EOF checksum structure.

Parameters
[in]Conformancetrue if the frame file must have the EOF checksum structure, false otherwise

◆ MustHaveEOFChecksum() [4/4]

void FrameCPP::Common::Verify::MustHaveEOFChecksum ( bool Conformance)

Change requirement of the frame file having the EOF checksum structure.

Parameters
[in]Conformancetrue if the frame file must have the EOF checksum structure, false otherwise

◆ operator()() [1/4]

void Verify::operator() ( const std::string & Filename)

Verify a frame file.

◆ operator()() [2/4]

void FrameCPP::Common::Verify::operator() ( const std::string & Filename)

Verify a frame file.

◆ operator()() [3/4]

void Verify::operator() ( IFrameStream & Stream,
frame_filename_ptr_type & Filename = NULL_FRAME_FILENAME )

Verify a frame stream.

Todo
A true check for the end of file structure needs to be done for the fast check. A proposed method would be to do a seek to the end of the file minus the size of the structure. Invoke the read object call and verify the object that was read was an FrEndOfFile object. Seek back to the previous file position.

◆ operator()() [4/4]

void FrameCPP::Common::Verify::operator() ( IFrameStream & Stream,
frame_filename_ptr_type & Filename = NULL_FRAME_FILENAME )

Verify a frame stream.

◆ SeenFrEndOfFile() [1/2]

void FrameCPP::Common::Verify::SeenFrEndOfFile ( bool Value)
inline

Change status of having seen FrEndOfFile structure.

◆ SeenFrEndOfFile() [2/2]

void FrameCPP::Common::Verify::SeenFrEndOfFile ( bool Value)

Change status of having seen FrEndOfFile structure.

◆ set_channel_site() [1/2]

void FrameCPP::Common::Verify::set_channel_site ( char Site)
inlineprivate

◆ set_channel_site() [2/2]

void FrameCPP::Common::Verify::set_channel_site ( char Site)
private

◆ Strict() [1/4]

bool FrameCPP::Common::Verify::Strict ( ) const
inline

Query strict conformance requirement.

Returns
State of strictness. True for strict conformance to the frame spec; false otherwise.

◆ Strict() [2/4]

bool FrameCPP::Common::Verify::Strict ( ) const

Query strict conformance requirement.

Returns
State of strictness. True for strict conformance to the frame spec; false otherwise.

◆ Strict() [3/4]

void FrameCPP::Common::Verify::Strict ( bool Strictness)
inline

Change strict conformance requirement.

Parameters
[in]Strictnesstrue if the frame file must conform to all details of the frame spec; false otherwise.

◆ Strict() [4/4]

void FrameCPP::Common::Verify::Strict ( bool Strictness)

Change strict conformance requirement.

Parameters
[in]Strictnesstrue if the frame file must conform to all details of the frame spec; false otherwise.

◆ thrower() [1/2]

void FrameCPP::Common::Verify::thrower ( const VerifyException & Except)
inlineprivate

Handle throwing of exception.

◆ thrower() [2/2]

void FrameCPP::Common::Verify::thrower ( const VerifyException & Except)
private

Handle throwing of exception.

◆ UseMemoryMappedIO() [1/4]

bool FrameCPP::Common::Verify::UseMemoryMappedIO ( ) const
inline

Query if memory mapped I/O will be used.

Returns
true if memory mapped I/O will be used

◆ UseMemoryMappedIO() [2/4]

bool FrameCPP::Common::Verify::UseMemoryMappedIO ( ) const

Query if memory mapped I/O will be used.

Returns
true if memory mapped I/O will be used

◆ UseMemoryMappedIO() [3/4]

void FrameCPP::Common::Verify::UseMemoryMappedIO ( bool UseMemoryMappedIO)
inline

Specify if to use memory mapped I/O.

Parameters
[in]UseMemoryMappedIOtrue if memory mapped I/O should be used; false otherwise.

◆ UseMemoryMappedIO() [4/4]

void FrameCPP::Common::Verify::UseMemoryMappedIO ( bool UseMemoryMappedIO)

Specify if to use memory mapped I/O.

Parameters
[in]UseMemoryMappedIOtrue if memory mapped I/O should be used; false otherwise.

◆ ValidateMetadata() [1/4]

bool FrameCPP::Common::Verify::ValidateMetadata ( ) const
inline

Query if metadata should be validated.

Returns
true if metadata should be validated

◆ ValidateMetadata() [2/4]

bool FrameCPP::Common::Verify::ValidateMetadata ( ) const

Query if metadata should be validated.

Returns
true if metadata should be validated

◆ ValidateMetadata() [3/4]

void FrameCPP::Common::Verify::ValidateMetadata ( bool ValidateMetadata)
inline

Specify if to validate metadata.

Parameters
[in]ValidateMetadatatrue if frame metadata to be verified against the filename

◆ ValidateMetadata() [4/4]

void FrameCPP::Common::Verify::ValidateMetadata ( bool ValidateMetadata)

Specify if to validate metadata.

Parameters
[in]ValidateMetadatatrue if frame metadata to be verified against the filename

◆ verify_checksum() [1/2]

void Verify::verify_checksum ( CheckSum * ExpectedCRC,
CheckSum * CalculatedCRC,
const std::string & FrStructure,
bool MustBeNonZero,
bool InFrame = true ) const
private

Verify Checksum values.

Parameters
[in]ExpectedCRCThe checksum that was written to the stream origionally and used for comparison to detect changes.
[in]CalculatedCRCThe checksum that was calculated while reading the current stream and used for comparison to detect changes.
[in]FrStructureThe name of the structure being verified. This allows for better error handling code as this detail becomes part of any diagnostic message.
[in]MustBeNonZeroIf true, then checksum values of zero are considered to be an error. This condition commonly comes into play when no checksum information is recorded in the output stream usually to provide a minimal performance boost.
[in]InFrameTrue if checksum is in frame, false otherwise (checksums in FrEndOfFile structure )

◆ verify_checksum() [2/2]

void FrameCPP::Common::Verify::verify_checksum ( CheckSum * ExpectedCRC,
CheckSum * CalculatedCRC,
const std::string & FrStructure,
bool MustBeNonZero,
bool InFrame = true ) const
private

Verify Checksum values.

Parameters
[in]ExpectedCRCThe checksum that was written to the stream origionally and used for comparison to detect changes.
[in]CalculatedCRCThe checksum that was calculated while reading the current stream and used for comparison to detect changes.
[in]FrStructureThe name of the structure being verified. This allows for better error handling code as this detail becomes part of any diagnostic message.
[in]MustBeNonZeroIf true, then checksum values of zero are considered to be an error. This condition commonly comes into play when no checksum information is recorded in the output stream usually to provide a minimal performance boost.
[in]InFrameTrue if checksum is in frame, false otherwise (checksums in FrEndOfFile structure )

◆ FrameSpec::ObjectInterface::VerifyObject [1/2]

void FrameSpec::ObjectInterface::VerifyObject ( Verify & Verifier,
IFrameStream & Stream ) const
friend

◆ FrameSpec::ObjectInterface::VerifyObject [2/2]

void FrameSpec::ObjectInterface::VerifyObject ( Verify & Verifier,
IFrameStream & Stream ) const
friend

Member Data Documentation

◆ check_for_duplicate_channel_names

bool FrameCPP::Common::Verify::check_for_duplicate_channel_names
private

State of checking for duplicate channel names.

◆ collect_all_errors

bool FrameCPP::Common::Verify::collect_all_errors
private

◆ error_info_container

error_info_container_type FrameCPP::Common::Verify::error_info_container
private

◆ frame_offset

INT_4U FrameCPP::Common::Verify::frame_offset
private

◆ m_buffer_size

INT_8U FrameCPP::Common::Verify::m_buffer_size
private

◆ m_channel_validation

detector_validation_type FrameCPP::Common::Verify::m_channel_validation
private

◆ m_channel_validation_excess

detector_validation_type FrameCPP::Common::Verify::m_channel_validation_excess
private

◆ m_check_data_valid

bool FrameCPP::Common::Verify::m_check_data_valid
private

◆ m_check_data_valid_all

bool FrameCPP::Common::Verify::m_check_data_valid_all
private

◆ m_check_expandability

bool FrameCPP::Common::Verify::m_check_expandability
private

Expandability checking.

When enabled (set to true), data that has been compressed will be expanded as part of validation.

This check is enabled by default.

◆ m_check_fast

bool FrameCPP::Common::Verify::m_check_fast
private

Enable fast checking.

Fast checking is only available for version 8 frames and beyond since with version 8 frames each structure contains its own checksum.

When this option is set, file and frame checksums are not calculated. Validation of the other information makes use of the table of contents.

◆ m_check_file_checksum

bool FrameCPP::Common::Verify::m_check_file_checksum
private

◆ m_check_frame_checksum

bool FrameCPP::Common::Verify::m_check_frame_checksum
private

◆ m_check_md5sum

bool FrameCPP::Common::Verify::m_check_md5sum
private

◆ m_checksum_file_only

bool FrameCPP::Common::Verify::m_checksum_file_only
private

◆ m_checksum_frheader

chkSum_type FrameCPP::Common::Verify::m_checksum_frheader
private

The checksum of the FrHeader structure upon reading the object.

◆ m_checksum_scheme

INT_4U FrameCPP::Common::Verify::m_checksum_scheme
private

Beginning with version eight frame specification, the checksum_scheme needs to be recorded from the FrHeader structure to be used by the FrEndOfFile structure.

◆ m_detector_validation

detector_validation_type FrameCPP::Common::Verify::m_detector_validation
private

◆ m_detector_validation_excess

detector_validation_type FrameCPP::Common::Verify::m_detector_validation_excess
private

◆ m_must_have_eof_checksum

bool FrameCPP::Common::Verify::m_must_have_eof_checksum
private

◆ m_state_has_seen_fr_end_of_file

bool FrameCPP::Common::Verify::m_state_has_seen_fr_end_of_file
private

◆ m_strict

bool FrameCPP::Common::Verify::m_strict
private

◆ m_use_memory_mapped_io

bool FrameCPP::Common::Verify::m_use_memory_mapped_io
private

◆ m_validate_metadata

bool FrameCPP::Common::Verify::m_validate_metadata
private

◆ name_cache

name_cache_type FrameCPP::Common::Verify::name_cache
private

Cache of channel names and object class ids.

◆ NULL_FRAME_FILENAME

frame_filename_ptr_type FrameCPP::Common::Verify::NULL_FRAME_FILENAME
static

The documentation for this class was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/ldas-tools-framecpp-3.0.4-build/ldas-tools-framecpp-3.0.4/build/include/framecpp/Common/Verify.hh
  • /home/abuild/rpmbuild/BUILD/ldas-tools-framecpp-3.0.4-build/ldas-tools-framecpp-3.0.4/src/Common/Verify.hh
  • /home/abuild/rpmbuild/BUILD/ldas-tools-framecpp-3.0.4-build/ldas-tools-framecpp-3.0.4/src/Common/Verify.cc