C Porting Layer API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E80003-19
iotcs_port_diagnostic.h File Reference

The file contains porting layer for functionality required by diagnostic capability. More...

#include "iotcs_config.h"

Go to the source code of this file.

Functions

int iotcs_port_get_ip_address (char *buffer, int buf_len)
 Writes ip address of the device as a null terminated string to a given buffer Returned string is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of ipAddress property.
int iotcs_port_get_mac_address (char *buffer, int buf_len)
 Writes mac address of the device as a null terminated string to a given buffer Returned string is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of macAddress property.
int64_t iotcs_port_get_start_time (void)
 Returns device start time in milliseconds since epoch Returned value is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of startTime property.
const char * iotcs_port_get_version (void)
 Returns version as a null terminated string Returned string is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of version property.
uint64_t iotcs_port_get_total_disk_space (void)
 The total disk space in bytes on this directly connected device Returned value is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of totalDiskSpace property.
uint64_t iotcs_port_get_free_disk_space (void)
 The free disk space in bytes on this directly connected device Returned value is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of freeDiskSpace property.

Detailed Description

The file contains porting layer for functionality required by diagnostic capability.


Function Documentation

uint64_t iotcs_port_get_free_disk_space ( void  )

The free disk space in bytes on this directly connected device Returned value is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of freeDiskSpace property.

Note:
Optional API. Called by the Library if IOTCS_USE_DIAGNOSTIC_CAPABILITY option is defined.
Returns:
free disk space in bytes on this directly connected device.
int iotcs_port_get_ip_address ( char *  buffer,
int  buf_len 
)

Writes ip address of the device as a null terminated string to a given buffer Returned string is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of ipAddress property.

Note:
Optional API. Called by the Library if IOTCS_USE_DIAGNOSTIC_CAPABILITY option is defined.
Parameters:
bufferoutput buffer
buf_lenlength of the output buffer
Returns:
The number of characters written to buffer, not counting the terminating null character.
Negative value otherwise (including cases when buffer is too small for the string)
int iotcs_port_get_mac_address ( char *  buffer,
int  buf_len 
)

Writes mac address of the device as a null terminated string to a given buffer Returned string is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of macAddress property.

Note:
Optional API. Called by the Library if IOTCS_USE_DIAGNOSTIC_CAPABILITY option is defined.
Parameters:
bufferoutput buffer
buf_lenlength of the output buffer
Returns:
The number of characters written to buffer, not counting the terminating null character.
Negative value otherwise (including cases when buffer is too small for the string)
int64_t iotcs_port_get_start_time ( void  )

Returns device start time in milliseconds since epoch Returned value is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of startTime property.

Note:
Optional API. Called by the Library if IOTCS_USE_DIAGNOSTIC_CAPABILITY option is defined.
Returns:
Device start time if success
Negative value otherwise
uint64_t iotcs_port_get_total_disk_space ( void  )

The total disk space in bytes on this directly connected device Returned value is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of totalDiskSpace property.

Note:
Optional API. Called by the Library if IOTCS_USE_DIAGNOSTIC_CAPABILITY option is defined.
Returns:
total disk space in bytes on this directly connected device.
const char* iotcs_port_get_version ( void  )

Returns version as a null terminated string Returned string is sent to IoT server in response to /info request of urn:oracle:iot:dcd:capability:diagnostics device model as a value of version property.

Note:
Optional API. Called by the Library if IOTCS_USE_DIAGNOSTIC_CAPABILITY option is defined.
Returns:
Version string address if success
NULL otherwise