OceanDirectLighthouseC++ 3.1.3
OceanDirect Lighthouse C++/C API
oceandirect::api::UserStringAPI Class Reference

#include <UserStringAPI.h>

Public Member Functions

 UserStringAPI ()
 
virtual ~UserStringAPI ()
 
virtual int getUserString (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
virtual int getUserString (long deviceID, int *errorCode, int index, char *buffer, int bufferLength)
 
virtual int getUserStringCount (long deviceID, int *errorCode)
 
virtual void setUserString (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
virtual void setUserString (long deviceID, int *errorCode, int index, char *buffer, int bufferLength)
 

Static Public Member Functions

static UserStringAPIgetInstance ()
 
static void shutdown ()
 

Static Protected Attributes

static UserStringAPIinstance
 

Constructor & Destructor Documentation

◆ UserStringAPI()

oceandirect::api::UserStringAPI::UserStringAPI ( )

◆ ~UserStringAPI()

virtual oceandirect::api::UserStringAPI::~UserStringAPI ( )
virtual

Member Function Documentation

◆ getInstance()

static UserStringAPI * oceandirect::api::UserStringAPI::getInstance ( )
static

◆ getUserString() [1/2]

virtual int oceandirect::api::UserStringAPI::getUserString ( long deviceID,
int * errorCode,
char * buffer,
int bufferLength )
virtual

Read the user string from the device. If this field in the device is not yet populated then a non-zero(6) code will be returned.

See also
setUserString()
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; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer containing user string.
buffer_lengthThe buffer size should be at least 16.
Returns
The user string lengnth.

◆ getUserString() [2/2]

virtual int oceandirect::api::UserStringAPI::getUserString ( long deviceID,
int * errorCode,
int index,
char * buffer,
int bufferLength )
virtual

Read the user string from the device. The maximum string length is 16. If this field in the device is not yet populated then a non-zero(6) code will be returned. If the device don't support this command then a non-zero error code will be returned.

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; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
indexThe user string index.
bufferThe output buffer for user string.
buffer_lengthThe maximum buffer size is 16.

◆ getUserStringCount()

virtual int oceandirect::api::UserStringAPI::getUserStringCount ( long deviceID,
int * errorCode )
virtual

Read the total user string count from the device. If the device don't support this command then a non-zero error code will be returned.

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; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The total user string count.

◆ setUserString() [1/2]

virtual void oceandirect::api::UserStringAPI::setUserString ( long deviceID,
int * errorCode,
char * buffer,
int bufferLength )
virtual

Write the user string to the device. The maximum string length is 16.

See also
getUserString()
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; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe buffer containing a user string.
buffer_lengthThe maximum buffer size is 16.

◆ setUserString() [2/2]

virtual void oceandirect::api::UserStringAPI::setUserString ( long deviceID,
int * errorCode,
int index,
char * buffer,
int bufferLength )
virtual

Write the user string to the device. The maximum string length is 16. If the device don't support this command then a non-zero error code will be returned.

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; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
indexThe user string index.
bufferThe new user string.
buffer_lengthThe maximum buffer size is 16.

◆ shutdown()

static void oceandirect::api::UserStringAPI::shutdown ( )
static

Member Data Documentation

◆ instance

UserStringAPI* oceandirect::api::UserStringAPI::instance
staticprotected

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