Zivid C++ API  1.4.0+956f554d-12
Defining the Future of 3D Machine Vision
Classes | Public Member Functions | Static Public Attributes | Friends | List of all members
Zivid::CameraState Class Reference

Information about camera connection state, live mode, temperatures, etc. More...

#include <Zivid/CameraState.h>

Classes

class  Available
 Flag if camera is physically connected to the computer, but not connected in software. When the camera is in this state, you can call connect(). More...
 
class  Connected
 Flag if camera is connected in software More...
 
class  Live
 Camera live status More...
 
class  Temperature
 Current temperature(s) More...
 
struct  Version
 
struct  Version< 1 >
 

Public Member Functions

 ~CameraState ()
 Destructor More...
 
 CameraState (const CameraState &other)
 Copy constructor More...
 
CameraStateoperator= (const CameraState &other)
 Assignment operator More...
 
 CameraState (CameraState &&other) noexcept
 Move constructor More...
 
CameraStateoperator= (CameraState &&other) noexcept
 Move assignment operator More...
 
 CameraState ()=default
 Default constructor More...
 
void set (const std::string &fullPath, const std::string &value)
 Set a value from string by specifying the path More...
 
std::string getString (const std::string &fullPath) const
 Get a value as string by specifying the path More...
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Available >::value, int >::type = 0>
const CameraState::Availableget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Connected >::value, int >::type = 0>
const CameraState::Connectedget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Live >::value, int >::type = 0>
const CameraState::Liveget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Temperature >::value, int >::type = 0>
const CameraState::Temperatureget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Temperature::DMD >::value, int >::type = 0>
const CameraState::Temperature::DMDget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Temperature::General >::value, int >::type = 0>
const CameraState::Temperature::Generalget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Temperature::LED >::value, int >::type = 0>
const CameraState::Temperature::LEDget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Temperature::Lens >::value, int >::type = 0>
const CameraState::Temperature::Lensget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraState::Temperature::PCB >::value, int >::type = 0>
const CameraState::Temperature::PCBget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const CameraState::Availableget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraState::Connectedget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraState::Liveget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraState::Temperatureget () const
 
 CameraState (const Available &available, const Connected &connected, const Live &live, const Temperature &temperature)
 Constructor More...
 
CameraStateset (const Available &value)
 Set Available More...
 
const AvailableisAvailable () const
 Get Available More...
 
CameraStateset (const Connected &value)
 Set Connected More...
 
const ConnectedisConnected () const
 Get Connected More...
 
CameraStateset (const Live &value)
 Set Live More...
 
const Livelive () const
 Get Live More...
 
CameraStateset (const Temperature &value)
 Set Temperature More...
 
const Temperaturetemperature () const
 Get Temperature More...
 
CameraStateset (const Temperature::DMD &value)
 Set Temperature::DMD More...
 
CameraStateset (const Temperature::General &value)
 Set Temperature::General More...
 
CameraStateset (const Temperature::LED &value)
 Set Temperature::LED More...
 
CameraStateset (const Temperature::Lens &value)
 Set Temperature::Lens More...
 
CameraStateset (const Temperature::PCB &value)
 Set Temperature::PCB More...
 
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...
 
template<typename F >
void traverseValues (const F &f) const
 Traverse the entire tree using the given function with the value of the member as parameter More...
 
template<typename F >
void traverseValues (const F &f)
 Traverse all members using the given function with the value of the member as parameter More...
 
std::string toString () const
 Get the value as string More...
 
void setFromString (const std::string &value)
 Set from the given string More...
 
bool operator== (const CameraState &other) const
 Equality operator More...
 
bool operator!= (const CameraState &other) const
 Inequality operator More...
 
 CameraState (const std::string &fileName)
 Construct object by loading from file 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 size_t version { 1 }
 
static constexpr bool isContainer { true }
 Whether this node contains child values More...
 
static constexpr const char * path { "" }
 The full path for this value More...
 
static constexpr const char * name { "CameraState" }
 The name of this value More...
 
static constexpr const char * description
 The description for this value More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const CameraState &value)
 Operator to send the value as string to a stream More...
 
std::istream & operator>> (std::istream &stream, CameraState &value)
 Operator to set the value from a stream More...
 

Detailed Description

Information about camera connection state, live mode, temperatures, etc.

Constructor & Destructor Documentation

◆ ~CameraState()

Zivid::CameraState::~CameraState ( )

Destructor

◆ CameraState() [1/5]

Zivid::CameraState::CameraState ( const CameraState other)

Copy constructor

◆ CameraState() [2/5]

Zivid::CameraState::CameraState ( CameraState &&  other)
noexcept

