Zivid C++ API 2.14.0+e4a0c4a9-1
Zivid::CameraInfo Class Reference

Information about camera model, serial number etc. More...

#include <Zivid/CameraInfo.h>

Classes

class  FirmwareVersion
 The firmware version on the camera. More...
 
class  HardwareRevision
 Hardware revision of this camera. This corresponds to the revision string that is printed on the product label. More...
 
class  Model
 The model of the camera. More...
 
class  ModelName
 The model name of the camera. This is a user-friendly display name that may contain spaces and special characters. We recommend to use Model instead if you want to programmatically check for camera model. More...
 
class  Revision
 Major/Minor hardware revision number. This field is deprecated and may be removed in a future version of the SDK. Please use HardwareRevision instead. More...
 
class  SerialNumber
 The serial number of the camera. More...
 
class  UserData
 Information about user data capabilities of the camera. More...
 

Public Types

using Descendants
 

Public Member Functions

 CameraInfo ()
 Default constructor.
 
 CameraInfo (const std::string &fileName)
 Construct CameraInfo by loading from file.
 
std::string serialize () const
 Serialize to a string.
 
template<typename... Args>
 CameraInfo (Args &&...args)
 Constructor taking variadic number of arguments.
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments.
 
template<typename... Args>
CameraInfo copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s)
 
const FirmwareVersionfirmwareVersion () const
 Get FirmwareVersion.
 
FirmwareVersionfirmwareVersion ()
 Get FirmwareVersion.
 
CameraInfoset (const FirmwareVersion &value)
 Set FirmwareVersion.
 
const HardwareRevisionhardwareRevision () const
 Get HardwareRevision.
 
HardwareRevisionhardwareRevision ()
 Get HardwareRevision.
 
CameraInfoset (const HardwareRevision &value)
 Set HardwareRevision.
 
const Modelmodel () const
 Get Model.
 
Modelmodel ()
 Get Model.
 
CameraInfoset (const Model &value)
 Set Model.
 
const ModelNamemodelName () const
 Get ModelName.
 
ModelNamemodelName ()
 Get ModelName.
 
CameraInfoset (const ModelName &value)
 Set ModelName.
 
const Revisionrevision () const
 Get Revision.
 
Revisionrevision ()
 Get Revision.
 
CameraInfoset (const Revision &value)
 Set Revision.
 
CameraInfoset (const Revision::Major &value)
 Set Revision::Major.
 
CameraInfoset (const Revision::Minor &value)
 Set Revision::Minor.
 
const SerialNumberserialNumber () const
 Get SerialNumber.
 
SerialNumberserialNumber ()
 Get SerialNumber.
 
CameraInfoset (const SerialNumber &value)
 Set SerialNumber.
 
const UserDatauserData () const
 Get UserData.
 
UserDatauserData ()
 Get UserData.
 
CameraInfoset (const UserData &value)
 Set UserData.
 
CameraInfoset (const UserData::MaxSizeBytes &value)
 Set UserData::MaxSizeBytes.
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::FirmwareVersion >::value, int >::type = 0>
const CameraInfo::FirmwareVersionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::HardwareRevision >::value, int >::type = 0>
const CameraInfo::HardwareRevisionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Model >::value, int >::type = 0>
const CameraInfo::Modelget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::ModelName >::value, int >::type = 0>
const CameraInfo::ModelNameget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision >::value, int >::type = 0>
const CameraInfo::Revisionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision::Major >::value, int >::type = 0>
const CameraInfo::Revision::Majorget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision::Minor >::value, int >::type = 0>
const CameraInfo::Revision::Minorget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::SerialNumber >::value, int >::type = 0>
const CameraInfo::SerialNumberget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::UserData >::value, int >::type = 0>
const CameraInfo::UserDataget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::UserData::MaxSizeBytes >::value, int >::type = 0>
const CameraInfo::UserData::MaxSizeBytesget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const CameraInfo::FirmwareVersionget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraInfo::HardwareRevisionget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraInfo::Modelget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraInfo::ModelNameget () const
 
template<size_t i, typename std::enable_if< i==4, int >::type = 0>
const CameraInfo::Revisionget () const
 
template<size_t i, typename std::enable_if< i==5, int >::type = 0>
const CameraInfo::SerialNumberget () const
 
template<size_t i, typename std::enable_if< i==6, int >::type = 0>
const CameraInfo::UserDataget () const
 
template<typename F >
void forEach (const F &f) const
 Run the given function on each direct member with the value of the member as parameter.
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter.
 
bool operator== (const CameraInfo &other) const
 Equality operator.
 
bool operator!= (const CameraInfo &other) const
 Inequality operator.
 
std::string toString () const
 Get the value as string.
 
void save (const std::string &fileName) const
 Save to the given file.
 
void load (const std::string &fileName)
 Load from the given file.
 

Static Public Member Functions

