BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
NewDeviceCommand.h
1 #pragma once
2 
3 #include <list>
4 
5 #include <Poco/Timespan.h>
6 
7 #include "core/Command.h"
8 #include "model/DeviceDescription.h"
9 #include "model/DeviceID.h"
10 #include "model/ModuleType.h"
11 
12 namespace BeeeOn {
13 
14 /*
15  * The command that informs the server about new device and
16  * data types, which it sends.
17  */
18 class NewDeviceCommand : public Command {
19 public:
20  typedef Poco::AutoPtr<NewDeviceCommand> Ptr;
21 
22  NewDeviceCommand(const DeviceDescription &description);
23 
24  DeviceID deviceID() const;
25  std::string vendor() const;
26  std::string productName() const;
27  std::list<ModuleType> dataTypes() const;
28  bool supportsRefreshTime() const;
29  Poco::Timespan refreshTime() const;
30 
31  std::string toString() const override;
32  const DeviceDescription &description() const;
33 
34 protected:
36 
37 private:
38  DeviceDescription m_description;
39 };
40 
41 }
Definition: NewDeviceCommand.h:18
Definition: Command.h:25
std::string toString() const override
Definition: NewDeviceCommand.cpp:48
Definition: DeviceID.h:17
The class wraps information about a device&#39;s type. It describes its properties and provided sensor ty...
Definition: DeviceDescription.h:21