libvisiontransfer  6.0.0
Public Types | Public Member Functions | List of all members
DeviceInfo Class Reference

Aggregates information about a discovered device. More...

#include <visiontransfer/deviceinfo.h>

Public Types

enum  DeviceModel { SCENESCAN, SCENESCAN_PRO }
 
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...
 
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...
 
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...
 

Detailed Description

Aggregates information about a discovered device.

Definition at line 23 of file deviceinfo.h.

Constructor & Destructor Documentation

DeviceInfo::DeviceInfo ( )
inline

Constructs an empty object with default information.

Definition at line 38 of file deviceinfo.h.

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 53 of file deviceinfo.h.

Member Function Documentation

std::string 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 81 of file deviceinfo.h.

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

Gets the IP address of the device.

Returns
Device IP address.

Definition at line 63 of file deviceinfo.h.

DeviceModel DeviceInfo::getModel ( ) const
inline

Gets the model identifier of the discovered device.

Returns
The device model.

Currently supported models are SCENESCAN and SCENESCAN_PRO.

Definition at line 89 of file deviceinfo.h.

NetworkProtocol 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 71 of file deviceinfo.h.

bool DeviceInfo::isCompatible ( ) const
inline

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

Definition at line 96 of file deviceinfo.h.

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

Comparison operator for comparing two DeviceInfo objects.

Definition at line 112 of file deviceinfo.h.

std::string 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 104 of file deviceinfo.h.


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