static CameraInfo fromSerialized (const std::string &value)
 Construct a new CameraInfo instance from a previously serialized string.
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node.
 
static constexpr const char * path { "" }
 The full path for this value.
 
static constexpr const char * name { "CameraInfo" }
 The name of this value.
 
static constexpr const char * description
 The description for this value.
 
static constexpr size_t version { 6 }
 

Friends

struct DataModel::Detail::Befriend< CameraInfo >
 
std::ostream & operator<< (std::ostream &stream, const CameraInfo &value)
 Operator to send the value as string to a stream.
 

Detailed Description

Information about camera model, serial number etc.

Member Typedef Documentation

◆ Descendants

Initial value:
std::tuple<
CameraInfo::FirmwareVersion,
CameraInfo::HardwareRevision,
CameraInfo::Model,
CameraInfo::ModelName,
CameraInfo::Revision,
CameraInfo::Revision::Major,
CameraInfo::Revision::Minor,
CameraInfo::SerialNumber,
CameraInfo::UserData,
CameraInfo::UserData::MaxSizeBytes>

Constructor & Destructor Documentation

◆ CameraInfo() [1/3]

Zivid::CameraInfo::CameraInfo ( )

Default constructor.

◆ CameraInfo() [2/3]

Zivid::CameraInfo::CameraInfo ( const std::string & fileName)
explicit

Construct CameraInfo by loading from file.

◆ CameraInfo() [3/3]

template<typename... Args>
Zivid::CameraInfo::CameraInfo ( Args &&... args)
inlineexplicit

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing CameraInfo then invoking set(args).

The provided arguments must be descendants of CameraInfo. These types can be provided:

Member Function Documentation

◆ copyWith()

template<typename... Args>
CameraInfo Zivid::CameraInfo::copyWith ( Args &&... args) const
inline

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this CameraInfo object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of CameraInfo. These types can be provided:

◆ firmwareVersion() [1/2]

FirmwareVersion & Zivid::CameraInfo::firmwareVersion ( )
inline

◆ firmwareVersion() [2/2]

const FirmwareVersion & Zivid::CameraInfo::firmwareVersion ( ) const
inline

◆ forEach() [1/2]

template<typename F >
void Zivid::CameraInfo::forEach ( const F & f)
inline

Run the given function on each direct member with the value of the member as parameter.

◆ forEach() [2/2]

template<typename F >
void Zivid::CameraInfo::forEach ( const F & f) const
inline

Run the given function on each direct member with the value of the member as parameter.

◆ fromSerialized()

static CameraInfo Zivid::CameraInfo::fromSerialized ( const std::string & value)
staticnodiscard

Construct a new CameraInfo instance from a previously serialized string.

See also serialize.

