BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
GWNewDeviceRequest.h
1 #pragma once
2 
3 #include <list>
4 #include <string>
5 
6 #include <Poco/SharedPtr.h>
7 #include <Poco/Timespan.h>
8 #include <Poco/JSON/Object.h>
9 
10 #include "gwmessage/GWRequest.h"
11 #include "model/DeviceDescription.h"
12 #include "model/DeviceID.h"
13 #include "model/ModuleType.h"
14 
15 namespace BeeeOn {
16 
64 class GWNewDeviceRequest : public GWRequest {
65 public:
66  typedef Poco::SharedPtr<GWNewDeviceRequest> Ptr;
67 
69  GWNewDeviceRequest(const Poco::JSON::Object::Ptr object);
70 
71  void setDeviceID(const DeviceID &deviceID);
72  DeviceID deviceID() const;
73 
74  void setProductName(const std::string &name);
75  std::string productName() const;
76 
77  void setVendor(const std::string &vendor);
78  std::string vendor() const;
79 
80  void setModuleTypes(const std::list<ModuleType> &types);
81  std::list<ModuleType> moduleTypes() const;
82 
83  void setRefreshTime(const Poco::Timespan &time);
84  Poco::Timespan refreshTime() const;
85 
86  void setDeviceDescription(const DeviceDescription &description);
87  DeviceDescription deviceDescription() const;
88 
89  static Poco::JSON::Array::Ptr serializeModuleTypes(
90  const std::list<ModuleType> &types);
91  static std::list<ModuleType> parseModuleTypes(
92  const Poco::JSON::Array::Ptr arrayOfTypes);
93 };
94 
95 }
Abstract class representing a request message. The GWRequest can not be used alone, but it must be inherited by a specific request object.
Definition: GWRequest.h:25
Represents a message sent by the gateway to the server after discovering new device in the sensoric n...
Definition: GWNewDeviceRequest.h:64
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