ldas-tools-framecpp  2.5.8
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
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 LDASTools::AL::SharedPtr< 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 ()
 
INT_8U BufferSize () const
 retrun: INT_8U - return size in bytes of the I/O buffer. More...
 
void BufferSize (INT_8U Bytes)
 Change the size of the I/O buffer. More...
 
bool CheckDataValid () const
 return: bool - state of checking that the data valid field is zero More...
 
void CheckDataValid (bool Check)
 param: bool Check - true if the data valid field must be zero, false More...
 
bool CheckDataValidAll () const
 
void CheckDataValidAll (bool Check)
 
void CheckFast (bool Check)
 Request fast checking. More...
 
bool CheckFast () const
 Query if fast checking has been requested. More...
 
bool CheckFileChecksum () const
 return: bool - true if checksums for frame files need to be More...
 
void CheckFileChecksum (bool Check)
 param: bool Check - true if checksums for frame files need to be More...
 
bool CheckFileChecksumOnly () const
 
void CheckFileChecksumOnly (bool Check)
 
bool CheckForDuplicateChannelNames () const
 Query if duplicate channel name checking has been requested. More...
 
void CheckForDuplicateChannelNames (bool Check)
 Request checking for duplicate channel names. More...
 
bool CheckFrameChecksum () const
 return: bool - true if checksums for individual frames need to be More...
 
void CheckFrameChecksum (bool Check)
 param: bool Check - true if checksums for individual frames need to be More...
 
bool CheckMD5Sum () const
 return: bool - true if md5sum for the frame file will be More...
 
void CheckMD5Sum (bool Check)
 param: bool Check - true if md5sum for the frame file should be More...
 
void ChecksumHeader (chkSum_type Checksum)
 Establish the Checksum value for the FrHeader. More...
 
INT_4U ChecksumScheme () const
 Retrieve the value for the checksum scheme. More...
 
void ChecksumScheme (INT_4U Value)
 Set the value for the checksum scheme. More...
 
bool CollectAllErrors () const
 Retrieve the value for the checksum scheme. More...
 
void CollectAllErrors (bool Value)
 Set the value for the collect all errors state. More...
 
error_info_container_type ErrorInfoQueue () const
 Retrieve additional infomation about an error. More...
 
bool Expandability () const
 Retrieve the value governing checking of compressed data. More...
 
void Expandability (bool Value)
 Set the value governing validation of compressed data. More...
 
bool MustHaveEOFChecksum () const
 return: bool - true if the frame file must have the EOF checksum More...
 
void MustHaveEOFChecksum (bool Conformance)
 Change requirement of the frame file having the EOF checksum structure. More...
 
void SeenFrEndOfFile (bool Value)
 
bool Strict () const
 return: bool - state of strictness. True for strict conformance to More...
 
void Strict (bool Strictness)
 param: bool Strictness - true if the frame file must conform to all More...
 
bool UseMemoryMappedIO () const
 return: bool - true if memory mapped I/O will be used More...
 
void UseMemoryMappedIO (bool UseMemoryMappedIO)
 param: bool UseMemoryMappedIO - true if memory mapped I/O should be More...
 
bool ValidateMetadata () const
 return: bool - true if metadata should be validated More...
 
void ValidateMetadata (bool ValidateMetadata)
 param: bool ValidateMetadata - true if frame metadata to be verified against More...
 
void operator() (const std::string &Filename)
 
void operator() (IFrameStream &Stream, frame_filename_ptr_type &Filename=NULL_FRAME_FILENAME)
 
void ExamineFrEndOfFileChecksum (IFrameStream &Stream, chkType_type Type, chkSum_type Sum)
 
void ExamineFrHeaderChecksum (chkSum_type Checksum) const
 Verify the checksum for the FrHeader structure. More...
 
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)
 

Static Public Attributes

static frame_filename_ptr_type NULL_FRAME_FILENAME
 

Friends

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

Member Typedef Documentation

◆ chkSum_type

◆ chkType_type

◆ error_info_container_type

◆ error_info_type

typedef LDASTools::AL::SharedPtr< std::exception > FrameCPP::Common::Verify::error_info_type

◆ error_type

◆ frame_filename_ptr_type

Constructor & Destructor Documentation

◆ Verify()

Verify::Verify ( )

Member Function Documentation

◆ BufferSize() [1/2]

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

retrun: INT_8U - return size in bytes of the I/O buffer.

◆ BufferSize() [2/2]

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.

◆ CheckDataValid() [1/2]

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

return: bool - state of checking that the data valid field is zero

◆ CheckDataValid() [2/2]

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

param: bool Check - true if the data valid field must be zero, false

◆ CheckDataValidAll() [1/2]

bool FrameCPP::Common::Verify::CheckDataValidAll ( ) const
inline
Returns
state of checking that the data valid field is zero

◆ CheckDataValidAll() [2/2]

void FrameCPP::Common::Verify::CheckDataValidAll ( bool  Check)
inline
Parameters
[in]Trueif the data valid field must be zero, false otherwise.

◆ CheckFast() [1/2]

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

Request fast checking.

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

◆ CheckFast() [2/2]

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

Query if fast checking has been requested.

Returns
True if fast checking should be attempted.

◆ CheckFileChecksum() [1/2]

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

return: bool - true if checksums for frame files need to be

◆ CheckFileChecksum() [2/2]

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

param: bool Check - true if checksums for frame files need to be

◆ CheckFileChecksumOnly() [1/2]

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

◆ CheckFileChecksumOnly() [2/2]

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

◆ CheckForDuplicateChannelNames() [1/2]

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/2]

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

Request checking for duplicate channel names.

◆ CheckFrameChecksum() [1/2]

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

return: bool - true if checksums for individual frames need to be

◆ CheckFrameChecksum() [2/2]

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

param: bool Check - true if checksums for individual frames need to be

◆ CheckMD5Sum() [1/2]

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

return: bool - true if md5sum for the frame file will be

◆ CheckMD5Sum() [2/2]

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

param: bool Check - true if md5sum for the frame file should be

◆ ChecksumHeader()

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.

◆ ChecksumScheme() [1/2]

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

Retrieve the value for the checksum scheme.

◆ ChecksumScheme() [2/2]

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

Set the value for the checksum scheme.

Establish the value for the checksum scheme.

◆ CollectAllErrors() [1/2]

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

Retrieve the value for the checksum scheme.

◆ CollectAllErrors() [2/2]

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.

◆ ErrorInfoQueue()

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

Retrieve additional infomation about an error.

◆ ExamineFrEndOfFileChecksum()

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

◆ ExamineFrHeaderChecksum()

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.

◆ ExamineMagicNumber() [1/4]

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

◆ ExamineMagicNumber() [2/4]

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

◆ ExamineMagicNumber() [3/4]

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

◆ ExamineMagicNumber() [4/4]

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

◆ Expandability() [1/2]

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/2]

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.

◆ MustHaveEOFChecksum() [1/2]

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

return: bool - true if the frame file must have the EOF checksum

◆ MustHaveEOFChecksum() [2/2]

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

◆ operator()() [1/2]

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

◆ operator()() [2/2]

void Verify::operator() ( IFrameStream Stream,
frame_filename_ptr_type Filename = NULL_FRAME_FILENAME 
)
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.

◆ SeenFrEndOfFile()

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

◆ Strict() [1/2]

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

return: bool - state of strictness. True for strict conformance to

◆ Strict() [2/2]

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

param: bool Strictness - true if the frame file must conform to all

◆ UseMemoryMappedIO() [1/2]

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

return: bool - true if memory mapped I/O will be used

◆ UseMemoryMappedIO() [2/2]

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

param: bool UseMemoryMappedIO - true if memory mapped I/O should be

◆ ValidateMetadata() [1/2]

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

return: bool - true if metadata should be validated

◆ ValidateMetadata() [2/2]

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

param: bool ValidateMetadata - true if frame metadata to be verified against

Friends And Related Function Documentation

◆ FrameSpec::ObjectInterface::VerifyObject

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

Member Data Documentation

◆ NULL_FRAME_FILENAME

Verify::frame_filename_ptr_type Verify::NULL_FRAME_FILENAME
static

The documentation for this class was generated from the following files: