OceanDirectLighthouse 3.1.3
OceanDirect Lighthouse C++/C API
oceandirect::api::LHFlashAPI Class Reference

#include <LHFlashAPI.h>

Public Member Functions

virtual ~LHFlashAPI ()=default
 
virtual bool getAccessoryBoardAvailable (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
virtual size_t getFlashSlotData (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint32_t slotNumber, uint8_t data[], size_t dataLength)
 
virtual void setFlashSlotData (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint32_t slotNumber, const uint8_t data[], size_t dataLength)
 
virtual void setI2CData (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint32_t i2cBusIndex, uint32_t i2cTargetAddress, const uint8_t data[], size_t dataLength)
 

Constructor & Destructor Documentation

◆ ~LHFlashAPI()

virtual oceandirect::api::LHFlashAPI::~LHFlashAPI ( )
virtualdefault

Member Function Documentation

◆ getAccessoryBoardAvailable()

virtual bool oceandirect::api::LHFlashAPI::getAccessoryBoardAvailable ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )
virtual

.getAccessoryBoardAvailable Ping the I2C accessory board (where supported by the device).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
true if accessory is up and running, false otherwise or on error.

◆ getFlashSlotData()

virtual size_t oceandirect::api::LHFlashAPI::getFlashSlotData ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint32_t slotNumber,
uint8_t data[],
size_t dataLength )
virtual

.getFlashSlotData Read data from a non-volatile slot space.

See also
setFlashSlotData()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
slotNumberthe desired slot number to read from. Valid values range from 1 to 20 but may vary depending on FW version.
datathe buffer to receive the slot data
dataLengththe length of the supplied data buffer.
Returns
the number of bytes written to the data buffer.

◆ setFlashSlotData()

virtual void oceandirect::api::LHFlashAPI::setFlashSlotData ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint32_t slotNumber,
const uint8_t data[],
size_t dataLength )
virtual

.setFlashSlotData Write data into a non-volatile slot space. This function is only applied to OBP2 device.

See also
getFlashSlotData()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
slotNumberthe desired slot number to write to. Valid values range from 1 to 20 but may vary depending on FW version.
datathe buffer containing the slot data.
dataLengththe slot data size.

◆ setI2CData()

virtual void oceandirect::api::LHFlashAPI::setI2CData ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint32_t i2cBusIndex,
uint32_t i2cTargetAddress,
const uint8_t data[],
size_t dataLength )
virtual

.setI2CData Writes I2C data to the device. This function is only applied to OBP2 device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
i2cBusIndexthe desired I2C bus index.
i2cTargetAddressthe desired I2C target address (device dependent).
datathe array containing the I2C data to write.
dataLengththe length of the I2C data array.

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