NetOceanDirectLighthouse 3.1.3
OceanDirect Lighthouse .NET API
NetLighthouse::Lighthouse Class Reference

#include <NetLighthouse.h>

Inherits NetOceanDirect::ManagedObject< LighthouseAPI, MemoryCleanup::noDeletion >.

Public Member Functions

 Lighthouse (LighthouseAPI *instance)
 
virtual ~Lighthouse ()
 
virtual NetLighthouseAutonulling AutoNulling ()
 
array< float > boxcarCorrectSpectrum (long deviceID, int% errorCode, array< float >^% illuminatedSpectrum, unsigned short boxcarWidth)
 
virtual void closeDevice (unsigned int deviceID, int %errorCode)
 
virtual array< float > darkCorrectSpectrum (unsigned int deviceID, int %errorCode, array< float >^% darkSpectrum, array< float >^% illuminatedSpectrum)
 
virtual array< float > darkCorrectSpectrum (unsigned int deviceID, int %errorCode, array< float >^% illuminatedSpectrum)
 
virtual NetLighthouseDeviceInformation DeviceInformation ()
 
virtual NetLighthouseFlash Flash ()
 
virtual NetLighthouseGainMode GainMode ()
 
virtual unsigned int getAcquisitionDelay (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getAcquisitionDelayIncrement (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getAcquisitionDelayMaximum (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getAcquisitionDelayMinimum (unsigned int deviceID, int %errorCode)
 
virtual void getAPIRCNumber (unsigned int %candidate)
 
virtual void getAPIVersionNumber (unsigned int %major, unsigned int %minor, unsigned int %point)
 
virtual unsigned short getBoxcarWidth (unsigned int deviceID, int %errorCode)
 
virtual array< float > getDarkCorrectedSpectrum (unsigned int deviceID, int %errorCode, array< float >^% darkSpectrum)
 
virtual array< float > getDarkCorrectedSpectrum (unsigned int deviceID, int% errorCode)
 
virtual array< unsigned int > getDeviceIDs ()
 
virtual net_lh_enable_state_t getElectricDarkCorrectionState (unsigned int deviceID, int %errorCode)
 
virtual String getErrorMessage (int errorCode)
 
virtual unsigned int getErrorMessageLength (int errorCode)
 
virtual unsigned int getIntegrationTime (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getIntegrationTimeIncrement (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getMaximumIntegrationTime (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getMaximumIntensity (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getMinimumAveragingIntegrationTime (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getMinimumIntegrationTime (unsigned int deviceID, int %errorCode)
 
virtual array< unsigned int > getNetworkDeviceIDs ()
 
virtual array< float > getNonlinearityCorrectedSpectrum (unsigned int deviceID, int %errorCode, array< float >^% darkSpectrum)
 
virtual array< float > getNonlinearityCorrectedSpectrum (unsigned int deviceID, int% errorCode)
 
virtual net_lh_enable_state_t getNonLinearityCorrectionState (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getScansToAverage (unsigned int deviceID, int %errorCode)
 
virtual array< float > getSpectrum (unsigned int deviceID, int %errorCode)
 
virtual unsigned int getSpectrumLength (unsigned int deviceID, int %errorCode)
 
virtual NetLighthouseSpectrumWithMetadata getSpectrumWithMetadata (unsigned int deviceID, int %errorCode)
 
virtual array< float > getStoredDarkSpectrum (unsigned int deviceID, int %errorCode)
 
virtual NetLighthouseTriggerMode getTriggerMode (unsigned int deviceID, int %errorCode)
 
virtual array< float > getWavelengthCoefficients (unsigned int deviceID, int %errorCode)
 
virtual array< float > getWavelengths (unsigned int deviceID, int %errorCode)
 
virtual NetLighthouseGpio Gpio ()
 
virtual NetLighthouseLamp Lamp ()
 
virtual NetLighthouseLed Led ()
 
virtual NetLighthouseNetworkConfiguration Network ()
 
virtual NetLighthouseNonlinearity Nonlinearity ()
 
virtual array< float > nonlinearityCorrectSpectrum (unsigned int deviceID, int %errorCode, array< float >^% darkSpectrum, array< float >^% illuminatedSpectrum)
 
virtual array< float > nonlinearityCorrectSpectrum (unsigned int deviceID, int %errorCode, array< float >^% illuminatedSpectrum)
 
virtual void openDevice (unsigned int deviceID, int %errorCode)
 
virtual unsigned int probeAllDevices ()
 
virtual unsigned int probeNetworkDevices ()
 
virtual unsigned int probeUsbDevices ()
 
virtual NetLighthouseSensorInformation SensorInformation ()
 
virtual NetLighthouseSerialPort SerialPort ()
 
virtual void setAcquisitionDelay (unsigned int deviceID, int %errorCode, unsigned int microseconds)
 
virtual void setBoxcarWidth (unsigned int deviceID, int% errorCode, unsigned short boxcarWidth)
 
virtual void setElectricDarkCorrectionState (unsigned int deviceID, int %errorCode, net_lh_enable_state_t state)
 
virtual void setIntegrationTime (unsigned int deviceID, int %errorCode, unsigned int microseconds)
 
virtual void setMulticastMsgResponseReadDelay (size_t milliseconds)
 
virtual void setMulticastMsgResponseReadRetry (size_t retryCount)
 
virtual void setMulticastMsgSendRetry (size_t retryCount)
 
virtual void setNonLinearityCorrectionState (unsigned int deviceID, int %errorCode, net_lh_enable_state_t state)
 
virtual void setScansToAverage (unsigned int deviceID, int% errorCode, unsigned int scansToAverage)
 
virtual void setStoredDarkSpectrum (unsigned int deviceID, int %errorCode, array< float >^% darkSpectrum)
 
virtual void setTriggerMode (unsigned int deviceID, int %errorCode, NetLighthouseTriggerMode mode)
 
virtual void shutdown ()
 
virtual NetLighthouseShutter Shutter ()
 
virtual NetLighthouseStrobe Strobe ()
 
virtual NetLighthouseThermoelectric Thermoelectric ()
 
virtual NetLighthouseUserString UserString ()
 

Static Public Member Functions

static Lighthouse getInstance ()
 

Protected Member Functions

 Lighthouse ()
 

Static Protected Attributes

static Lighthouse lighthouseInstance
 

Constructor & Destructor Documentation

◆ Lighthouse() [1/2]

Lighthouse::Lighthouse ( )
protected

◆ Lighthouse() [2/2]

NetLighthouse::Lighthouse::Lighthouse ( LighthouseAPI * instance)
inline

◆ ~Lighthouse()

virtual NetLighthouse::Lighthouse::~Lighthouse ( )
inlinevirtual

Member Function Documentation

◆ AutoNulling()

NetLighthouseAutonulling Lighthouse::AutoNulling ( )
virtual

Get a string that describes the type of device

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode
buffera character buffer to receive the device type string.
lengththe length of the supplied buffer.
Returns
the actual length of the device type string on success or 0 on error. .AutoNulling Return a pointer to the API that queries device autonulling i.e. the maximum value returned by the sensor ADC, the intensity that the sensor saturates at and the baseline (offset from zero) intensity.
a pointer to the autonulling API.

◆ boxcarCorrectSpectrum()

array< float > Lighthouse::boxcarCorrectSpectrum ( long deviceID,
int% errorCode,
array< float >^% illuminatedSpectrum,
unsigned short boxcarWidth )

.boxcarCorrectSpectrum Apply a boxcar smoothing on the given illuminated spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
illuminatedSpectrumThe spectrum that will be boxcar corrected.
boxcarWidthThe boxcar width.
Returns
an array containing the boxcar smoothed spectrum.

◆ closeDevice()

void Lighthouse::closeDevice ( unsigned int deviceID,
int % errorCode )
virtual

.closeDevice This will attempt to close the bus connection to the device with the given ID. 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.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode

◆ darkCorrectSpectrum() [1/2]

virtual array< float > NetLighthouse::Lighthouse::darkCorrectSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% darkSpectrum,
array< float >^% illuminatedSpectrum )
virtual

.darkCorrectSpectrum2 Dark correct a previously acquired illuminated spectrum using a previously acquired dark spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used for the dark correction.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
Returns
an array containing the dark corrected spectrum.

◆ darkCorrectSpectrum() [2/2]

virtual array< float > NetLighthouse::Lighthouse::darkCorrectSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% illuminatedSpectrum )
virtual

.darkCorrectSpectrum1 Dark correct a previously acquired illuminated spectrum using a stored dark spectrum.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
Returns
an array containing the dark corrected spectrum.

◆ DeviceInformation()

NetLighthouseDeviceInformation Lighthouse::DeviceInformation ( )
virtual

.DeviceInformation Return a pointer to the API that provides device information. This API gives information about e.g. devices firmware version, USB vendor and product IDs, device serial number.

Returns
a pointer to the device information API.

◆ Flash()

NetLighthouseFlash NetLighthouse::Lighthouse::Flash ( )
virtual

.Flash Return a pointer to the flash API.

Returns
a pointer to the flash API.

◆ GainMode()

NetLighthouseGainMode NetLighthouse::Lighthouse::GainMode ( )
virtual

.GainMode Return a pointer to the sensor gain mode API on devices where this is available.

Returns
a pointer to the sensor gain mode API.

◆ getAcquisitionDelay()

unsigned int Lighthouse::getAcquisitionDelay ( unsigned int deviceID,
int % errorCode )
virtual

.getAcquisitionDelay Get the acquisition delay period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the acquisition delay period in microseconds or 0 on error.

◆ getAcquisitionDelayIncrement()

unsigned int Lighthouse::getAcquisitionDelayIncrement ( unsigned int deviceID,
int % errorCode )
virtual

.getAcquisitionDelayIncrement Get the acquisition delay period increment in microseconds. The increment is the minimum difference (in microseconds) between two adjacent, valid acquisition delay periods.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the acquisition delay period increment in microseconds or 0 on error.

◆ getAcquisitionDelayMaximum()

unsigned int Lighthouse::getAcquisitionDelayMaximum ( unsigned int deviceID,
int % errorCode )
virtual

.getAcquisitionDelayMaximum Get the maximum valid acquisition delay period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum acquisition delay period in microseconds or 0 on error.

◆ getAcquisitionDelayMinimum()

unsigned int Lighthouse::getAcquisitionDelayMinimum ( unsigned int deviceID,
int % errorCode )
virtual

.getAcquisitionDelayMinimum Get the minimum valid acquisition delay period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum acquisition delay period in microseconds or 0 on error.

◆ getAPIRCNumber()

void Lighthouse::getAPIRCNumber ( unsigned int % candidate)
virtual

◆ getAPIVersionNumber()

void Lighthouse::getAPIVersionNumber ( unsigned int % major,
unsigned int % minor,
unsigned int % point )
virtual

.getAPIVersionNumber Return the major, minor and point API release version numbers.

Parameters
majorthe major software version number.
minorthe minor software version number.
pointthe point software version number.

◆ getBoxcarWidth()

unsigned short Lighthouse::getBoxcarWidth ( unsigned int deviceID,
int % errorCode )
virtual

.getBoxcarWidth Get the width of the boxcar smoothing to be applied to the returned spectrum. When this value has been set greater than 0, boxcar smoothing (a moving average) is applied to the spectrum returned by getFormattedSpectrum (or getRawSpectrumWithMetadata). The width specified is the number of pixels either side of the central pixel of the average i.e. if the result of this function is n, the "full width" of the smoothing is 2*n+1.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the width of the smoothing to be applied per returned spectrum or 0 on error.

◆ getDarkCorrectedSpectrum() [1/2]

virtual array< float > NetLighthouse::Lighthouse::getDarkCorrectedSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% darkSpectrum )
virtual

.getDarkCorrectedSpectrum2 Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used for the dark correction.
Returns
an array containing the dark corrected spectrum.

◆ getDarkCorrectedSpectrum() [2/2]

array< float > Lighthouse::getDarkCorrectedSpectrum ( unsigned int deviceID,
int% errorCode )
virtual

.getDarkCorrectedSpectrum1 Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
an array containing the dark corrected spectrum.

◆ getDeviceIDs()

array< unsigned int > Lighthouse::getDeviceIDs ( )
virtual

.getDeviceIDs This provides a unique ID of each device that is detected or specified. The IDs are copied into the user-provided buffer. These IDs are weak references: attempting to access a device that no longer exists will cause an error value to be returned. A given ID will always refer to the same device until the device is closed or the shutdown method is called. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Returns
An array of device ids.

◆ getElectricDarkCorrectionState()

net_lh_enable_state_t Lighthouse::getElectricDarkCorrectionState ( unsigned int deviceID,
int % errorCode )
virtual

.getElectricDarkCorrectionState

Deprecated
Determine if automatic electric dark correction to the acquired spectra is on or off.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on." if automatic electric dark correction is turned on, "off" otherwise (or on error).

◆ getErrorMessage()

String Lighthouse::getErrorMessage ( int errorCode)
virtual

.getErrorMessage Get error message associated with the given error code. If the error code is incorrect then the return message will be "Error. Undefined error".

Parameters
errorCodeThe error code.
Returns
the error message corresponding to the error code or "Undefined error" if the error code is not valid.

◆ getErrorMessageLength()

unsigned int Lighthouse::getErrorMessageLength ( int errorCode)
virtual

.getErrorMessageLength Get error message length associated with the given error code. If the error code is incorrect then the return message length will be 0.

Parameters
errorCodesee LHErrorCode.
Returns
the size of the error message associated with the supplied error code.

◆ getInstance()

static Lighthouse NetLighthouse::Lighthouse::getInstance ( )
inlinestatic

.getInstance The API is a singleton and has no public constructor. To use this class you must first call getInstance() to return a pointer/reference to the API.

Returns
a tracked handle to the Lighthouse API instance.

◆ getIntegrationTime()

unsigned int Lighthouse::getIntegrationTime ( unsigned int deviceID,
int % errorCode )
virtual

.getIntegrationTime Get the current device integration time in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current integration time in microseconds or 0 on error.

◆ getIntegrationTimeIncrement()

unsigned int Lighthouse::getIntegrationTimeIncrement ( unsigned int deviceID,
int % errorCode )
virtual

.getIntegrationTimeIncrement Get the device integration time increment in microseconds. Some devices may only allow the integration time to be changed in multiples of this increment value.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the integration time increment in microseconds or 0 on error.

◆ getMaximumIntegrationTime()

unsigned int Lighthouse::getMaximumIntegrationTime ( unsigned int deviceID,
int % errorCode )
virtual

.getMaximumIntegrationTime Get maximum device integration time in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum integration time in microseconds, or 0 on error.

◆ getMaximumIntensity()

unsigned int Lighthouse::getMaximumIntensity ( unsigned int deviceID,
int % errorCode )
virtual

.getMaximumIntensity Get max intensity (in counts) that can be returned in any pixel.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum pixel intensity or 0 on error.

◆ getMinimumAveragingIntegrationTime()

unsigned int Lighthouse::getMinimumAveragingIntegrationTime ( unsigned int deviceID,
int % errorCode )
virtual

.getMinimumAveragingIntegrationTime 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 getMinimumIntegrationTime.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum integration time in microseconds with averaging enabled, or 0 on error.

◆ getMinimumIntegrationTime()

unsigned int Lighthouse::getMinimumIntegrationTime ( unsigned int deviceID,
int % errorCode )
virtual

.getMinimumIntegrationTime Get minimum device integration time in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum integration time in microseconds for acquisition with no averaging or 0 on error.

◆ getNetworkDeviceIDs()

array< unsigned int > Lighthouse::getNetworkDeviceIDs ( )
virtual

.getNetworkDeviceIDs This provides a unique ID of each network attached device that is detected or manually specified. The IDs are copied into the user-provided buffer. These IDs are weak references: attempting to access a device that no longer exists will cause an error value to be returned. A given ID will always refer to the same device until the device is closed or the shutdown method is called. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Returns
an array continaing the device IDs of any detected network devices.

◆ getNonlinearityCorrectedSpectrum() [1/2]

virtual array< float > NetLighthouse::Lighthouse::getNonlinearityCorrectedSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% darkSpectrum )
virtual

.getNonlinearityCorrectedSpectrum2 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.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used for the dark correction.
Returns
an array containing the nonlinearity corrected spectrum.

◆ getNonlinearityCorrectedSpectrum() [2/2]

array< float > Lighthouse::getNonlinearityCorrectedSpectrum ( unsigned int deviceID,
int% errorCode )
virtual

.getNonlinearityCorrectedSpectrum1 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.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
an array containing the nonlinearity corrected spectrum.

◆ getNonLinearityCorrectionState()

net_lh_enable_state_t Lighthouse::getNonLinearityCorrectionState ( unsigned int deviceID,
int % errorCode )
virtual

.getNonLinearityCorrectionState

Deprecated
Determine if automatic nonlinearity correction is on or off.
See also
setNonLinearityCorrectionState
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on" if automatic nonlinearity correction is turned on, "off" otherwise (or on error).

◆ getScansToAverage()

unsigned int Lighthouse::getScansToAverage ( unsigned int deviceID,
int % errorCode )
virtual

.getScansToAverage Get the number of spectra to be averaged per returned spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the number of spectra to be averaged per returned spectrum or 0 on error.

◆ getSpectrum()

array< float > Lighthouse::getSpectrum ( unsigned int deviceID,
int % errorCode )
virtual

.getSpectrum Get a spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
an array containing the pixel intensities.

◆ getSpectrumLength()

unsigned int Lighthouse::getSpectrumLength ( unsigned int deviceID,
int % errorCode )
virtual

.getSpectrumLength Get spectrum length i.e. the number of pixels in the spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the size of the spectrum or 0 on error.

◆ getSpectrumWithMetadata()

NetLighthouseSpectrumWithMetadata Lighthouse::getSpectrumWithMetadata ( unsigned int deviceID,
int % errorCode )
virtual

.getSpectrumWithMetadata Get spectrum with meta-data.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the data structure containing the spectrum (pixel intensities) and metadata.

◆ getStoredDarkSpectrum()

array< float > Lighthouse::getStoredDarkSpectrum ( unsigned int deviceID,
int % errorCode )
virtual

.getStoredDarkSpectrum Retrieve a previously stored dark spectrum for use in subsequent corrections i.e. dark correction and nonlinearity correction.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
an array containing the current stored dark spectrum

◆ getTriggerMode()

NetLighthouseTriggerMode Lighthouse::getTriggerMode ( unsigned int deviceID,
int % errorCode )
virtual

.getTriggerMode Get the spectrometer trigger mode (software, edge or level).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current trigger mode being used by the device or "software" on error.

◆ getWavelengthCoefficients()

array< float > Lighthouse::getWavelengthCoefficients ( unsigned int deviceID,
int % errorCode )
virtual

.getWavelengthCoefficients Get the coefficients of the polynomial used to calculate the wavelengths.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
an array containing the wavelengths coefficients.

◆ getWavelengths()

array< float > Lighthouse::getWavelengths ( unsigned int deviceID,
int % errorCode )
virtual

.getWavelengths Get the wavelengths (in nanometres) for each pixel of the specified device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
an array containing the wavelengths in nanometres

◆ Gpio()

NetLighthouseGpio NetLighthouse::Lighthouse::Gpio ( )
virtual

.Gpio Return a pointer to the API that controls GPIO functionality e.g. setting the direction of GPIO pins and setting output and reading input values.

Returns
a pointer to the GPIO API.

◆ Lamp()

NetLighthouseLamp NetLighthouse::Lighthouse::Lamp ( )
virtual

.Lamp Return a pointer to the "lamp" functionality e.g. turning the lamp pin on or off.

Returns
a pointer to the lamp API.

◆ Led()

NetLighthouseLed NetLighthouse::Lighthouse::Led ( )
virtual

.Led Return a pointer to the API that controls the device LED functions e.g. turn the LED on or off.

Returns
a pointer to the LED API.

◆ Network()

NetLighthouseNetworkConfiguration NetLighthouse::Lighthouse::Network ( )
virtual

.Network Return a pointer to the API that configures/queries the Ethernet network configuration on devices where it is available.

Returns
a pointer to the network configuration API.

◆ Nonlinearity()

NetLighthouseNonlinearity NetLighthouse::Lighthouse::Nonlinearity ( )
virtual

.Nonlinearity Return a pointer to the API that controls the parameters used for nonlinearity correction of spectra.

Returns
a pointer to the nonlinearity correction configuration API.

◆ nonlinearityCorrectSpectrum() [1/2]

virtual array< float > NetLighthouse::Lighthouse::nonlinearityCorrectSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% darkSpectrum,
array< float >^% illuminatedSpectrum )
virtual

.nonlinearityCorrectSpectrum2 Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used prior to the nonlinearity correction.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
Returns
an array containing the nonlinearity corrected spectrum.

◆ nonlinearityCorrectSpectrum() [2/2]

virtual array< float > NetLighthouse::Lighthouse::nonlinearityCorrectSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% illuminatedSpectrum )
virtual

.nonlinearityCorrectSpectrum1 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.

See also
setStoredDarkSpectrum
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
Returns
an array containing the nonlinearity corrected spectrum.

◆ openDevice()

void Lighthouse::openDevice ( unsigned int deviceID,
int % errorCode )
virtual

.openDevice This will attempt to open the bus connection to the device with the given ID. After the device is closed the id becomes invalid. You need to call either probeDevices()/addNetworkDevice()/detectNetworkDevices() 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.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode

◆ probeAllDevices()

unsigned int Lighthouse::probeAllDevices ( )
virtual

.probeAllDevices Cause the driver to look for any device that can be found automatically (i.e. attached by USB and network devices). Until this method called then such devices will not be available for use. Before calling this function, you may want to adjust the multicast settings use for probing network devices. A subsequent call to getDeviceIDs is needed before a device can be "opened" and used. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

See also
probeUsbDevices()
probeNetworkDevices()
setMulticastMsgSendRetry()
setMulticastMsgResponseReadRetry()
setMulticastMsgResponseReadDelay()
Returns
the number of devices found.

◆ probeNetworkDevices()

unsigned int Lighthouse::probeNetworkDevices ( )
virtual

.probeNetworkDevices This provides a way to find all Ethernet discoverable devices. Afterwards, a call to probeDevices is neccessary to grab the interface for opening and connecting to discovered device. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Returns
the number of detected network devices.

◆ probeUsbDevices()

unsigned int Lighthouse::probeUsbDevices ( )
virtual

.probeUsbDevices Cause the driver to look for any device that can be found automatically i.e. attached by USB. Until this method called then such devices will not be available for use. A subsequent call to getDeviceIDs is needed before a device can be "opened" and used. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

See also
probeNetworkDevices()
Returns
the number of USB devices.

◆ SensorInformation()

NetLighthouseSensorInformation Lighthouse::SensorInformation ( )
virtual

.SensorInformation Return a pointer to the the API that provides sensor information e.g. the total number of pixels, the indices of optical dark pixels.

Returns
a pointer to the sensor information API.

◆ SerialPort()

NetLighthouseSerialPort NetLighthouse::Lighthouse::SerialPort ( )
virtual

.SerialPort Return a pointer to the API that configures the serial port e.g setting/getting the baud rate.

Returns
a pointer to the serial port API.

◆ setAcquisitionDelay()

void Lighthouse::setAcquisitionDelay ( unsigned int deviceID,
int % errorCode,
unsigned int microseconds )
virtual

.setAcquisitionDelay Set the acquisition delay to the specified number of microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe acquisition delay period in microseconds.

◆ setBoxcarWidth()

void Lighthouse::setBoxcarWidth ( unsigned int deviceID,
int% errorCode,
unsigned short boxcarWidth )
virtual

.setBoxcarWidth Set the width of the boxcar smoothing to be applied to the returned spectrum. When this value is set greater than 0, boxcar smoothing (a moving average) is applied to the spectrum returned by getFormattedSpectrum (or getRawSpectrumWithMetadata). The width specified is the number of pixels either side of the central pixel of the average i.e. if the result of this function is n, the "full width" of the smoothing is 2*n+1. Setting this value to 0 turns off the boxcar smoothing.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
boxcarWidththe width of the smoothing to be applied, or zero if smoothing is to be turned off.

◆ setElectricDarkCorrectionState()

void Lighthouse::setElectricDarkCorrectionState ( unsigned int deviceID,
int % errorCode,
net_lh_enable_state_t state )
virtual

.setElectricDarkCorrectionState

Deprecated
Toggle the "automatic" electric dark correction on or off for an acquired spectrum. This correction is applied automatically to any acquired spectrum when the function is turned on.
See also
setStoredDarkSpectrum
getStoredDarkSpectrum
getDarkCorrectedSpectrum
Warning
if electric dark correction is enabled using this function then some of the newer dark correction functionality e.g. getDarkCorrectedSpectrum may not be used at the same time.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" if electric dark correction is to be used, "off" otherwise.

◆ setIntegrationTime()

void Lighthouse::setIntegrationTime ( unsigned int deviceID,
int % errorCode,
unsigned int microseconds )
virtual

.setIntegrationTime Set the current device integration time in microseconds.

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.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe desired integration time in microseconds.

◆ setMulticastMsgResponseReadDelay()

void Lighthouse::setMulticastMsgResponseReadDelay ( size_t milliseconds)
virtual

.setMulticastMsgResponseReadDelay Set the delay between reading multicast response. This must be called before probing network devices.

See also
detectNetworkDevices()
Parameters
millisecondsThe delay in milliseconds before next read.

◆ setMulticastMsgResponseReadRetry()

void Lighthouse::setMulticastMsgResponseReadRetry ( size_t retryCount)
virtual

.setMulticastMsgResponseReadRetry Set the number of times to read multicast message response. This must be called before probing network devices.

See also
detectNetworkDevices()
Parameters
retryCountThe number of times to try reading multicast response messages.

◆ setMulticastMsgSendRetry()

void Lighthouse::setMulticastMsgSendRetry ( size_t retryCount)
virtual

.setMulticastMsgSendRetry Set the number of times to send multicast message for dynamic probing. This must be called before probing network devices.

See also
detectNetworkDevices()
Parameters
retryCountThe number of times to send messages.

◆ setNonLinearityCorrectionState()

void Lighthouse::setNonLinearityCorrectionState ( unsigned int deviceID,
int % errorCode,
net_lh_enable_state_t state )
virtual

.setNonLinearityCorrectionState

Deprecated
Toggle the "automatic" nonlinearity correction on or off for an acquired spectrum. This correction is applied automatically to any acquired spectrum when the function is turned on. If nonlinearity correction is turned on then electric dark correction is also turned on even if it was previously turned off.
See also
setStoredDarkSpectrum
getStoredDarkSpectrum
getNonlinearityCorrectedSpectrum
Warning
if nonlinearity correction is enabled using this function then some of the newer nonlinearity correction functionality e.g. getNonlinearityCorrectedSpectrum may not be used at tne same time.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" if nonlinearity correction is to be used, "off" otherwise.

◆ setScansToAverage()

void Lighthouse::setScansToAverage ( unsigned int deviceID,
int% errorCode,
unsigned int scansToAverage )
virtual

.setScansToAverage Set the number of spectra to be averaged per returned spectrum. 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).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
scansToAveragethe number of scans to be averaged.

◆ setStoredDarkSpectrum()

void Lighthouse::setStoredDarkSpectrum ( unsigned int deviceID,
int % errorCode,
array< float >^% darkSpectrum )
virtual

.setStoredDarkSpectrum Store a dark spectrum for use in subsequent corrections i.e. dark correction and nonlinearity correction.

See also
getStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be stored.

◆ setTriggerMode()

void Lighthouse::setTriggerMode ( unsigned int deviceID,
int % errorCode,
NetLighthouseTriggerMode mode )
virtual

.setTriggerMode Set the spectrometer trigger mode (software, edge or level).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
modethe trigger mode to apply.

◆ shutdown()

void Lighthouse::shutdown ( )
virtual

.shutdown shutdown must be called when the API is no longer needed. It performs cleanup activities and releases resources claimed by the API. After this method has been called all devices that had been available will no longer be available unless a further call to to probe devices is made.

◆ Shutter()

NetLighthouseShutter NetLighthouse::Lighthouse::Shutter ( )
virtual

.Shutter Return a pointer to the shutter control API e.g. opening/closing the shutter.

Returns
a pointer the the shutter control API.

◆ Strobe()

NetLighthouseStrobe NetLighthouse::Lighthouse::Strobe ( )
virtual

.Strobe Return a pointer to the API that controls the device strobe functionality. This API controls both single and continuous strobe functions.

Returns
a pointer to the strobe API.

◆ Thermoelectric()

NetLighthouseThermoelectric NetLighthouse::Lighthouse::Thermoelectric ( )
virtual

.Thermoelectric Return a pointer to the thermoelectric temperature (TEC) control functionality. Thermoelectric cooling can improve the sensitivity of the sensor. Note: not all devices have thermoelectric temperature control; attempting to use this functionality on a device without TEC will result in "command not supported" errors being returned.

Returns
a pointer to the thermoelectric temperature control API.

◆ UserString()

NetLighthouseUserString NetLighthouse::Lighthouse::UserString ( )
virtual

.UserString Return a pointer to the user-settable string API.

Returns
a pointer to the user string API.

Member Data Documentation

◆ lighthouseInstance

Lighthouse NetLighthouse::Lighthouse::lighthouseInstance
staticprotected

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