Zivid  1.0.1+3607.8a7510c4
Zivid API
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 <CameraState.h>

Classes

class  Available
 Flag if camera is available for use or not More...
 
class  Connected
 Flag if camera is initialized or not More...
 
class  Live
 Camera live status More...
 
class  Temperature
 Current temperature(s) More...
 

Public Member Functions

 CameraState (const std::string &fileName)
 Construct object by loading from file 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...
 
CameraStateset (const Connected &value)
 Set Connected More...
 
const ConnectedisConnected () const
 Get Connected More...
 
CameraStateset (const Available &value)
 Set Available More...
 
const AvailableisAvailable () const
 Get Available 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::General &value)
 Set Temperature::General More...
 
CameraStateset (const Temperature::Lens &value)
 Set Temperature::Lens More...
 
CameraStateset (const Temperature::LED &value)
 Set Temperature::LED More...
 
CameraStateset (const Temperature::PCB &value)
 Set Temperature::PCB More...
 
CameraStateset (const Temperature::DMD &value)
 Set Temperature::DMD 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 save (const std::string &fileName) const
 Save to the given file More...
 
void setFromString (const std::string &value)
 Set from the given string More...
 
void load (const std::string &fileName)
 Load from the given file More...
 
bool operator== (const CameraState &other) const
 Equality operator More...
 
bool operator!= (const CameraState &other) const
 Inequality operator More...
 

Static Public Attributes

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

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 ( 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

◆ 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==()

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 Connected value)
inline

Set Connected

◆ set() [3/10]

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

Set Available

◆ 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::General value)
inline

◆ set() [7/10]

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

◆ set() [8/10]

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

◆ set() [9/10]

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

◆ set() [10/10]

CameraState& Zivid::CameraState::set ( const Temperature::DMD 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

◆ 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


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