C Device Virtualization API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E70343-26
|
00001 /* 00002 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 00003 * 00004 * This software is dual-licensed to you under the MIT License (MIT) and 00005 * the Universal Permissive License (UPL). See the LICENSE file in the root 00006 * directory for license terms. You may choose either license, or both. 00007 */ 00008 00009 #ifndef IOTCS_DEVICE_H 00010 #define IOTCS_DEVICE_H 00011 00012 #ifdef __cplusplus 00013 extern "C" { 00014 #endif 00015 00016 00017 #include <inttypes.h> 00018 #include "iotcs.h" 00019 00036 iotcs_result iotcs_init(const char* path, const char* password); 00037 00044 void iotcs_finalize(void); 00045 00050 const char* iotcs_get_endpoint_id(void); 00051 00060 iotcs_result iotcs_activate(const char *device_models[]); 00061 00066 int iotcs_is_activated(void); 00067 00068 #ifdef IOTCS_GATEWAY 00069 00070 #define IOTCS_METADATA_DEVICE_CLASS "deviceClass" 00071 #define IOTCS_METADATA_MANUFACTURER "manufacturer" 00072 #define IOTCS_METADATA_MODEL_NUMBER "modelNumber" 00073 #define IOTCS_METADATA_PROTOCOL "protocol" 00074 #define IOTCS_METADATA_PROTOCOL_DEVICE_CLASS "protocolDeviceClass" 00075 #define IOTCS_METADATA_PROTOCOL_DEVICE_ID "protocolDeviceId" 00076 #define IOTCS_METADATA_SERIAL_NUMBER "serialNumber" 00096 iotcs_result iotcs_register_device(iotcs_bool restricted, const char *hardware_id, const iotcs_key_value metadata[], 00097 const char *device_models[], 00098 char *endpoint_id); 00099 00100 #endif /* ifdef IOTCS_GATEWAY */ 00101 00102 #ifdef __cplusplus 00103 } 00104 #endif 00105 00106 #endif /* IOTCS_DEVICE_H */