OceanDirect  1.31.0
OceanDirect C++/C API
oceandirect::api::OpticalBenchAPI Class Reference

Public Member Functions

int getCoating (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
unsigned short int getFiberDiameter (long deviceID, int *errorCode)
 
int getFilter (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
int getGrating (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
int getId (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
int getSerialNumber (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
unsigned short int getSlitWidthMicrons (long deviceID, int *errorCode)
 
int getWavelength (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
int isLensInstalled (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
void setCoating (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
void setFiberDiameter (long deviceID, int *errorCode, unsigned short int diameterMicrons)
 
void setFilter (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
void setGrating (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
void setId (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
void setSerialNumber (long deviceID, int *errorCode, char *buffer, int bufferLength)
 
void setSlitWidthMicrons (long deviceID, int *errorCode, unsigned short int widthMicrons)
 

Static Public Member Functions

static OpticalBenchAPIgetInstance ()
 
static void shutdown ()
 

Member Function Documentation

◆ getCoating()

int oceandirect::api::OpticalBenchAPI::getCoating ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This reads the optical bench Coating and fills the provided array (up to the given length) with it.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the beanch coating will be copied into.
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer).
Returns
the number of bytes written into the buffer

◆ getFiberDiameter()

unsigned short int oceandirect::api::OpticalBenchAPI::getFiberDiameter ( long  deviceID,
int *  errorCode 
)

This reads the optical bench fiber diameter.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
the fiber diameter.

◆ getFilter()

int oceandirect::api::OpticalBenchAPI::getFilter ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This reads the optical bench filter and fills the provided array (up to the given length) with it.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the bench filter will be copied into.
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer).
Returns
the number of bytes written into the buffer

◆ getGrating()

int oceandirect::api::OpticalBenchAPI::getGrating ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This reads the optical bench grating and fills the provided array (up to the given length) with it.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the bench grating will be copied into.
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer).
Returns
the number of bytes written into the buffer

◆ getId()

int oceandirect::api::OpticalBenchAPI::getId ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This reads the optical bench id.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the bench id will be copied into.
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer).
Returns
the number of bytes written into the buffer

◆ getSerialNumber()

int oceandirect::api::OpticalBenchAPI::getSerialNumber ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This reads the optical bench Serial Number and fills the provided array (up to the given length) with it.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the serial number will be copied into.
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer).
Returns
the number of bytes written into the buffer

◆ getSlitWidthMicrons()

unsigned short int oceandirect::api::OpticalBenchAPI::getSlitWidthMicrons ( long  deviceID,
int *  errorCode 
)

This function reads out the optical bench slit width in microns. If this field in the device is not yet populated then a non-zero(6) code will be returned.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
the number of bytes written into the buffer

◆ getWavelength()

int oceandirect::api::OpticalBenchAPI::getWavelength ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This function reads out the optical bench array wavelength value.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the serial number will be copied into
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer)
Returns
the fiber diameter in microns

◆ isLensInstalled()

int oceandirect::api::OpticalBenchAPI::isLensInstalled ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This determines if the optical bench has a lens installed.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the len installed state will be copied into.
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer).
Returns
the number of bytes written into the buffer

◆ setCoating()

void oceandirect::api::OpticalBenchAPI::setCoating ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This writes out the optical bench Coating.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Input) The optical bench coating string.
buffer_length(Input) The buffer length.

◆ setFiberDiameter()

void oceandirect::api::OpticalBenchAPI::setFiberDiameter ( long  deviceID,
int *  errorCode,
unsigned short int  diameterMicrons 
)

This writes out the optical bench fiber diameter.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
diameterMicrons(Input) The fiber diameter.

◆ setFilter()

void oceandirect::api::OpticalBenchAPI::setFilter ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This writes out the optical bench filter.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Input) The optical bench filter.
buffer_length(Input) The buffer length.

◆ setGrating()

void oceandirect::api::OpticalBenchAPI::setGrating ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This writes out the optical bench grating.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Input) The optical bench grating string.
buffer_length(Input) The buffer length.

◆ setId()

void oceandirect::api::OpticalBenchAPI::setId ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This writes out the optical bench id.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Input) The optical bench id.
buffer_length(Input) The buffer length.

◆ setSerialNumber()

void oceandirect::api::OpticalBenchAPI::setSerialNumber ( long  deviceID,
int *  errorCode,
char *  buffer,
int  bufferLength 
)

This writes out the optical bench serial number.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Input) The serial number.
buffer_length(Input) The buffer length.

◆ setSlitWidthMicrons()

void oceandirect::api::OpticalBenchAPI::setSlitWidthMicrons ( long  deviceID,
int *  errorCode,
unsigned short int  widthMicrons 
)

This writes out the optical bench slit width in microns.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
widthMicrons(Input) The slit width.

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