OceanDirectLighthouse  3.1.1
OceanDirect Lighthouse C++/C API
oceandirect::api::LHSerialPortAPI Class Reference

Public Member Functions

virtual lh_baud_rate_t getBaudRate (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
virtual lh_serial_comms_mode_t getSerialCommThresholdMode (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
virtual void saveSettingsToFlash (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
virtual void setBaudRate (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_baud_rate_t baudRate)
 
virtual void setSerialCommThresholdMode (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_serial_comms_mode_t thresholdMode)
 

Member Function Documentation

◆ getBaudRate()

virtual lh_baud_rate_t oceandirect::api::LHSerialPortAPI::getBaudRate ( lh_device_id_t  deviceID,
lh_error_code_t *  errorCode 
)
virtual

.getBaudRate Return the current baud rate of the serial port.

See also
setBaudRate()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current baud rate or 0 on error.

◆ getSerialCommThresholdMode()

virtual lh_serial_comms_mode_t oceandirect::api::LHSerialPortAPI::getSerialCommThresholdMode ( lh_device_id_t  deviceID,
lh_error_code_t *  errorCode 
)
virtual

.getSerialCommThresholdMode 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.
errorCodesee LHErrorCode.
Returns
The threshold mode either 0x10 or 0x20.

◆ saveSettingsToFlash()

virtual void oceandirect::api::LHSerialPortAPI::saveSettingsToFlash ( lh_device_id_t  deviceID,
lh_error_code_t *  errorCode 
)
virtual

.saveSettingsToFlash Save the current serial port settings to persistent memory.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.

◆ setBaudRate()

virtual void oceandirect::api::LHSerialPortAPI::setBaudRate ( lh_device_id_t  deviceID,
lh_error_code_t *  errorCode,
lh_baud_rate_t  baudRate 
)
virtual

.setBaudRate Set the current baud rate of the serial port.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
baudRatethe desired baud rate. An invalid argument error code will be returned if this is not one of: lh_baud_rate_t::B300 lh_baud_rate_t::B600 lh_baud_rate_t::B1200 lh_baud_rate_t::B2400 lh_baud_rate_t::B9600 lh_baud_rate_t::B14400 lh_baud_rate_t::B19200 lh_baud_rate_t::B38400 lh_baud_rate_t::B57600 lh_baud_rate_t::B115200

◆ setSerialCommThresholdMode()

virtual void oceandirect::api::LHSerialPortAPI::setSerialCommThresholdMode ( lh_device_id_t  deviceID,
lh_error_code_t *  errorCode,
lh_serial_comms_mode_t  thresholdMode 
)
virtual

.setSerialCommThresholdMode 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.
errorCodesee LHErrorCode.
thresholdModeThe threshold mode either 0x10 or 0x20.

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