|
| DirectlyConnectedDevice (const std::string &filePath, const std::string &password) throw (GeneralException, std::invalid_argument) |
| Constructs a new DirectlyConnectedDevice instance that will load the device configuration from the given file path and password. More...
|
|
virtual | ~DirectlyConnectedDevice () |
| Destructor.
|
|
const std::string & | getEndpointId () const |
| Return the endpoint identifier of this directly-connected device. More...
|
|
bool | isActivated () |
| Returns whether the device has been activated. More...
|
|
void | activate (const std::initializer_list< std::string > &deviceModelUrls) throw (GeneralException, CanNotAuthorizeException, std::invalid_argument) |
| Activate the device. More...
|
|
DeviceModel & | getDeviceModel (const std::string &deviceModelUrl) throw (GeneralException, CanNotAuthorizeException, std::invalid_argument) |
| Get the DeviceModel for the device model urn. More...
|
|
StorageObject & | createStorageObject (const std::string &name, const std::string &contentType) throw (GeneralException, CanNotAuthorizeException) |
| Create a new iotdcl::StorageObject with the given object name and mime–type. More...
|
|
StorageObject & | createStorageObject (const std::string &uri) throw (GeneralException, CanNotAuthorizeException) |
| Create a new iotdcl::StorageObject from the URI for a named object in storage. More...
|
|
VirtualDevice & | createVirtualDevice (const std::string &endpointId, DeviceModel &model) throw (GeneralException, CanNotAuthorizeException, std::invalid_argument) |
| Create a iotcs::AbstractVirtualDevice instance with the given device model for the given device identifier. More...
|
|
iotdcl::DirectlyConnectedDevice::DirectlyConnectedDevice |
( |
const std::string & |
filePath, |
|
|
const std::string & |
password |
|
) |
| |
throw | ( | GeneralException, |
| | std::invalid_argument |
| ) | | |
Constructs a new DirectlyConnectedDevice instance that will load the device configuration from the given file path and password.
- Parameters
-
filePath | the path of the configuration file |
password | the configuration file password |
- Exceptions
-
std::invalid_argument | if filePath or password is NULL. |
GeneralException | otherwise. |
Activate the device.
The device will be activated on the server if necessary. When the device is activated on the server, the server assigns an endpoint identifier to the device.
The user should call the isActivated() method prior to calling activate.
- Parameters
-
deviceModelUrls | should contain the device model type URNs of this directly connected device. The device is activated with the given device models. |
- See Also
- isActivated()
- Exceptions
-
Create a new iotdcl::StorageObject with the given object name and mime–type.
If contentType is NULL, the mime–type defaults to "application/octet–stream".
- Parameters
-
name | the unique name to be used to reference the content in storage |
contentType | The mime-type of the content |
- Returns
- a StorageObject
- Exceptions
-
Create a new iotdcl::StorageObject from the URI for a named object in storage.
- Parameters
-
uri | the URI of the object in the storage cloud |
- Returns
- a reference to StorageObject for the object in storage
- Exceptions
-
Create a iotcs::AbstractVirtualDevice instance with the given device model for the given device identifier.
This method creates a new
instance for the given parameters. The client library does not cache previously created VirtualDevice objects.
- Parameters
-
endpointId | The device identifier of the device being modeled |
model | The device model URN that this device implements |
- Returns
- a new AbstractVirtualDevice
- Exceptions
-
Get the DeviceModel for the device model urn.
- Parameters
-
deviceModelUrl | the URN of the device model |
- Returns
- A representation of the device model
- Exceptions
-
const std::string& iotdcl::DirectlyConnectedDevice::getEndpointId |
( |
| ) |
const |
Return the endpoint identifier of this directly-connected device.
The endpoint identifier is assigned by the server as part of the activation process.
- Returns
- the endpoint identifier of this directly-connected device.
- See Also
- activate()
bool iotdcl::DirectlyConnectedDevice::isActivated |
( |
| ) |
|
Returns whether the device has been activated.
- Returns
- whether the device has been activated.
The documentation for this class was generated from the following file: