15 #ifndef VISIONTRANSFER_DEVICEINFO_H 16 #define VISIONTRANSFER_DEVICEINFO_H 32 enum NetworkProtocol {
40 DeviceInfo(): ip(
""), protocol(PROTOCOL_TCP), fwVersion(
""), model(SCENESCAN),
55 DeviceInfo(
const char* ip, NetworkProtocol protocol,
const char* fwVersion,
56 DeviceModel model,
bool compatible)
57 : ip(ip), protocol(protocol), fwVersion(fwVersion), model(model),
58 compatible(compatible) {
107 return ip +
"; SceneScan" + (model == SCENESCAN_PRO ?
" Pro" :
"")
108 +
"; " + fwVersion +
"; " + (compatible ?
"compatible" :
"incompatible");
115 return ip == other.ip && protocol == other.protocol && fwVersion == other.fwVersion
116 && model == other.model && compatible == other.compatible;
121 NetworkProtocol protocol;
122 std::string fwVersion;
DeviceModel getModel() const
Gets the model identifier of the discovered device.
bool operator==(const DeviceInfo &other) const
Comparison operator for comparing two DeviceInfo objects.
std::string getIpAddress() const
Gets the IP address of the device.
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.
std::string toString() const
Converts this object to a printable string.
std::string getFirmwareVersion() const
Gets the firmware version of the device.
Aggregates information about a discovered device.
bool isCompatible() const
Returns true if the device is compatible with this API version.
DeviceInfo()
Constructs an empty object with default information.
NetworkProtocol getNetworkProtocol() const
Gets the network protocol of the device.