OceanDirect  1.31.0
OceanDirect C++/C API
oceandirect::api::TemperatureAPI Class Reference

Public Member Functions

int getAllTemperatures (long deviceID, int *errorCode, double *buffer, int max_length)
 
int getCount (long deviceID, int *errorCode)
 
double getTemperature (long deviceID, int *errorCode, int index)
 
double getTemperatureExtreme (long deviceID, int *errorCode)
 

Static Public Member Functions

static TemperatureAPIgetInstance ()
 
static void shutdown ()
 

Member Function Documentation

◆ getAllTemperatures()

int oceandirect::api::TemperatureAPI::getAllTemperatures ( long  deviceID,
int *  errorCode,
double *  buffer,
int  max_length 
)

Get the temperatures from all sensors in degrees Celcius.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
buffera buffer to receive the returned temperatures.
max_lengththe size of the buffer.
Returns
the number of temperatures returned.

◆ getCount()

int oceandirect::api::TemperatureAPI::getCount ( long  deviceID,
int *  errorCode 
)

Get the number of temperature sensors available in the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
Returns
the number of temperature sensors.

◆ getTemperature()

double oceandirect::api::TemperatureAPI::getTemperature ( long  deviceID,
int *  errorCode,
int  index 
)

Get the temperature of a specified sensor in degrees Celcius.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
indexthe index of the specified sensor.
Returns
the temperature of the specified sensor in degrees Celcius.

◆ getTemperatureExtreme()

double oceandirect::api::TemperatureAPI::getTemperatureExtreme ( long  deviceID,
int *  errorCode 
)

Get the maximum temperature that could be returned by the sensors in degrees Celcius.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found.
Returns
the maximum temperature in degrees Celcius.

The documentation for this class was generated from the following file: