All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GENAPI_NAMESPACE::CFirmwareUpdateInfo Class Reference

Identifies a single firmware update and holds information about the firmware update. More...

#include <FirmwareUpdateInfo.h>

Public Member Functions

 CFirmwareUpdateInfo ()
 Creates an empty CFirmwareUpdateInfo object. More...
 
 CFirmwareUpdateInfo (const CFirmwareUpdateInfo &Rhs)
 Creates a copy of CFirmwareUpdateInfo object. More...
 
GENICAM_NAMESPACE::gcstring ExtractVersionFromDeviceFirmwareVersion (const GENICAM_NAMESPACE::gcstring &DeviceFirmwareVersionFromDevice) const
 Extracts the firmware version using the device firmware version and the regular expression provided by the key FirmwareUpdateInfoKey_VersionExtractionPattern. More...
 
size_t GetCountOfInfos () const
 Returns the count of available key value pairs. More...
 
const char * GetInfo (const char *InfoKey) const
 Returns the value for an info key name. More...
 
const char * GetInfo (const char *InfoKey, const char *pDefaultValueIfNotAvailable) const
 Returns the value for an info key name. More...
 
const char * GetInfo (size_t Index) const
 Returns the value for the given index. More...
 
const char * GetInfoKey (size_t Index) const
 Returns the key name for the given index. More...
 
const char * GetInfoLanguageCode (const char *InfoKey) const
 Returns the ISO 639-1 language code for a key name, e.g. More...
 
const char * GetUpdateFilename () const
 Returns the source file of an firmware update. More...
 
bool IsValid () const
 Checks if valid information is held. More...
 
CFirmwareUpdateInfooperator= (const CFirmwareUpdateInfo &Rhs)
 Creates a copy of CFirmwareUpdateInfo object. More...
 
bool operator== (const CFirmwareUpdateInfo &Rhs) const
 Compares two CFirmwareUpdateInfo objects. More...
 
 ~CFirmwareUpdateInfo ()
 Destroys the CFirmwareUpdateInfo object. More...
 

Protected Attributes

CFirmwareUpdateInfoImpl * m_pImpl
 

Detailed Description

Identifies a single firmware update and holds information about the firmware update.

  • Identifies a single firmware update.
  • All data held is constant and therefore never changes.
  • Holds the preconditions for uploading a FW update package. The actual preconditions for an update are not accessible.
  • Holds displayable information.
  • Supports internationalization.
  • Can be stored in container classes, e.g. std::vector. This helps to keep one instance in different containers to support creating different views on update info when handling multiple updates and update files.

The CFirmwareUpdateInfo class is not thread-safe.

Definition at line 72 of file FirmwareUpdateInfo.h.

Constructor & Destructor Documentation

◆ CFirmwareUpdateInfo() [1/2]

GENAPI_NAMESPACE::CFirmwareUpdateInfo::CFirmwareUpdateInfo ( )

Creates an empty CFirmwareUpdateInfo object.

CFirmwareUpdateInfo::IsValid() will return false. Valid CFirmwareUpdateInfo() objects are created by calling CFirmwareUpdater::ReadFirmwareUpdateInfos().

Does not throw C++ exceptions, except when memory allocation fails.

◆ CFirmwareUpdateInfo() [2/2]

GENAPI_NAMESPACE::CFirmwareUpdateInfo::CFirmwareUpdateInfo ( const CFirmwareUpdateInfo Rhs)

Creates a copy of CFirmwareUpdateInfo object.

Parameters
[in]RhsThe object to copy. The CFirmwareUpdateInfo class uses reference counting. It is freely copyable without copying the held data. This helps to keep this class in different containers to support creating different views on update info when handling multiple updates and update files.

Does not throw C++ exceptions.

◆ ~CFirmwareUpdateInfo()

GENAPI_NAMESPACE::CFirmwareUpdateInfo::~CFirmwareUpdateInfo ( )

Destroys the CFirmwareUpdateInfo object.

Does not throw C++ exceptions.

Member Function Documentation

◆ ExtractVersionFromDeviceFirmwareVersion()

GENICAM_NAMESPACE::gcstring GENAPI_NAMESPACE::CFirmwareUpdateInfo::ExtractVersionFromDeviceFirmwareVersion ( const GENICAM_NAMESPACE::gcstring DeviceFirmwareVersionFromDevice) const

Extracts the firmware version using the device firmware version and the regular expression provided by the key FirmwareUpdateInfoKey_VersionExtractionPattern.

