NetOceanDirect  3.1.1
OceanDirect .NET API
Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
NetOceanDirect::DataBuffer Class Reference

Inherits NetOceanDirect::ManagedObject< DataBufferAPI >.

Public Member Functions

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

Static Public Member Functions

static DataBuffer getInstance ()
 

Static Protected Attributes

static DataBuffer dbuffer
 

Additional Inherited Members

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

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()

◆ 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()

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