NetOceanDirect
3.1.1
OceanDirect .NET API
|
Inherits NetOceanDirect::ManagedObject< OceanDirectAPI >.
Public Types | |
enum class | FeatureID { FEATURE_ID_SERIAL_NUMBER = ::FeatureId::FEATURE_ID_SERIAL_NUMBER , FEATURE_ID_SPECTROMETER = ::FeatureId::FEATURE_ID_SPECTROMETER , FEATURE_ID_THERMOELECTRIC = ::FeatureId::FEATURE_ID_THERMOELECTRIC , FEATURE_ID_IRRADCAL = ::FeatureId::FEATURE_ID_IRRADCAL , FEATURE_ID_EEPROM = ::FeatureId::FEATURE_ID_EEPROM , FEATURE_ID_STROBE_LAMP = ::FeatureId::FEATURE_ID_STROBE_LAMP , FEATURE_ID_WAVECAL = ::FeatureId::FEATURE_ID_WAVECAL , FEATURE_ID_NONLINEARITYCAL = ::FeatureId::FEATURE_ID_NONLINEARITYCAL , FEATURE_ID_STRAYLIGHTCAL = ::FeatureId::FEATURE_ID_STRAYLIGHTCAL , FEATURE_ID_RAW_BUS_ACCESS = ::FeatureId::FEATURE_ID_RAW_BUS_ACCESS , FEATURE_ID_CONTINUOUS_STROBE = ::FeatureId::FEATURE_ID_CONTINUOUS_STROBE , FEATURE_ID_LIGHT_SOURCE = ::FeatureId::FEATURE_ID_LIGHT_SOURCE , FEATURE_ID_TEMPERATURE = ::FeatureId::FEATURE_ID_TEMPERATURE , FEATURE_ID_OPTICAL_BENCH = ::FeatureId::FEATURE_ID_OPTICAL_BENCH , FEATURE_ID_REVISION = ::FeatureId::FEATURE_ID_REVISION , FEATURE_ID_DATA_BUFFER = ::FeatureId::FEATURE_ID_DATA_BUFFER , FEATURE_ID_PIXEL_BINNING = ::FeatureId::FEATURE_ID_PIXEL_BINNING , FEATURE_ID_GPIO = ::FeatureId::FEATURE_ID_GPIO , FEATURE_ID_SINGLE_STROBE = ::FeatureId::FEATURE_ID_SINGLE_STROBE , FEATURE_ID_QUERY_STATUS = ::FeatureId::FEATURE_ID_QUERY_STATUS , FEATURE_ID_BACK_TO_BACK = ::FeatureId::FEATURE_ID_BACK_TO_BACK , FEATURE_ID_LED_ACTIVITY = ::FeatureId::FEATURE_ID_LED_ACTIVITY , FEATURE_ID_TIME_META = ::FeatureId::FEATURE_ID_TIME_META , FEATURE_ID_DHCP = ::FeatureId::FEATURE_ID_DHCP , FEATURE_ID_PIXEL = ::FeatureId::FEATURE_ID_PIXEL , FEATURE_ID_AUTO_NULLING = ::FeatureId::FEATURE_ID_AUTO_NULLING , FEATURE_ID_IPV4_ADDRESS = ::FeatureId::FEATURE_ID_IPV4_ADDRESS , FEATURE_ID_IPV4_USER_STRING = ::FeatureId::FEATURE_ID_IPV4_USER_STRING , FEATURE_ID_DEVICE_INFORMATION = ::FeatureId::FEATURE_ID_DEVICE_INFORMATION , FEATURE_ID_DEVICE_ALIAS = ::FeatureId::FEATURE_ID_DEVICE_ALIAS , FEATURE_ID_SERIAL_PORT = ::FeatureId::FEATURE_ID_SERIAL_PORT , FEATURE_ID_SPECTRUM_ACQUISITION_CONTROL = ::FeatureId::FEATURE_ID_SPECTRUM_ACQUISITION_CONTROL , FEATURE_ID_NETWORK_CONFIGURATION = ::FeatureId::FEATURE_ID_NETWORK_CONFIGURATION , FEATURE_ID_ETHERNET = ::FeatureId::FEATURE_ID_ETHERNET , FEATURE_ID_SHUTTER = ::FeatureId::FEATURE_ID_SHUTTER , FEATURE_ID_HIGH_GAIN_MODE = ::FeatureId::FEATURE_ID_HIGH_GAIN_MODE } |
Public Member Functions | |
OceanDirect (OceanDirectAPI *instance) | |
virtual int | addNetworkDevice (String^ ipAddress, String^ deviceType, int% errorCode) |
virtual Advanced | AdvancedFeatures () |
virtual void | applyElectricDarkCorrection (int deviceID, int% errorCode, bool apply) |
virtual void | applyNonLinearityCorrection (int deviceID, int% errorCode, bool apply) |
array< double > | boxcarCorrectSpectrum (long deviceID, int% errorCode, array< double >^% illuminatedSpectrum, unsigned int boxcarWidth) |
virtual void | closeDevice (int deviceID, int% errorCode) |
virtual array< double > | darkCorrectSpectrum (long deviceID, int% errorCode, array< double >^% darkSpectrum, array< double >^% illuminatedSpectrum) |
virtual array< double > | darkCorrectSpectrum (long deviceID, int% errorCode, array< double >^% illuminatedSpectrum) |
virtual array< Devices^> | findDevices () |
virtual int | findSpectrumLength (int deviceID, int% errorCode) |
virtual array< Devices^> | findUSBDevices () |
virtual unsigned long | getAcquisitionDelayIncrementMicroseconds (long deviceID, int% errorCode) |
virtual unsigned long | getAcquisitionDelayMaximumMicroseconds (long deviceID, int% errorCode) |
virtual unsigned long | getAcquisitionDelayMicroseconds (long deviceID, int% errorCode) |
virtual unsigned long | getAcquisitionDelayMinimumMicroseconds (long deviceID, int% errorCode) |
virtual void | getAPIRCNumber (unsigned int% candidate) |
virtual void | getApiVersion (unsigned int% major, unsigned int% minor, unsigned int% point) |
virtual unsigned int | getBoxcarWidth (long deviceID, int% errorCode) |
virtual array< Devices^> | getCurrentDevicesConnected () |
virtual array< double > | getDarkCorrectedSpectrum (long deviceID, int% errorCode) |
virtual array< double > | getDarkCorrectedSpectrum (long deviceID, int% errorCode, array< double >^% darkSpectrum) |
virtual array< int > | getDeviceIDs () |
virtual String | getDeviceModel (long deviceID, int% errorCode) |
virtual int | getEDPCount (int deviceID, int% errorCode) |
virtual array< int > | getEDPIndices (int deviceID, int% errorCode, int length) |
virtual bool | getElectricDarkCorrectionUsage (int deviceID, int% errorCode) |
virtual String | getErrorMessage (int errorCode) |
virtual int | getErrorMessageLength (int errorCode) |
virtual int | getIndexAtWavelength (long deviceID, int% errorCode, double% wavelength, double aproxWavelength) |
virtual array< int > | getIndicesAtAnyWavelength (long deviceID, int% errorCode, array< double >^% wavelength, int length) |
virtual array< int > | getIndicesAtWavelengthRange (long deviceID, int% errorCode, array< double >^% wavelength, double lo, double hi) |
virtual unsigned long | getIntegrationTimeMicros (int deviceID, int% errorCode) |
virtual unsigned long | getIntegrationTimeStepSize (int deviceID, int% errorCode) |
virtual unsigned long | getMaximumIntegrationTime (int deviceID, int% errorCode) |
virtual double | getMaximumIntensity (int deviceID, int% errorCode) |
virtual unsigned long | getMinimumAveragingIntegrationTimeMicros (long deviceID, int% errorCode) |
virtual unsigned long | getMinimumIntegrationTime (int deviceID, int% errorCode) |
virtual array< double > | getNonlinearityCorrectedSpectrum (long deviceID, int% errorCode) |
virtual array< double > | getNonlinearityCorrectedSpectrum (long deviceID, int% errorCode, array< double >^% darkSpectrum) |
virtual bool | getNonLinearityCorrectionUsage (int deviceID, int% errorCode) |
virtual int | getNumberOfPixels (int deviceID, int% errorCode) |
virtual array< SpectrumWithMetadata^> | getRawSpectrumWithMetadata (int deviceID, int% errorCode, int count) |
virtual unsigned int | getScansToAverage (long deviceID, int% errorCode) |
virtual String | getSerialNumber (long deviceID, int% errorCode) |
virtual array< double > | getSpectrum (int deviceID, int% errorCode) |
virtual array< double > | getStoredDarkSpectrum (long deviceID, int% errorCode) |
virtual int | getTriggerMode (long deviceID, int% errorCode) |
virtual double | getWavelength (int deviceID, int% errorCode, int pixel) |
virtual array< double > | getWavelengthCoefficients (long deviceID, int% errorCode) |
virtual array< double > | getWavelengths (int deviceID, int% errorCode) |
virtual bool | isFeatureEnabled (int deviceID, int% errorCode, NetOceanDirect::OceanDirect::FeatureID featureId) |
virtual array< double > | nonlinearityCorrectSpectrum (long deviceID, int% errorCode, array< double >^% darkSpectrum, array< double >^% illuminatedSpectrum) |
virtual array< double > | nonlinearityCorrectSpectrum (long deviceID, int% errorCode, array< double >^% illuminatedSpectrum) |
virtual void | openDevice (int deviceID, int% errorCode) |
virtual void | setAcquisitionDelayMicroseconds (long deviceID, int% errorCode, unsigned long delay_usec) |
virtual void | setBoxcarWidth (long deviceID, int% errorCode, unsigned int boxcarWidth) |
virtual void | setIntegrationTimeMicros (int deviceID, int% errorCode, unsigned long integrationTimeMicros) |
virtual void | setMulticastMsgResponseReadDelay (size_t delayMs) |
virtual void | setMulticastMsgResponseReadRetry (size_t retryCount) |
virtual void | setMulticastMsgSendRetry (size_t retryCount) |
virtual void | setScansToAverage (long deviceID, int% errorCode, unsigned int scansToAverage) |
virtual void | setStoredDarkSpectrum (long deviceID, int% errorCode, array< double >^% darkSpectrum) |
virtual void | setTriggerMode (int deviceID, int% errorCode, int triggerMode) |
virtual void | shutDown () |
![]() | |
ManagedObject (OceanDirectAPI *instance) | |
OceanDirectAPI * | GetInstance () |
Static Public Member Functions | |
static OceanDirect | getInstance () |
Static Protected Attributes | |
static OceanDirect | odInstance |
Additional Inherited Members | |
![]() | |
OceanDirectAPI * | m_Instance |
|
strong |
enum class used to determine if spectrometer features are enabled with the method isFeatureEnabled. This is now redeclared as an enum class to expose it to .NET The :: is not strictly necessary but it makes it obvious where the original enum is from
|
virtual |
Manually create an instance of the network attached device and then open it with openDevice() function. It is the responsiblitiy of the user to ensure that the device existed and configured properly. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
[in] | ipAddress | The ip address of the device to be opened. |
[in] | deviceType | The device type could be OceanFX or OceanHDX. This is case sensitive. |
[out] | errorCode | A code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; |
|
virtual |
Retrieves a tracked handle to an Advanced instance, which may be used to access advanced hardware features beyond what is accessible from the OceanDirect class alone, such as trigger delay or raw USB access.
|
virtual |
[in] | deviceID | The device ID of the device to configure |
[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_COMMAND_NOT_SUPPORTED if the device does not support electric dark correction; ERROR_TRANSFER_ERROR if data transfer to/from device fails |
[in] | Apply | true or false. |
|
virtual |
[in] | deviceID | The device ID of the device to configure |
[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 |
[in] | Apply | true or false. |
array< double > OceanDirect::boxcarCorrectSpectrum | ( | long | deviceID, |
int% | errorCode, | ||
array< double >^% | illuminatedSpectrum, | ||
unsigned int | boxcarWidth | ||
) |
Apply a boxcar correction on the given illuminated spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_COMMAND_NOT_SUPPORTED if device does not support this command. |
[in/out] | illuminatedSpectrum The spectrum that will be boxcar corrected. | |
[in] | boxcarWidth | The boxcar width. |
|
virtual |
Closes the spectrometer with the given ID, which cleans up associated resources and cached values and allows it to be disconnected from the computer with no negative repurcussions. Only spectrometers that have already been opened using openDevice() should be closed. The id becomes invalid after closing the device. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
[in] | deviceID | The device ID of the device to be closed |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid device ID |
|
virtual |
Dark correct a previously acquired illuminated spectrum and using a previously acquired dark spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | A code indicating the result of the operation: ERROR_SUCCESS on success; |
[in] | darkSpectrum | The buffer that contains the dark spectrum to be used for the dark correction. |
[in] | illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
|
virtual |
Dark correct a previously acquired illuminated spectrum and using a stored dark spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_VALUE_NOT_FOUND no stored dark spectrum was found. |
[in] | illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
|
virtual |
Finds all available Ocean devices by scanning on USB for devices with Ocean drivers, finding devices that respond to UDP multicast (FX and HDX), and also returning IDs for any TCP-enabled devices that have been manually specified using addTCPDeviceLocation(). Returns a list of Devices objects corresponding to all of these devices, which contain some associated metadata, including their device IDs, which may be used to refer to them using the other OceanDirect member functions (starting with openDevice()). Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
|
virtual |
Return the length of spectra.
|
virtual |
Finds all available Ocean devices by scanning on USB for devices with Ocean drivers. Returns a list of Devices objects corresponding to all of these devices, which contain some associated metadata, including their device IDs, which may be used to refer to them using the other OceanDirect member functions (starting with openDevice()). Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
|
virtual |
Retrieves the given device's acquisition delay resolution, which is the minimum delta between possible consecutive acquisition delay settings. The device supports a range of acquisition delay settings [min, max] with intermediate values spaced apart by this quantity, which forms the following range in MATLAB notation: getDelayMinimumMicroseconds() : getDelayIncrementMicroseconds() : getDelayMaximumMicroseconds()
[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 |
|
virtual |
Retrieves the given device's maximum possible acquisition delay setting.
[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 |
|
virtual |
Retrieves the given device's current acquisition delay setting (time between when device receives trigger signal and when integration begins).
[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 |
|
virtual |
Retrieves the given device's minimum possible acquisition delay setting.
[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 |
|
virtual |
Retrieves the API version number (major.minor.point) for the Ocean Direct SDK
[out] | major | the major number of the software version. |
[out] | minor | the minor number of the software version. |
[out] | point | the point number of the software version. |
|
virtual |
Retrieves the given device's current boxcar filter width setting.
[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 |
|
virtual |
Finds all available Ocean devices which are currently attached by scanning on USB for devices with Ocean drivers. Returns information whether device is in use or not.
|
virtual |
Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found. ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist. |
|
virtual |
Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist. |
[in] | darkSpectrum | The buffer that contains the dark spectrum to be used for the dark correction. |
|
virtual |
Return an array of device ids from devices that were both probe or manually added. Note that this should only be done by one thread at a time.
|
virtual |
Retrieves the model name from the specified device
[in] | deviceID | The device ID of the device to query |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a currently-open device ERROR_FEATURE_NOT_FOUND if device does not support this feature |
|
virtual |
Retrieves the number of electric dark pixels on the detector of the given device. Electric dark pixels are optically masked so that they receive no light. Does not communicate with the device - uses cached values.
[in] | deviceID | The device ID of the device to be queried |
[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_COMMAND_NOT_SUPPORTED if the device does not support electric dark correction; |
|
virtual |
Retrieves the indices of electric dark pixels on the detector of the given device. Electric dark pixels are optically masked so that they receive no light. Does not communicate with the device - uses cached values.
[in] | deviceID | The device ID of the device to be queried |
[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 |
[in] | length | The number of indices to retrieve, starting with the least (determines length of returned) |
|
virtual |
Gets electric dark correction usage from the given device.
[in] | deviceID | The device ID of the device to be queried |
[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_COMMAND_NOT_SUPPORTED if the device does not support electric dark correction; ERROR_TRANSFER_ERROR if data transfer to/from device fails |
|
virtual |
Get the error message associated with the given error code. If the error code is incorrect then the return message will be "Error. Undefined error".
[in] | errorCode | The error code. |
|
virtual |
Get the error message length associated with the given error code. If the error code is incorrect then the return message length will be 0.
[in] | errorCode | The error code. |
|
virtual |
Determines the pixel index on the given device that measures light at a wavelength closest to the given query wavelength. Does not communicate with the device - uses cached wavelengths.
[in] | deviceID | The device ID of the device to be queried |
[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_CODE_ARRAY_INDEX_OUT_OF_BOUNDS if aproxWavelength does not fall within wavelength bounds of detector |
[out] | wavelength | The wavelength of light measured by the pixel that most closely matches aproxWavelength, in nanometers |
[in] | aproxWavelength | The query wavelength for which to look up the closest pixel index, in nanometers |
|
virtual |
As getIndexAtWavelength, but looks up multiple query wavelengths and returns an index for each.
[in] | deviceID | The device ID of the device to be queried |
[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_CODE_ARRAY_INDEX_OUT_OF_BOUNDS if aproxWavelength does not fall within wavelength bounds of detector |
[in,out] | wavelength | The query wavelengths for which to look up the closest pixel indices, in nanometers. Will be overwritten with a new pointer to a new array containing the same values. |
[in] | length | The length of wavelength, in elements |
|
virtual |
Retrieves the indices and wavelengths of pixels that measure light at wavelengths within the given spectral range.
[in] | deviceID | The device ID of the device to be queried |
[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_CODE_ARRAY_INDEX_OUT_OF_BOUNDS if lo or hi do not fall within wavelength bounds of detector |
[out] | wavelength | List of wavelengths of pixels whose indices are returned (length of array is given in length output parameter), given in nanometers |
[in] | lo | The inclusive lower bound of the wavelength range to look within, in nanometers |
[in] | hi | The inclusive upper bound of the wavelength range to look within, in nanometers |
|
inlinestatic |
Creates a tracked handle to an OceanDirect instance, which may be used to access all of the functionality listed below.
|
virtual |
Gets current integration time from the given device.
[in] | deviceID | The device ID of the device to be queried |
[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_TRANSFER_ERROR if data transfer to/from device fails |
|
virtual |
Gets the integration time step size from the given device. Use this value when making changes with the integration time.
[in] | deviceID | The device ID of the device to be queried |
[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_TRANSFER_ERROR if data transfer to/from device fails |
|
virtual |
Returns the maximum allowed integration time for the given device. Trying to set the device's integration time to a value above this maximum will result in setIntegrationTimeMicros() silently clamping the given time to this maximum value. Does not communicate with the device - uses cached values.
[in] | deviceID | The device ID of the device to be queried |
[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_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature |
|
virtual |
Returns the greatest intensity value that could possibly be reported at any pixel by the given device (i.e., by getSpectrum()). Does not communicate with the device - uses cached values.
[in] | deviceID | The device ID of the device to be queried |
[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_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature |
|
virtual |
Get minimum integration time in microseconds when averaging is enabled. NOTE: some devices that make use of onboard functionality to perform averaging have a different, larger, minimum integration time for acquisition when averaging is enabled. Refer to the documentation for your spectrometer to see if this is the case. The minimum integration time when averaging is not enabled can be determined using getMinimumIntegrationTimeMicros.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist. |
|
virtual |
Returns the minimum allowed integration time for the given device. Trying to set the device's integration time to a value below this minimum will result in setIntegrationTimeMicros() silently clamping the given time to this minimum value. Does not communicate with the device - uses cached values. NOTE: some devices that make use of onboard functionality to perform averaging have a different, larger, minimum integration time for acquisition when averaging is enabled. Refer to the documentation for your spectrometer to see if this is the case. The minimum integration time when averaging is enabled can be determined using getMinimumAveragingIntegrationTimeMicros.
[in] | deviceID | The device ID of the device to be queried |
[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_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature |
|
virtual |
Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction followed by a nonlinearity correction then return the nonlinearity corrected spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist. |
|
virtual |
Acquire a spectrum and use the supplied dark spectrum to perform a dark correction followed by the nonlinearity correction then return the nonlinearity corrected spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist. |
[in] | darkSpectrum | The buffer that contains the dark spectrum to be used for the dark correction. |
|
virtual |
Gets nonlinearity correction usage from the given device.
[in] | deviceID | The device ID of the device to be queried |
[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 |
|
virtual |
Gets the number of pixels on the detector, which matches the length of spectra returned by getSpectrum or wavelengths returned by getWavelengths(). Depends on device and current pixel binning mode, if applicable. Does not actually communicate with the device, since this value is read during openDevice() and cached in OceanDirect.
[in] | deviceID | The device ID of the device to be queried |
[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_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature |
|
virtual |
Retrieved raw spectrum with timestamp. To use this function, the data buffer must be enabled and the back-to-back spectra acquisition count be set. Note: this method will return up to the maximum number of spectra specified. Some spectrometer types may return a single spectrum at a time so it is advisable to check the size of the returned array.
[in] | deviceID | The device ID of the device to be queried |
[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_COMMAND_NOT_SUPPORTED this command is not supported by the device ERROR_TRANSFER_ERROR if data transfer to/from device fails |
[in] | count | The maximum desired number of spectra to retrieve. This must be between 1 and 15. |
|
virtual |
Retrieves the given device's current averaging setting.
[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 |
|
virtual |
Retrieves the serial number of the given device.
[in] | deviceID | The device ID of the device to be queried |
[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 |
|
virtual |
Retrieves a spectral measurement in a manner depending on the device's current trigger mode.
[in] | deviceID | The device ID of the device to be queried |
[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 |
|
virtual |
Retrieve a previously stored dark spectrum for use in subsequent corrections i.e. dark correction and nonlinearity correction.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_NO_DEVICE if the device does not exist. |
|
virtual |
Read the spectrometer trigger mode. Please see your spectrometer documentation for valid values of the trigger mode.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_CODE_INVALID_ARGUMENT if the mode supplied is not valid; ERROR_NO_DEVICE if the device does not exist. |
|
virtual |
Gets wavelength for a single pixel on the detector at the specified index.
[in] | deviceID | The device ID of the device to be queried |
[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] | pixel | Index (zero-based) of pixel on detector for which to get the wavelength - must be on range [0, getNumberOfPixels()-1] |
IndexOutOfRangeException | if provided pixel index is not in valid range |
|
virtual |
Retrieves the wavelength coefficients of the given device.
[in] | deviceID | The device ID of the device to be queried |
[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 |
|
virtual |
Gets wavelength at which each pixel on the device's detector reports intensity.
[in] | deviceID | The device ID of the device to be queried |
[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 |
|
virtual |
Determines whether a feature is supported by a particular spectrometer or not.
[in] | deviceID | the device ID of the device to query |
[in] | FeatureID | the enumeration of the feature to query |
[out] | errorCode | set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a currently-open device ERROR_FEATURE_NOT_FOUND if device does not support this feature |
|
virtual |
Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_COMMAND_NOT_SUPPORTED if device does not support this command. |
[in] | darkSpectrum | The buffer that contains the dark spectrum to be used prior to the nonlinearity correction. |
[in] | illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
|
virtual |
Nonlinearity correct a previously acquired illuminated spectrum using a stored dark spectrum. This function performs a dark correction using a previously stored dark spectrum prior to performing the nonlinearity correction.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_COMMAND_NOT_SUPPORTED if device does not support this command. |
[in] | illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
|
virtual |
Opens the spectrometer with the given device ID, which allows the various operations listed below to be performed on it by passing this same device ID. After being opened, the spectrometer not be opened again until it is first closed using closeDevice(). After the device is closed the id becomes invalid. You need to call either findDevices()/findUSBDevices/addNetworkDevice() and getDeviceIDs() in order to have a valid id before reopening the device again. For a network connected device this function may return an error code if the device is not yet ready to accept incoming connection or the device is unreachable. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
[in] | deviceID | The device ID of the device to be opened (get using findDevices()) |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid device ID or device does not support spectrometer feature. |
|
virtual |
Sets acquisition delay (time between when device receives trigger signal and when integration begins) for the given device. Functions such as getDelayMaximumMicroseconds() can be used to determine valid values for this setting.
[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 |
[in] | delay_usec | The new acquisition delay, in microseconds |
|
virtual |
Sets the boxcar filter width for a given device.
[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] | boxcarWidth | The width of the boxcar filter to be applied on the device |
|
virtual |
Sets integration time for the given device, which is how long the detector collects photons before reading it out. NOTE: some devices that make use of onboard functionality to perform averaging have a different, larger, minimum integration time for acquisition when averaging is enabled. Refer to the documentation for your spectrometer to see if this is the case. The minimum integration time when averaging is enabled can be determined using getMinimumAveragingIntegrationTimeMicros.
[in] | deviceID | The device ID of the device to configure |
[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_INPUT_OUT_OF_BOUNDS if an invalid integration time is supplied ERROR_INTEGRATION_TIME_BELOW_AVERAGING_MIN if averaging is enabled and the specified integration time is below the minimum required for averaging (see getMinimumAveragingIntegrationTimeMicros); ERROR_TRANSFER_ERROR if data transfer to/from device fails |
[in] | integrationTimeMicros | The integration time to set, in microseconds |
|
virtual |
Set the delay between reading multicast response. This must be called before probing network devices.
delayMs | The delay in milliseconds before next read. |
|
virtual |
Set the number of times to read multicast message response. This must be called before probing network devices.
retryCount | The number of times to try reading multicast response messages. |
|
virtual |
Set the number of times to send multicast message for dynamic probing. This must be called before probing network devices.
retryCount | The number of times to send messages. |
|
virtual |
Sets the number of scans to be averaged per measurement for a given device. When this value is set greater than 1 the specified number of spectra are averaged and the resulting average is returned by getFormattedSpectrum (or getRawSpectrumWithMetadata). NOTE: Some devices have a minimum integration time for averaging that is different to the minimum integration time for unaveraged acquisition (see your spectrometer documentation to determine if this is a requirement).
[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 ERROR_INTEGRATION_TIME_BELOW_AVERAGING_MIN if the current integration time is below the minimum required for averaging it will not be possible to enable averaging (see getMinimumAveragingIntegrationTimeMicros); |
[in] | scansToAverage | The number of scans to average on the device for each measurement |
|
virtual |
Store a dark spectrum for use in subsequent corrections i.e. dark correction and nonlinearity correction.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_NO_DEVICE if the device does not exist. |
[int] | darkSpectrum The buffer that contains the dark spectrum to be stored. |
|
virtual |
Sets trigger mode for the given device, which signals when to collects photons.
[in] | deviceID | The device ID of the device to configure |
[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_INPUT_OUT_OF_BOUNDS if an invalid integration time is supplied ERROR_TRANSFER_ERROR if data transfer to/from device fails |
[in] | triggerMode | Refer to your device manual on supported trigger modes. |
|
virtual |
This may be called to free up any allocated memory being held by the driver interface. This must be called before the program ends.