OceanDirectLighthouseC++  3.1.1
OceanDirect Lighthouse C++/C API
oceandirect::api::SerialPortAPI Class Reference

Public Member Functions

virtual int getBaudRate (long deviceID, int *errorCode)
 
virtual std::uint8_t getSerialCommThresholdMode (long deviceID, int *errorCode)
 
virtual void saveSettingsToFlash (long deviceID, int *errorCode)
 
virtual void setBaudRate (long deviceID, int *errorCode, int baudRate)
 
virtual void setSerialCommThresholdMode (long deviceID, int *errorCode, std::uint8_t thresholdMode)
 

Static Public Member Functions

static SerialPortAPIgetInstance ()
 
static void shutdown ()
 

Static Protected Attributes

static SerialPortAPIinstance
 

Member Function Documentation

◆ getBaudRate()

virtual int oceandirect::api::SerialPortAPI::getBaudRate ( long  deviceID,
int *  errorCode 
)
virtual

Get the baud rate of the serial port.

See also
setBaudRate()
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 baud rate of the serial port.

◆ getSerialCommThresholdMode()

virtual std::uint8_t oceandirect::api::SerialPortAPI::getSerialCommThresholdMode ( long  deviceID,
int *  errorCode 
)
virtual

Get the threshold mode of serial communication. The valid supported values are 0x10(RS-232) and 0x20(UART).

See also
setSerialCommThresholdMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE the specified device ID could not be found; ERROR_TRANSFER_ERROR if an error transferring the command to the device occurred; ERROR_COMMAND_NOT_SUPPORTED if this operation is not supported by the device.
Returns
The threshold mode either 0x10 or 0x20.

◆ saveSettingsToFlash()

virtual void oceandirect::api::SerialPortAPI::saveSettingsToFlash ( long  deviceID,
int *  errorCode 
)
virtual

Save settings to flash memory.

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.

◆ setBaudRate()

virtual void oceandirect::api::SerialPortAPI::setBaudRate ( long  deviceID,
int *  errorCode,
int  baudRate 
)
virtual

Set the baud rate of the serial port.

See also
getBaudRate()
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.
baudRatethe desired baud rate of the serial port.

◆ setSerialCommThresholdMode()

virtual void oceandirect::api::SerialPortAPI::setSerialCommThresholdMode ( long  deviceID,
int *  errorCode,
std::uint8_t  thresholdMode 
)
virtual

Set the threshold mode of serial communication. The valid supported values are 0x10(RS-232) and 0x20(UART).

See also
getSerialCommThresholdMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
thresholdModeThe threshold mode either 0x10 or 0x20.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE the specified device ID could not be found; ERROR_TRANSFER_ERROR if an error transferring the command to the device occurred; ERROR_COMMAND_NOT_SUPPORTED if this operation is not supported by the device.

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