NetOceanDirect 3.1.3
OceanDirect .NET API
NetOceanDirect::DataBuffer Class Reference

#include <DataBuffer.h>

Inherits NetOceanDirect::ManagedObject< DataBufferAPI >.

Public Member Functions

 DataBuffer (DataBufferAPI *instance)
 
virtual ~DataBuffer ()
 
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)
 
- Public Member Functions inherited from NetOceanDirect::ManagedObject< DataBufferAPI >
 ManagedObject (DataBufferAPI *instance)
 
 !ManagedObject ()
 
virtual ~ManagedObject ()
 
DataBufferAPI * GetInstance ()
 

Static Public Member Functions

static DataBuffer getInstance ()
 

Protected Member Functions

 DataBuffer ()
 

Static Protected Attributes

static DataBuffer dbuffer
 

Additional Inherited Members

- Protected Attributes inherited from NetOceanDirect::ManagedObject< DataBufferAPI >
DataBufferAPI * m_Instance
 

Constructor & Destructor Documentation

◆ DataBuffer() [1/2]

DataBuffer::DataBuffer ( )
protected

◆ DataBuffer() [2/2]

DataBuffer::DataBuffer ( DataBufferAPI * instance)

◆ ~DataBuffer()

virtual NetOceanDirect::DataBuffer::~DataBuffer ( )
inlinevirtual

Member Function Documentation

◆ 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]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset 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]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset 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]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset 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]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset 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]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset 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()

◆ getInstance()

DataBuffer DataBuffer::getInstance ( )
static

◆ 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]deviceIDthe device ID for the device to be queried (from OceanDirect::findDevices())
[out]errorCodeset 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]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset 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]capacitythe 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]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset 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]enabledif true, data buffering will be enabled - otherwise, data buffering will be disabled
See also
getBufferEnable()

Member Data Documentation

◆ dbuffer

DataBuffer NetOceanDirect::DataBuffer::dbuffer
staticprotected

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