15 #ifndef VISIONTRANSFER_DEVICEINFO_H
16 #define VISIONTRANSFER_DEVICEINFO_H
20 namespace visiontransfer {
29 : lastFps(0.0), jumboSize(0), currentCaptureSource(
""), validStatus(false) { }
30 DeviceStatus(
double lastFps,
unsigned int jumboSize,
const std::string& currentCaptureSource)
31 : lastFps(lastFps), jumboSize(jumboSize), currentCaptureSource(currentCaptureSource), validStatus(true) { }
32 bool isValid()
const {
return validStatus; }
33 double getLastFps()
const {
return lastFps; }
34 unsigned int getJumboMtu()
const {
return jumboSize; }
35 unsigned int getJumboFramesEnabled()
const {
return jumboSize > 0; }
36 std::string getCurrentCaptureSource()
const {
return currentCaptureSource; }
39 unsigned int jumboSize;
40 std::string currentCaptureSource;
56 enum NetworkProtocol {
64 DeviceInfo(): ip(
""), protocol(PROTOCOL_TCP), fwVersion(
""), model(SCENESCAN),
79 DeviceInfo(
const char* ip, NetworkProtocol protocol,
const char* fwVersion,
80 DeviceModel model,
bool compatible)
81 : ip(ip), protocol(protocol), fwVersion(fwVersion), model(model),
82 compatible(compatible) {
88 DeviceInfo(
const char* ip, NetworkProtocol protocol,
const char* fwVersion,
89 DeviceModel model,
bool compatible,
const DeviceStatus& status)
90 : ip(ip), protocol(protocol), fwVersion(fwVersion), model(model),
91 compatible(compatible), status(status){
125 DeviceModel
getModel()
const {
return model;}
130 DeviceStatus
getStatus()
const {
return status; }
145 std::string ret = ip +
"; ";
147 case SCENESCAN_PRO: ret +=
"SceneScan Pro";
break;
148 case SCENESCAN: ret +=
"SceneScan";
break;
149 case SCARLET: ret +=
"Scarlet";
break;
150 case RUBY: ret +=
"Ruby";
break;
151 default: ret +=
"Unknown";
break;
154 ret +=
"; " + fwVersion +
"; " + (compatible ?
"compatible" :
"incompatible");
162 return ip == other.ip && protocol == other.protocol && fwVersion == other.fwVersion
163 && model == other.model && compatible == other.compatible;
168 NetworkProtocol protocol;
169 std::string fwVersion;