BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
DeviceSearchCommand.h
1 #pragma once
2 
3 #include <string>
4 
5 #include <Poco/Nullable.h>
6 #include <Poco/Timespan.h>
7 
8 #include <Poco/Net/IPAddress.h>
9 
10 #include "core/PrefixCommand.h"
11 #include "model/DeviceCriteria.h"
12 #include "model/DevicePrefix.h"
13 #include "net/MACAddress.h"
14 
15 namespace BeeeOn {
16 
28 public:
29  typedef Poco::AutoPtr<DeviceSearchCommand> Ptr;
30 
32  const DevicePrefix &prefix,
33  const DeviceCriteria &criteria,
34  const Poco::Timespan &duration);
35 
36  DeviceCriteria criteria() const;
37 
38  bool hasIPAddress() const;
39  Poco::Net::IPAddress ipAddress() const;
40 
41  bool hasMACAddress() const;
42  MACAddress macAddress() const;
43 
44  bool hasSerialNumber() const;
45  uint64_t serialNumber() const;
46 
47  Poco::Timespan duration() const;
48 
49  std::string toString() const override;
50 
51 private:
52  DeviceCriteria m_criteria;
53  Poco::Timespan m_duration;
54 };
55 
56 }
DeviceSearchCommand requests a device manager to start searching for a single device specified by eit...
Definition: DeviceSearchCommand.h:27
Definition: MACAddress.h:8
Ancestor for Commands that are related to a specific DevicePrefix only.
Definition: PrefixCommand.h:12
DeviceCriteria holds a criteria for device searching. Device can be search by one of the following pr...
Definition: DeviceCriteria.h:20
std::string toString() const override
Definition: DeviceSearchCommand.cpp:60