◆ get() [1/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::FirmwareVersion >::value, int >::type = 0>
const CameraInfo::FirmwareVersion & Zivid::CameraInfo::get ( ) const
inline

◆ get() [2/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::HardwareRevision >::value, int >::type = 0>
const CameraInfo::HardwareRevision & Zivid::CameraInfo::get ( ) const
inline

◆ get() [3/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Model >::value, int >::type = 0>
const CameraInfo::Model & Zivid::CameraInfo::get ( ) const
inline

◆ get() [4/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::ModelName >::value, int >::type = 0>
const CameraInfo::ModelName & Zivid::CameraInfo::get ( ) const
inline

◆ get() [5/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision >::value, int >::type = 0>
const CameraInfo::Revision & Zivid::CameraInfo::get ( ) const
inline

◆ get() [6/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision::Major >::value, int >::type = 0>
const CameraInfo::Revision::Major & Zivid::CameraInfo::get ( ) const
inline

◆ get() [7/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision::Minor >::value, int >::type = 0>
const CameraInfo::Revision::Minor & Zivid::CameraInfo::get ( ) const
inline

◆ get() [8/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::SerialNumber >::value, int >::type = 0>
const CameraInfo::SerialNumber & Zivid::CameraInfo::get ( ) const
inline

◆ get() [9/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::UserData >::value, int >::type = 0>
const CameraInfo::UserData & Zivid::CameraInfo::get ( ) const
inline

◆ get() [10/17]

template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::UserData::MaxSizeBytes >::value, int >::type = 0>
const CameraInfo::UserData::MaxSizeBytes & Zivid::CameraInfo::get ( ) const
inline

◆ get() [11/17]

template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const CameraInfo::FirmwareVersion & Zivid::CameraInfo::get ( ) const
inline

◆ get() [12/17]

template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraInfo::HardwareRevision & Zivid::CameraInfo::get ( ) const
inline

◆ get() [13/17]

template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraInfo::Model & Zivid::CameraInfo::get ( ) const
inline

◆ get() [14/17]

template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraInfo::ModelName & Zivid::CameraInfo::get ( ) const
inline

◆ get() [15/17]

template<size_t i, typename std::enable_if< i==4, int >::type = 0>
const CameraInfo::Revision & Zivid::CameraInfo::get ( ) const
inline

◆ get() [16/17]

template<size_t i, typename std::enable_if< i==5, int >::type = 0>
const CameraInfo::SerialNumber & Zivid::CameraInfo::get ( ) const
inline

◆ get() [17/17]

template<size_t i, typename std::enable_if< i==6, int >::type = 0>
const CameraInfo::UserData & Zivid::CameraInfo::get ( ) const
inline

◆ hardwareRevision() [1/2]

HardwareRevision & Zivid::CameraInfo::hardwareRevision ( )
inline

◆ hardwareRevision() [2/2]

const HardwareRevision & Zivid::CameraInfo::hardwareRevision ( ) const
inline

◆ load()

void Zivid::CameraInfo::load ( const std::string & fileName)

Load from the given file.

◆ model() [1/2]

Model & Zivid::CameraInfo::model ( )
inline

Get Model.

◆ model() [2/2]

const Model & Zivid::CameraInfo::model ( ) const
inline

Get Model.

◆ modelName() [1/2]

ModelName & Zivid::CameraInfo::modelName ( )
inline

Get ModelName.

◆ modelName() [2/2]

const ModelName & Zivid::CameraInfo::modelName ( ) const
inline

Get ModelName.

◆ operator!=()

bool Zivid::CameraInfo::operator!= ( const CameraInfo & other) const

Inequality operator.

◆ operator==()

bool Zivid::CameraInfo::operator== ( const CameraInfo & other) const

Equality operator.

◆ revision() [1/2]

Revision & Zivid::CameraInfo::revision ( )
inline

Get Revision.

◆ revision() [2/2]

const Revision & Zivid::CameraInfo::revision ( ) const
inline

Get Revision.

◆ save()

void Zivid::CameraInfo::save ( const std::string & fileName) const

Save to the given file.

◆ serialize()

std::string Zivid::CameraInfo::serialize ( ) const

Serialize to a string.

See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.

◆ serialNumber() [1/2]

SerialNumber & Zivid::CameraInfo::serialNumber ( )
inline

◆ serialNumber() [2/2]

const SerialNumber & Zivid::CameraInfo::serialNumber ( ) const
inline

◆ set() [1/11]

template<typename... Args>
void Zivid::CameraInfo::set ( Args &&... args)
inline

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of CameraInfo. These types can be provided:

◆ set() [2/11]

CameraInfo & Zivid::CameraInfo::set ( const FirmwareVersion & value)
inline

◆ set() [3/11]

CameraInfo & Zivid::CameraInfo::set ( const HardwareRevision & value)
inline

◆ set() [4/11]

CameraInfo & Zivid::CameraInfo::set ( const Model & value)
inline

Set Model.

◆ set() [5/11]

CameraInfo & Zivid::CameraInfo::set ( const ModelName & value)
inline

Set ModelName.

◆ set() [6/11]

CameraInfo & Zivid::CameraInfo::set ( const Revision & value)
inline

Set Revision.

◆ set() [7/11]

CameraInfo & Zivid::CameraInfo::set ( const Revision::Major & value)
inline

◆ set() [8/11]

CameraInfo & Zivid::CameraInfo::set ( const Revision::Minor & value)
inline

◆ set() [9/11]

CameraInfo & Zivid::CameraInfo::set ( const SerialNumber & value)
inline

◆ set() [10/11]

CameraInfo & Zivid::CameraInfo::set ( const UserData & value)
inline

Set UserData.

◆ set() [11/11]

CameraInfo & Zivid::CameraInfo::set ( const UserData::MaxSizeBytes & value)
inline

◆ toString()

std::string Zivid::CameraInfo::toString ( ) const

Get the value as string.

◆ userData() [1/2]

UserData & Zivid::CameraInfo::userData ( )
inline

Get UserData.

◆ userData() [2/2]

const UserData & Zivid::CameraInfo::userData ( ) const
inline

Get UserData.

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< CameraInfo >

friend struct DataModel::Detail::Befriend< CameraInfo >
friend

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const CameraInfo & value )
friend

Operator to send the value as string to a stream.

Member Data Documentation

◆ description

const char* Zivid::CameraInfo::description
staticconstexpr
Initial value:
{
R"description(Information about camera model, serial number etc.)description"
}

The description for this value.

◆ name

const char* Zivid::CameraInfo::name { "CameraInfo" }
staticconstexpr

The name of this value.

◆ nodeType

DataModel::NodeType Zivid::CameraInfo::nodeType = DataModel::NodeType::group
staticconstexpr

The type of this node.

◆ path

const char* Zivid::CameraInfo::path { "" }
staticconstexpr

The full path for this value.

◆ version

size_t Zivid::CameraInfo::version { 6 }
staticconstexpr

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