Parameters
[in]DeviceFirmwareVersionFromDeviceThe device version from the DeviceFirmwareVersion node value of a device.
Returns
The extracted firmware version with the style defined by FirmwareUpdateInfoKey_VersionStyle. The returned value can be used for comparing firmware versions on a device to the version provided by an firmware update.

Throws a RuntimeException if the regular expression match fails. Throws a LogicalErrorException if the keys FirmwareUpdateInfoKey_VersionStyle and FirmwareUpdateInfoKey_VersionExtractionPattern are not available.

◆ GetCountOfInfos()

size_t GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetCountOfInfos ( ) const

Returns the count of available key value pairs.

Returns
Returns the count of available key value pairs. The count can be 0 if the object is empty, see IsValid().

Does not throw C++ exceptions.

◆ GetInfo() [1/3]

const char* GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetInfo ( const char *  InfoKey) const

Returns the value for an info key name.

Parameters
[in]InfoKeyThe key name, e.g. FirmwareUpdateInfoKey_Description.
Returns
Returns the value for an info key name. Returns an empty string if the key it is not available.

Does not throw C++ exceptions.

◆ GetInfo() [2/3]

const char* GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetInfo ( const char *  InfoKey,
const char *  pDefaultValueIfNotAvailable 
) const

Returns the value for an info key name.

Parameters
[in]InfoKeyThe key name, e.g. FirmwareUpdateInfoKey_Description.
[in]pDefaultValueIfNotAvailableThe default to return if the key it is not available.
Returns
Returns the value for an info key name. Returns pDefaultValueIfNotAvailable if the key it is not available.

Does not throw C++ exceptions.

◆ GetInfo() [3/3]

const char* GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetInfo ( size_t  Index) const

Returns the value for the given index.

Parameters
[in]IndexThe key value pair index.
Returns
Returns the value for the given index. Never returns NULL.

Throws an InvalidArgumentException if the given Index is out of bounds.

◆ GetInfoKey()

const char* GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetInfoKey ( size_t  Index) const

Returns the key name for the given index.

Parameters
[in]IndexThe key value pair index.
Returns
Returns the key name for the given index. Never returns NULL.

Throws an InvalidArgumentException if the given Index is out of bounds.

◆ GetInfoLanguageCode()

const char* GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetInfoLanguageCode ( const char *  InfoKey) const

Returns the ISO 639-1 language code for a key name, e.g.

"de".

Parameters
[in]InfoKeyThe key name, e.g. FirmwareUpdateInfoKey_Description.
Returns
Returns the language code for the given key name. Returns an empty string if the key cannot be found or if the language code is undefined.

Does not throw C++ exceptions.

◆ GetUpdateFilename()

const char* GENAPI_NAMESPACE::CFirmwareUpdateInfo::GetUpdateFilename ( ) const

Returns the source file of an firmware update.

Returns
Returns the source file of an firmware update. If the IsValid() is false an empty string is returned.

Does not throw C++ exceptions.

◆ IsValid()

bool GENAPI_NAMESPACE::CFirmwareUpdateInfo::IsValid ( ) const

Checks if valid information is held.

Returns
Returns true if the class contains valid information. Objects created by calling CFirmwareUpdater::ReadFirmwareUpdateInfos() are valid. Objects created only by the constructor CFirmwareUpdateInfo() are not valid.

Does not throw C++ exceptions.

◆ operator=()

CFirmwareUpdateInfo& GENAPI_NAMESPACE::CFirmwareUpdateInfo::operator= ( const CFirmwareUpdateInfo Rhs)

Creates a copy of CFirmwareUpdateInfo object.

Parameters
[in]RhsThe object to assign. The CFirmwareUpdateInfo class uses reference counting. It is freely copyable without copying the held data. This helps to keep this class in different containers to support creating different views on update info when handling multiple updates and update files.

Does not throw C++ exceptions.

◆ operator==()

bool GENAPI_NAMESPACE::CFirmwareUpdateInfo::operator== ( const CFirmwareUpdateInfo Rhs) const

Compares two CFirmwareUpdateInfo objects.

Returns true if absolute identical information is held.

Parameters
[in]RhsThe object to compare with this object.
Returns
Returns true if absolute identical information is held.

Does not throw C++ exceptions.

Member Data Documentation

◆ m_pImpl

CFirmwareUpdateInfoImpl* GENAPI_NAMESPACE::CFirmwareUpdateInfo::m_pImpl
protected

Definition at line 217 of file FirmwareUpdateInfo.h.


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


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:12