|
C Device Virtualization API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E70343-26
|
Methods for device client. More...
Go to the source code of this file.
Defines | |
| #define | IOTCS_METADATA_DEVICE_CLASS "deviceClass" |
| The deviceClass metadata attribute key. | |
| #define | IOTCS_METADATA_MANUFACTURER "manufacturer" |
| The manufacturer metadata attribute key. | |
| #define | IOTCS_METADATA_MODEL_NUMBER "modelNumber" |
| The modelNumber metadata attribute key. | |
| #define | IOTCS_METADATA_PROTOCOL "protocol" |
| The protocol metadata attribute key. | |
| #define | IOTCS_METADATA_PROTOCOL_DEVICE_CLASS "protocolDeviceClass" |
| The protocolDeviceClass metadata attribute key. | |
| #define | IOTCS_METADATA_PROTOCOL_DEVICE_ID "protocolDeviceId" |
| The protocolDeviceId metadata attribute key. | |
| #define | IOTCS_METADATA_SERIAL_NUMBER "serialNumber" |
| The serialNumber metadata attribute key. | |
Functions | |
| iotcs_result | iotcs_init (const char *path, const char *password) |
| IoT DC library initialization. | |
| void | iotcs_finalize (void) |
| IoT DC library finalization. | |
| const char * | iotcs_get_endpoint_id (void) |
| Get endpoint Id. | |
| iotcs_result | iotcs_activate (const char *device_models[]) |
| Activate the device. | |
| int | iotcs_is_activated (void) |
| Returns whether the device is activated. | |
| iotcs_result | iotcs_register_device (iotcs_bool restricted, const char *hardware_id, const iotcs_key_value metadata[], const char *device_models[], char *endpoint_id) |
| Register an indirectly-connected device with the cloud service. | |
Methods for device client.
| iotcs_result iotcs_activate | ( | const char * | device_models[] | ) |
Activate the device.
| device_models | array of device model URN strings. Last element must have NULL value. |
| IOTCS_RESULT_INVALID_ARGUMENT | if device_models is NULL. |
| IOTCS_RESULT_OK | if succeeds or device has already been activated. |
| IOTCS_RESULT_CANNOT_AUTHORIZE | if there are problems with authorization. |
| IOTCS_RESULT_FAIL | otherwise. |
| void iotcs_finalize | ( | void | ) |
IoT DC library finalization.
IoT DC library finalization. Releases previously allocated temporary resources.
| const char* iotcs_get_endpoint_id | ( | void | ) |
Get endpoint Id.
| iotcs_result iotcs_init | ( | const char * | path, |
| const char * | password | ||
| ) |
IoT DC library initialization.
IoT DC library initialization. Initiates all subsystems. This function must be called before any iotcs_* calls (except iotcs_log_* methods).
| path | a path to trusted assets store. |
| password | a password for trusted assets store. |
| IOTCS_RESULT_OK | if succeeds. |
| IOTCS_RESULT_FAIL | otherwise. |
| int iotcs_is_activated | ( | void | ) |
Returns whether the device is activated.
| iotcs_result iotcs_register_device | ( | iotcs_bool | restricted, |
| const char * | hardware_id, | ||
| const iotcs_key_value | metadata[], | ||
| const char * | device_models[], | ||
| char * | endpoint_id | ||
| ) |
Register an indirectly-connected device with the cloud service.
Register an indirectly-connected device with the cloud service and specifiy whether the gateway device is required to have the appropriate credentials for activating the indirectly-connected device.
| restricted | indicate whether or not credentials are required for activating the indirectly connected device |
| hardware_id | an identifier unique within the Cloud Service instance |
| metadata | keys and values for device metadata. Last element must have NULL 'key'. |
| device_models | array with pointers to zero or more device models that are implemented by the directly connected device. Last element must have NULL value. |
| endpoint_id | buffer for returning endpoint id string |
| IOTCS_RESULT_INVALID_ARGUMENT | if hardware_id or metadata or device_models are NULL. |
| IOTCS_RESULT_CANNOT_AUTHORIZE | if there are problems with authorization. |
| IOTCS_RESULT_OK | if succeeds. |
| IOTCS_RESULT_FAIL | otherwise. |