Move constructor

◆ CameraState() [3/5]

Zivid::CameraState::CameraState ( )
default

Default constructor

◆ CameraState() [4/5]

Zivid::CameraState::CameraState ( const Available available,
const Connected connected,
const Live live,
const Temperature temperature 
)
explicit

Constructor

◆ CameraState() [5/5]

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

Construct object by loading from file

Member Function Documentation

◆ forEach() [1/2]

template<typename F >
void Zivid::CameraState::forEach ( const F &  f) const
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::CameraState::forEach ( const F &  f)
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, CameraState::Available >::value, int >::type = 0>
const CameraState::Available& Zivid::CameraState::get ( ) const
inline

◆ get() [2/13]

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

◆ get() [3/13]

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

◆ get() [4/13]

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

◆ get() [5/13]

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

◆ get() [6/13]

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

◆ get() [7/13]

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

◆ get() [8/13]

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

◆ get() [9/13]

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

◆ get() [10/13]

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

◆ get() [11/13]

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

◆ get() [12/13]

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

◆ get() [13/13]

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

◆ getString()

std::string Zivid::CameraState::getString ( const std::string &  fullPath) const

Get a value as string by specifying the path

◆ isAvailable()

const Available& Zivid::CameraState::isAvailable ( ) const
inline

Get Available

◆ isConnected()

const Connected& Zivid::CameraState::isConnected ( ) const
inline

Get Connected

◆ live()

const Live& Zivid::CameraState::live ( ) const
inline

Get Live

◆ load()

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

Load from the given file

◆ operator!=()

bool Zivid::CameraState::operator!= ( const CameraState other) const

Inequality operator

◆ operator=() [1/2]

CameraState& Zivid::CameraState::operator= ( const CameraState other)

Assignment operator

◆ operator=() [2/2]

CameraState& Zivid::CameraState::operator= ( CameraState &&  other)
noexcept

Move assignment operator

◆ operator==()

bool Zivid::CameraState::operator== ( const CameraState other) const

Equality operator

◆ save()

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

Save to the given file

◆ set() [1/10]

void Zivid::CameraState::set ( const std::string &  fullPath,
const std::string &  value 
)

Set a value from string by specifying the path

◆ set() [2/10]

CameraState& Zivid::CameraState::set ( const Available value)
inline

Set Available

◆ set() [3/10]

CameraState& Zivid::CameraState::set ( const Connected value)
inline

Set Connected

◆ set() [4/10]

CameraState& Zivid::CameraState::set ( const Live value)
inline

Set Live

◆ set() [5/10]

CameraState& Zivid::CameraState::set ( const Temperature value)
inline

◆ set() [6/10]

CameraState& Zivid::CameraState::set ( const Temperature::DMD value)
inline

◆ set() [7/10]

CameraState& Zivid::CameraState::set ( const Temperature::General value)
inline

◆ set() [8/10]

CameraState& Zivid::CameraState::set ( const Temperature::LED value)
inline

◆ set() [9/10]

CameraState& Zivid::CameraState::set ( const Temperature::Lens value)
inline

◆ set() [10/10]

CameraState& Zivid::CameraState::set ( const Temperature::PCB value)
inline

◆ setFromString()

void Zivid::CameraState::setFromString ( const std::string &  value)

Set from the given string

◆ temperature()

const Temperature& Zivid::CameraState::temperature ( ) const
inline

◆ toString()

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

Get the value as string

◆ traverseValues() [1/2]

template<typename F >
void Zivid::CameraState::traverseValues ( const F &  f) const
inline

Traverse the entire tree using the given function with the value of the member as parameter

◆ traverseValues() [2/2]

template<typename F >
void Zivid::CameraState::traverseValues ( const F &  f)
inline

Traverse all members using the given function with the value of the member as parameter

Friends And Related Function Documentation

◆ operator<<

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

Operator to send the value as string to a stream

◆ operator>>

std::istream& operator>> ( std::istream &  stream,
CameraState value 
)
friend

Operator to set the value from a stream

Member Data Documentation

◆ description

constexpr const char* Zivid::CameraState::description
static
Initial value:
{
R"description(Information about camera connection state, live mode, temperatures, etc.)description"
}

The description for this value

◆ isContainer

constexpr bool Zivid::CameraState::isContainer { true }
static

Whether this node contains child values

◆ name

constexpr const char* Zivid::CameraState::name { "CameraState" }
static

The name of this value

◆ path

constexpr const char* Zivid::CameraState::path { "" }
static

The full path for this value

◆ version

constexpr size_t Zivid::CameraState::version { 1 }
static

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