Older Versions
Older API versions are available as a download. To view, extract the file and open the index.html file in a web browser.
Module management definition.
More...
Go to the source code of this file.
enum artik_module_id_t {
ARTIK_MODULE_LOG = 0,
ARTIK_MODULE_LOOP ,
ARTIK_MODULE_GPIO ,
ARTIK_MODULE_I2C ,
ARTIK_MODULE_SERIAL ,
ARTIK_MODULE_PWM ,
ARTIK_MODULE_ADC ,
ARTIK_MODULE_HTTP ,
ARTIK_MODULE_CLOUD ,
ARTIK_MODULE_WIFI ,
ARTIK_MODULE_MEDIA ,
ARTIK_MODULE_TIME ,
ARTIK_MODULE_SECURITY ,
ARTIK_MODULE_SPI ,
ARTIK_MODULE_BLUETOOTH ,
ARTIK_MODULE_SENSOR ,
ARTIK_MODULE_ZIGBEE ,
ARTIK_MODULE_NETWORK ,
ARTIK_MODULE_WEBSOCKET ,
ARTIK_MODULE_LWM2M ,
ARTIK_MODULE_MQTT
} IDs of all the available modules.
Definitions and functions for managing the various modules exposed by the API
Definition in file artik_module.h .
Parameters
[out] version String returned by the function. Must be preallocated for a size at least MAX_VERSION_STRING bytes long.
Returns S_OK always
Examples: module_test/artik_module_test.c .
Parameters
[out] modules Pointer to an array of module definition structures for each module available for the platform. This array does not need to be preallocated, it points to a static array.
[out] num Number of modules structures available in the array. This value shall be used to browse through the modules array.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
Parameters
[out] String returned by the function with the bluetooth mac address of the platform the API has been built for. Must be preallocated for a size at least MAX_BT_ADDR+1 bytes long.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
char* artik_get_device_info
(
void
)
Returns JSON string filled up by the function and containing information about the current device. String is allocated by the function and must be freed by the calling function.
Examples: module_test/artik_module_test.c .
int artik_get_platform
(
void
)
artik_error artik_get_platform_manufacturer
(
char *
manu )
Parameters
[out] String returned by the function with the manu of the platform the API has been built for. Must be preallocated for a size at least MAX_PLATFORM_MANUFACT+1 bytes long.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
artik_error artik_get_platform_model_number
(
char *
modelnum )
Parameters
[out] String returned by the function with the model number of the platform the API has been built for. Must be preallocated for a size at least MAX_PLATFORM_MODELNUM+1 bytes long.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
Parameters
[out] name String returned by the function with the name of the platform the API has been built for. Must be preallocated for a size at least MAX_PLATFORM_NAME bytes long.
Returns on success, error code otherwise
Examples: module_test/artik_module_test.c .
artik_error artik_get_platform_serial_number
(
char *
sn )
Parameters
[out] String returned by the function with the sn of the platform the API has been built for. Must be preallocated for a size at least MAX_PLATFORM_SN+1 bytes long.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
artik_error artik_get_platform_uptime
(
int64_t *
uptime )
Parameters
[out] Integer (64 bits) Number of seconds elapsed since the board was powered up.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
Parameters
[out] String returned by the function with the wifi mac address of the platform the API has been built for. Must be preallocated for a size at least MAX_WIFI_ADDR+1 bytes long.
Returns S_OK on success, error code otherwise
Examples: module_test/artik_module_test.c .
Parameters
[in] id ID of the module whose availability is to be checked.
Returns true if the module is available, false otherwise
Examples: bluetooth_test/artik_bluetooth_test.c , bluetooth_test/artik_bluetooth_test_agent.c , bluetooth_test/artik_bluetooth_test_avrcp.c , bluetooth_test/artik_bluetooth_test_ftp.c , bluetooth_test/artik_bluetooth_test_nap.c , bluetooth_test/artik_bluetooth_test_panu.c , bluetooth_test/artik_bluetooth_test_spp.c , bluetooth_test/artik_bluetooth_test_spp_client.c , cloud_test/artik_cloud_test.c , http_test/artik_http_openssl_test.c , http_test/artik_http_test.c , loop_test/artik_loop_test.c , lwm2m_test/artik_lwm2m_test_client.c , module_test/artik_module_test.c , network_test/artik_dhcp_client_test.c , network_test/artik_network_test.c , serial_test/artik_serial_test.c , wifi_test/artik_wifi_ap_test.c , wifi_test/artik_wifi_test.c , zigbee_test/artik_zigbee_cli.c , and zigbee_test/artik_zigbee_test.c .
Parameters
[in] module Pointer on the address of the module symbol to release.
Returns S_OK on success, otherwise error code.
Examples: adc_test/artik_adc_test.c , bluetooth_test/artik_bluetooth_test.c , bluetooth_test/artik_bluetooth_test_advertiser.c , bluetooth_test/artik_bluetooth_test_agent.c , bluetooth_test/artik_bluetooth_test_avrcp.c , bluetooth_test/artik_bluetooth_test_ftp.c , bluetooth_test/artik_bluetooth_test_gatt_client.c , bluetooth_test/artik_bluetooth_test_gatt_server.c , bluetooth_test/artik_bluetooth_test_nap.c , bluetooth_test/artik_bluetooth_test_panu.c , bluetooth_test/artik_bluetooth_test_spp.c , bluetooth_test/artik_bluetooth_test_spp_client.c , cloud_test/artik_cloud_test.c , gpio_test/artik_gpio_test.c , http_test/artik_http_openssl_test.c , http_test/artik_http_test.c , i2c_test/artik_i2c_test.c , loop_test/artik_loop_test.c , media_test/artik_media_test.c , mqtt_test/artik_mqtt_cloud_test.c , network_test/artik_dhcp_client_test.c , network_test/artik_dhcp_server_test.c , network_test/artik_network_test.c , pwm_test/artik_pwm_test.c , security_test/artik_security_test.c , sensor_test/artik_sensor_test.c , serial_test/artik_serial_test.c , spi_test/artik_spi_test.c , time_test/artik_time_test.c , websocket_test/artik_websocket_client_test.c , websocket_test/artik_websocket_cloud_test.c , websocket_test/artik_websocket_test.c , wifi_test/artik_wifi_ap_test.c , wifi_test/artik_wifi_test.c , zigbee_test/artik_zigbee_cli.c , zigbee_test/artik_zigbee_test.c , and zigbee_test/artik_zigbee_test_common.c .
Parameters
[in] name String containing the name of the module to operate on.
Returns a pointer to a structure containing the module operations.
Examples: adc_test/artik_adc_test.c , bluetooth_test/artik_bluetooth_test.c , bluetooth_test/artik_bluetooth_test_advertiser.c , bluetooth_test/artik_bluetooth_test_agent.c , bluetooth_test/artik_bluetooth_test_avrcp.c , bluetooth_test/artik_bluetooth_test_ftp.c , bluetooth_test/artik_bluetooth_test_gatt_client.c , bluetooth_test/artik_bluetooth_test_gatt_server.c , bluetooth_test/artik_bluetooth_test_nap.c , bluetooth_test/artik_bluetooth_test_panu.c , bluetooth_test/artik_bluetooth_test_spp.c , bluetooth_test/artik_bluetooth_test_spp_client.c , cloud_test/artik_cloud_test.c , gpio_test/artik_gpio_test.c , http_test/artik_http_openssl_test.c , http_test/artik_http_test.c , i2c_test/artik_i2c_test.c , loop_test/artik_loop_test.c , lwm2m_test/artik_lwm2m_test_client.c , media_test/artik_media_test.c , mqtt_test/artik_mqtt_cloud_test.c , network_test/artik_dhcp_client_test.c , network_test/artik_dhcp_server_test.c , network_test/artik_network_test.c , pwm_test/artik_pwm_test.c , security_test/artik_security_test.c , sensor_test/artik_sensor_test.c , serial_test/artik_serial_test.c , spi_test/artik_spi_test.c , time_test/artik_time_test.c , websocket_test/artik_websocket_client_test.c , websocket_test/artik_websocket_cloud_test.c , websocket_test/artik_websocket_test.c , wifi_test/artik_wifi_ap_test.c , wifi_test/artik_wifi_test.c , zigbee_test/artik_zigbee_cli.c , zigbee_test/artik_zigbee_test.c , and zigbee_test/artik_zigbee_test_common.c .
Last updated on:
Apr 23 2018, 6:10 PM