Zivid C++ API 2.11.1+de9b5dae-1
Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
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  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
 The hardware revision of the camera. 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 = std::tuple< CameraInfo::FirmwareVersion, CameraInfo::Model, CameraInfo::ModelName, CameraInfo::Revision, CameraInfo::Revision::Major, CameraInfo::Revision::Minor, CameraInfo::SerialNumber, CameraInfo::UserData, CameraInfo::UserData::MaxSizeBytes >
 

Public Member Functions

 CameraInfo ()
 Default constructor.
 
 CameraInfo (const std::string &fileName)
 Construct CameraInfo by loading from file.
 
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 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::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::Modelget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraInfo::ModelNameget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraInfo::Revisionget () const
 
template<size_t i, typename std::enable_if< i==4, int >::type = 0>
const CameraInfo::SerialNumberget () const
 
template<size_t i, typename std::enable_if< i==5, 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 Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node.
 
static constexpr const charpath { "" }
 The full path for this value.
 
static constexpr const charname { "CameraInfo" }
 The name of this value.
 
static constexpr const chardescription
 The description for this value.
 
static constexpr size_t version { 4 }
 

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

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.

◆ get() [1/15]

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

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() [3/15]

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() [4/15]

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() [5/15]

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() [6/15]

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() [7/15]

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() [8/15]

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() [9/15]

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() [10/15]

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

◆ get() [11/15]

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

◆ get() [12/15]

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

◆ get() [13/15]

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

◆ get() [14/15]

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

◆ get() [15/15]

template<size_t i, typename std::enable_if< i==5, int >::type = 0>
const CameraInfo::UserData & Zivid::CameraInfo::get ( ) 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!=()

Inequality operator.

◆ operator==()

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.

◆ serialNumber() [1/2]

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

◆ serialNumber() [2/2]

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

◆ set() [1/10]

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

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

◆ set() [3/10]

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

Set Model.

◆ set() [4/10]

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

Set ModelName.

◆ set() [5/10]

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

Set Revision.

◆ set() [6/10]

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

◆ set() [7/10]

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

◆ set() [8/10]

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

◆ set() [9/10]

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

Set UserData.

◆ set() [10/10]

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

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

The description for this value.

◆ name

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

The name of this value.

◆ nodeType

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

The type of this node.

◆ path

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

The full path for this value.

◆ version

constexpr size_t Zivid::CameraInfo::version { 4 }
staticconstexpr

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