Inherits NetOceanDirect::ManagedObject< DataBufferAPI >.
|
| DataBuffer (DataBufferAPI *instance) |
|
void | clear (long deviceID, int% errorCode) |
|
unsigned long | getBufferCapacity (long deviceID, int% errorCode) |
|
unsigned long | getBufferCapacityMaximum (long deviceID, int% errorCode) |
|
unsigned long | getBufferCapacityMinimum (long deviceID, int% errorCode) |
|
bool | getBufferEnable (long deviceID, int% errorCode) |
|
unsigned long | getNumberOfElements (long deviceID, int% errorCode) |
|
void | setBufferCapacity (long deviceID, int% errorCode, unsigned long capacity) |
|
void | setBufferEnable (long deviceID, int% errorCode, bool enabled) |
|
| ManagedObject (DataBufferAPI *instance) |
|
DataBufferAPI * | GetInstance () |
|
|
DataBufferAPI * | m_Instance |
|
◆ clear()
void DataBuffer::clear |
( |
long |
deviceID, |
|
|
int% |
errorCode |
|
) |
| |
Clears the given device's onboard data buffer by removing all buffered measurements. After this operation, getNumberOfElements() will return 0.
- Parameters
-
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
◆ getBufferCapacity()
unsigned long DataBuffer::getBufferCapacity |
( |
long |
deviceID, |
|
|
int% |
errorCode |
|
) |
| |
Retrieves the given device's current onboard data buffer capacity, i.e., the maximum number of spectra it can store before the buffer is filled.
- See also
- setBufferCapacity()
- Parameters
-
[in] | deviceID | the device ID for the device to be queried (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
- Returns
- the given device's current buffer capacity - should be a value on the range [getBufferCapacityMinimum(), getBufferCapacityMaximum()]
◆ getBufferCapacityMaximum()
unsigned long DataBuffer::getBufferCapacityMaximum |
( |
long |
deviceID, |
|
|
int% |
errorCode |
|
) |
| |
Retrieves the given device's maximum possible onboard data buffer capacity setting.
- Parameters
-
[in] | deviceID | the device ID for the device to be queried (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
- Returns
- the given device's maximum possible data buffer capacity setting
◆ getBufferCapacityMinimum()
unsigned long DataBuffer::getBufferCapacityMinimum |
( |
long |
deviceID, |
|
|
int% |
errorCode |
|
) |
| |
Retrieves the given device's minimum possible onboard data buffer capacity setting.
- Parameters
-
[in] | deviceID | the device ID for the device to be queried (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
- Returns
- the given device's minimum possible data buffer capacity setting
◆ getBufferEnable()
bool DataBuffer::getBufferEnable |
( |
long |
deviceID, |
|
|
int% |
errorCode |
|
) |
| |
Checks to see whether data buffering is currently enabled on the given device.
- See also
- setBufferEnable()
- Parameters
-
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
- Returns
- true if data buffering is enabled on the device, false otherwise
- See also
- setBufferEnable()
◆ getNumberOfElements()
unsigned long DataBuffer::getNumberOfElements |
( |
long |
deviceID, |
|
|
int% |
errorCode |
|
) |
| |
Retrieves the number of elements (spectra) currently present in the given device's onboard data buffer.
- Parameters
-
[in] | deviceID | the device ID for the device to be queried (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
- Returns
- the current number of elements (spectra) in the device's data buffer - should be a value on the range [0, getBufferCapacity()]
◆ setBufferCapacity()
void DataBuffer::setBufferCapacity |
( |
long |
deviceID, |
|
|
int% |
errorCode, |
|
|
unsigned long |
capacity |
|
) |
| |
Sets the given device's onboard data buffer capacity, which governs how many spectra it will store at once.
- See also
- getBufferCapacity()
- Parameters
-
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
[in] | capacity | the new capacity (in # of spectra) for which to configure the given device |
◆ setBufferEnable()
void DataBuffer::setBufferEnable |
( |
long |
deviceID, |
|
|
int% |
errorCode, |
|
|
bool |
enabled |
|
) |
| |
Enables/disables the data buffering feature of the given device.
- See also
- getBufferEnable()
- Parameters
-
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails |
[in] | enabled | if true, data buffering will be enabled - otherwise, data buffering will be disabled |
- See also
- getBufferEnable()
The documentation for this class was generated from the following files: