Zivid C++ API 2.13.1+18e79e79-1
|
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 FirmwareVersion & | firmwareVersion () const |
Get FirmwareVersion. | |
FirmwareVersion & | firmwareVersion () |
Get FirmwareVersion. | |
CameraInfo & | set (const FirmwareVersion &value) |
Set FirmwareVersion. | |
const HardwareRevision & | hardwareRevision () const |
Get HardwareRevision. | |
HardwareRevision & | hardwareRevision () |
Get HardwareRevision. | |
CameraInfo & | set (const HardwareRevision &value) |
Set HardwareRevision. | |
const Model & | model () const |
Get Model. | |
Model & | model () |
Get Model. | |
CameraInfo & | set (const Model &value) |
Set Model. | |
const ModelName & | modelName () const |
Get ModelName. | |
ModelName & | modelName () |
Get ModelName. | |
CameraInfo & | set (const ModelName &value) |
Set ModelName. | |
const Revision & | revision () const |
Get Revision. | |
Revision & | revision () |
Get Revision. | |
CameraInfo & | set (const Revision &value) |
Set Revision. | |
CameraInfo & | set (const Revision::Major &value) |
Set Revision::Major. | |
CameraInfo & | set (const Revision::Minor &value) |
Set Revision::Minor. | |
const SerialNumber & | serialNumber () const |
Get SerialNumber. | |
SerialNumber & | serialNumber () |
Get SerialNumber. | |
CameraInfo & | set (const SerialNumber &value) |
Set SerialNumber. | |
const UserData & | userData () const |
Get UserData. | |
UserData & | userData () |
Get UserData. | |
CameraInfo & | set (const UserData &value) |
Set UserData. | |
CameraInfo & | set (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::FirmwareVersion & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::HardwareRevision >::value, int >::type = 0> | |
const CameraInfo::HardwareRevision & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Model >::value, int >::type = 0> | |
const CameraInfo::Model & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::ModelName >::value, int >::type = 0> | |
const CameraInfo::ModelName & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision >::value, int >::type = 0> | |
const CameraInfo::Revision & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision::Major >::value, int >::type = 0> | |
const CameraInfo::Revision::Major & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::Revision::Minor >::value, int >::type = 0> | |
const CameraInfo::Revision::Minor & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::SerialNumber >::value, int >::type = 0> | |
const CameraInfo::SerialNumber & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::UserData >::value, int >::type = 0> | |
const CameraInfo::UserData & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraInfo::UserData::MaxSizeBytes >::value, int >::type = 0> | |
const CameraInfo::UserData::MaxSizeBytes & | get () const |
template<size_t i, typename std::enable_if< i==0, int >::type = 0> | |
const CameraInfo::FirmwareVersion & | get () const |
template<size_t i, typename std::enable_if< i==1, int >::type = 0> | |
const CameraInfo::HardwareRevision & | get () const |
template<size_t i, typename std::enable_if< i==2, int >::type = 0> | |
const CameraInfo::Model & | get () const |
template<size_t i, typename std::enable_if< i==3, int >::type = 0> | |
const CameraInfo::ModelName & | get () const |
template<size_t i, typename std::enable_if< i==4, int >::type = 0> | |
const CameraInfo::Revision & | get () const |
template<size_t i, typename std::enable_if< i==5, int >::type = 0> | |
const CameraInfo::SerialNumber & | get () const |
template<size_t i, typename std::enable_if< i==6, int >::type = 0> | |
const CameraInfo::UserData & | get () 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 ZIVID_NODISCARD 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 { 5 } |
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. | |
Information about camera model, serial number etc.
Zivid::CameraInfo::CameraInfo | ( | ) |
Default constructor.
|
explicit |
Construct CameraInfo by loading from file.
|
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:
|
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:
|
inline |
Get FirmwareVersion.
|
inline |
Get FirmwareVersion.
|
inline |
Run the given function on each direct member with the value of the member as parameter.
|
inline |
Run the given function on each direct member with the value of the member as parameter.
|
static |
Construct a new CameraInfo instance from a previously serialized string.
See also serialize.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get HardwareRevision.
|
inline |
Get HardwareRevision.
void Zivid::CameraInfo::load | ( | const std::string & | fileName | ) |
Load from the given file.
bool Zivid::CameraInfo::operator!= | ( | const CameraInfo & | other | ) | const |
Inequality operator.
bool Zivid::CameraInfo::operator== | ( | const CameraInfo & | other | ) | const |
Equality operator.
void Zivid::CameraInfo::save | ( | const std::string & | fileName | ) | const |
Save to the given file.
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.
|
inline |
Get SerialNumber.
|
inline |
Get SerialNumber.
|
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:
|
inline |
Set FirmwareVersion.
|
inline |
Set HardwareRevision.
|
inline |
Set Model.
|
inline |
Set ModelName.
|
inline |
Set Revision.
|
inline |
Set Revision::Major.
|
inline |
Set Revision::Minor.
|
inline |
Set SerialNumber.
|
inline |
Set UserData.
|
inline |
std::string Zivid::CameraInfo::toString | ( | ) | const |
Get the value as string.
|
friend |
|
friend |
Operator to send the value as string to a stream.
|
staticconstexpr |
The description for this value.
|
staticconstexpr |
The name of this value.
|
staticconstexpr |
The type of this node.
|
staticconstexpr |
The full path for this value.
|
staticconstexpr |