15 #ifndef VISIONTRANSFER_DEVICEINFO_H 16 #define VISIONTRANSFER_DEVICEINFO_H 30 enum NetworkProtocol {
38 DeviceInfo(): ip(
""), protocol(PROTOCOL_TCP), fwVersion(
""), model(SCENESCAN),
53 DeviceInfo(
const char* ip, NetworkProtocol protocol,
const char* fwVersion,
54 DeviceModel model,
bool compatible)
55 : ip(ip), protocol(protocol), fwVersion(fwVersion), model(model),
56 compatible(compatible) {
105 return ip +
"; SceneScan" + (model == SCENESCAN_PRO ?
" Pro" :
"")
106 +
"; " + fwVersion +
"; " + (compatible ?
"compatible" :
"incompatible");
113 return ip == other.ip && protocol == other.protocol && fwVersion == other.fwVersion
114 && model == other.model && compatible == other.compatible;
119 NetworkProtocol protocol;
120 std::string fwVersion;
bool isCompatible() const
Returns true if the device is compatible with this API version.
bool operator==(const DeviceInfo &other) const
Comparison operator for comparing two DeviceInfo objects.
std::string toString() const
Converts this object to a printable string.
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 getFirmwareVersion() const
Gets the firmware version of the device.
DeviceInfo()
Constructs an empty object with default information.
DeviceModel getModel() const
Gets the model identifier of the discovered device.
Aggregates information about a discovered device.
NetworkProtocol getNetworkProtocol() const
Gets the network protocol of the device.