libvisiontransfer  10.6.0
Public Types | Public Member Functions | List of all members
visiontransfer::DeviceInfo Class Reference

Detailed Description

Aggregates information about a discovered device.

Definition at line 59 of file deviceinfo.h.

#include <visiontransfer/deviceinfo.h>

Public Types

enum  DeviceModel { SCENESCAN, SCENESCAN_PRO, SCARLET, RUBY }
 
enum  NetworkProtocol { PROTOCOL_TCP, PROTOCOL_UDP }
 

Public Member Functions

 DeviceInfo ()
 Constructs an empty object with default information. More...
 
 DeviceInfo (const char *ip, NetworkProtocol protocol, const char *fwVersion, DeviceModel model, bool compatible)
 Constructs an object by initializing all members with data from the given parameters. More...
 
 DeviceInfo (const char *ip, NetworkProtocol protocol, const char *fwVersion, DeviceModel model, bool compatible, const DeviceStatus &status)
 Construct DeviceInfo with pre-initialized DeviceStatus field, for received health reports. More...
 
std::string getIpAddress () const
 Gets the IP address of the device. More...
 
NetworkProtocol getNetworkProtocol () const
 Gets the network protocol of the device. More...
 
std::string getFirmwareVersion () const
 Gets the firmware version of the device. More...
 
DeviceModel getModel () const
 Gets the model identifier of the discovered device. More...
 
DeviceStatus getStatus () const
 Return the status / health as reported by the device. More...
 
bool isCompatible () const
 Returns true if the device is compatible with this API version. More...
 
std::string toString () const
 Converts this object to a printable string. More...
 
bool operator== (const DeviceInfo &other) const
 Comparison operator for comparing two DeviceInfo objects. More...
 

Constructor & Destructor Documentation

◆ DeviceInfo() [1/3]

visiontransfer::DeviceInfo::DeviceInfo ( )
inline

Constructs an empty object with default information.

Definition at line 76 of file deviceinfo.h.

◆ DeviceInfo() [2/3]

visiontransfer::DeviceInfo::DeviceInfo ( const char *  ip,
NetworkProtocol  protocol,
const char *  fwVersion,
DeviceModel  model,
bool  compatible 
)
inline

Constructs an object by initializing all members with data from the given parameters.

Parameters
ipIP address of the discovered device.
protocolNetwork protocol of the discovered device.
fwVersionFirmware version as string.
modelModel of the discovered device
compatibleIndicates if the device is compatible with this API version.

Definition at line 91 of file deviceinfo.h.

◆ DeviceInfo() [3/3]

visiontransfer::DeviceInfo::DeviceInfo ( const char *  ip,
NetworkProtocol  protocol,
const char *  fwVersion,
DeviceModel  model,
bool  compatible,
const DeviceStatus status 
)
inline

Construct DeviceInfo with pre-initialized DeviceStatus field, for received health reports.

Definition at line 100 of file deviceinfo.h.

Member Function Documentation

◆ getFirmwareVersion()

std::string visiontransfer::DeviceInfo::getFirmwareVersion ( ) const
inline

Gets the firmware version of the device.

Returns
Firmware version encoded as string.

A firmware version string typically consists of a major, minor and patch version, like for example "1.2.34". For special firmware releases, however, the firmware string might deviate.

Definition at line 128 of file deviceinfo.h.

◆ getIpAddress()

std::string visiontransfer::DeviceInfo::getIpAddress ( ) const
inline

Gets the IP address of the device.

Returns
Device IP address.

Definition at line 110 of file deviceinfo.h.

◆ getModel()

DeviceModel visiontransfer::DeviceInfo::getModel ( ) const
inline

Gets the model identifier of the discovered device.

Returns
The device model.

Currently supported models are SCENESCAN, SCENESCAN_PRO, SCARLET and RUBY.

Definition at line 137 of file deviceinfo.h.

◆ getNetworkProtocol()

NetworkProtocol visiontransfer::DeviceInfo::getNetworkProtocol ( ) const
inline

Gets the network protocol of the device.

Returns
Device network protocol.

Possible network protocols are PROTOCOL_TCP or PROTOCOL_UDP.

Definition at line 118 of file deviceinfo.h.

◆ getStatus()

DeviceStatus visiontransfer::DeviceInfo::getStatus ( ) const
inline

Return the status / health as reported by the device.

Definition at line 142 of file deviceinfo.h.

◆ isCompatible()

bool visiontransfer::DeviceInfo::isCompatible ( ) const
inline

Returns true if the device is compatible with this API version.

Definition at line 148 of file deviceinfo.h.

◆ operator==()

bool visiontransfer::DeviceInfo::operator== ( const DeviceInfo other) const
inline

Comparison operator for comparing two DeviceInfo objects.

Definition at line 173 of file deviceinfo.h.

◆ toString()

std::string visiontransfer::DeviceInfo::toString ( ) const
inline

Converts this object to a printable string.

All information is concatenated into a readable string, which can for example be printed to a terminal.

Definition at line 156 of file deviceinfo.h.


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