CPP Device Virtualization API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E92477-09
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
GatewayDevice.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3  *
4  * This software is dual-licensed to you under the MIT License (MIT) and
5  * the Universal Permissive License (UPL). See the LICENSE file in the root
6  * directory for license terms. You may choose either license, or both.
7  */
8 
9 #pragma once
10 
12 #include <map>
13 #include <string>
14 #include <initializer_list>
15 #include <stdexcept>
16 
17 
18 
19 
20 namespace iotdcl {
21 #if defined IOTCS_GATEWAY || defined IOTCS_DOXYGEN
22 
29  public:
34  static const std::string MANUFACTURER;
35 
40  static const std::string MODEL_NUMBER;
41 
46  static const std::string SERIAL_NUMBER;
47 
52  static const std::string DEVICE_CLASS;
53 
58  static const std::string PROTOCOL;
59 
64  static const std::string PROTOCOL_DEVICE_CLASS;
65 
70  static const std::string PROTOCOL_DEVICE_ID;
71 
81  GatewayDevice(const std::string &filePath, const std::string &password) throw (std::invalid_argument, GeneralException);
82 
86  virtual ~GatewayDevice();
87 
144  std::string registerDevice(const bool restricted,
145  const std::string &hardwareId,
146  const std::map<std::string, std::string> &metaData,
147  const std::initializer_list<std::string> &urns) throw (GeneralException, CanNotAuthorizeException, std::invalid_argument) ;
148  };
149 #endif
150 };
Definition: DirectlyConnectedDevice.hpp:30
Definition: GatewayDevice.hpp:28
static const std::string SERIAL_NUMBER
The.
Definition: GatewayDevice.hpp:46
virtual ~GatewayDevice()
Destructor.
A directly-connected device is able to send messages to, and receive messages from, the IoT server.
static const std::string PROTOCOL
The.
Definition: GatewayDevice.hpp:58
Common exception.
Definition: Exception.hpp:34
static const std::string PROTOCOL_DEVICE_CLASS
The.
Definition: GatewayDevice.hpp:64
static const std::string MANUFACTURER
The.
Definition: GatewayDevice.hpp:34
std::string registerDevice(const bool restricted, const std::string &hardwareId, const std::map< std::string, std::string > &metaData, const std::initializer_list< std::string > &urns)
Register an indirectly-connected device with the cloud service and specify whether the gateway device...
static const std::string DEVICE_CLASS
The.
Definition: GatewayDevice.hpp:52
Thrown on problems with authorization.
Definition: Exception.hpp:25
static const std::string PROTOCOL_DEVICE_ID
The.
Definition: GatewayDevice.hpp:70
GatewayDevice(const std::string &filePath, const std::string &password)
Constructs a new GatewayDevice instance that will load the device configuration from the given file p...
static const std::string MODEL_NUMBER
The.
Definition: GatewayDevice.hpp:40