Zivid C++ API  2.4.2+1a2e8cfb-1
Defining the Future of 3D Machine Vision
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  ModelName
 The model name of the camera 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::ModelName, CameraInfo::Revision, CameraInfo::Revision::Major, CameraInfo::Revision::Minor, CameraInfo::SerialNumber, CameraInfo::UserData, CameraInfo::UserData::MaxSizeBytes >
 

Public Member Functions

 CameraInfo ()
 Default constructor More...
 
 CameraInfo (const std::string &fileName)
 Construct CameraInfo by loading from file More...
 
template<typename... Args>
 CameraInfo (Args &&...args)
 Constructor taking variadic number of arguments More...
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments More...
 
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) More...
 
const FirmwareVersionfirmwareVersion () const
 Get FirmwareVersion More...
 
FirmwareVersionfirmwareVersion ()
 Get FirmwareVersion More...
 
CameraInfoset (const FirmwareVersion &value)
 Set FirmwareVersion More...
 
const ModelNamemodelName () const
 Get ModelName More...
 
ModelNamemodelName ()
 Get ModelName More...
 
CameraInfoset (const ModelName &value)
 Set ModelName More...
 
const Revisionrevision () const
 Get Revision More...
 
Revisionrevision ()
 Get Revision More...
 
CameraInfoset (const Revision &value)
 Set Revision More...
 
CameraInfoset (const Revision::Major &value)
 Set Revision::Major More...
 
CameraInfoset (const Revision::Minor &value)
 Set Revision::Minor More...
 
const SerialNumberserialNumber () const
 Get SerialNumber More...
 
SerialNumberserialNumber ()
 Get SerialNumber More...
 
CameraInfoset (const SerialNumber &value)
 Set SerialNumber More...
 
const UserDatauserData () const
 Get UserData More...
 
UserDatauserData ()
 Get UserData More...
 
CameraInfoset (const UserData &value)
 Set UserData More...
 
CameraInfoset (const UserData::MaxSizeBytes &value)
 Set UserData::MaxSizeBytes More...
 
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::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::ModelNameget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraInfo::Revisionget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraInfo::SerialNumberget () const
 
template<size_t i, typename std::enable_if< i==4, 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 More...
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter More...
 
bool operator== (const CameraInfo &other) const
 Equality operator More...
 
bool operator!= (const CameraInfo &other) const
 Inequality operator More...
 
std::string toString () const
 Get the value as string More...
 
void save (const std::string &fileName) const
 Save to the given file More...
 
void load (const std::string &fileName)
 Load from the given file More...
 

Static Public Attributes

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

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 More...
 

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

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

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

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

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

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

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

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

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

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

◆ get() [10/13]

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

◆ get() [11/13]

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

◆ get() [12/13]

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

◆ get() [13/13]

template<size_t i, typename std::enable_if< i==4, 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

◆ 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

◆ serialNumber() [1/2]

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

◆ serialNumber() [2/2]

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

◆ set() [1/9]

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

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

◆ set() [3/9]

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

Set ModelName

◆ set() [4/9]

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

Set Revision

◆ set() [5/9]

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

◆ set() [6/9]

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

◆ set() [7/9]

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

◆ set() [8/9]

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

Set UserData

◆ set() [9/9]

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 Function 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 { 1 }
staticconstexpr

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