Wasatch.NET 2.4.14
.NET application driver for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
WasatchNET.IDriver Interface Reference

Singleton providing access to individual Spectrometer instances, while providing high-level support infrastructure like a master version string, reusable logger etc. More...

Inheritance diagram for WasatchNET.IDriver:
[legend]

Public Member Functions

void closeAllSpectrometers ()
 Automatically called as part of application shutdown (can be called manually).
 
MultiChannelWrapper getMultiChannelWrapper ()
 Gets a custom Wrapper object provided to automate multi-channel operations.
 
int getNumberOfSpectrometers ()
 How many Wasatch USB spectrometers were found.
 
Spectrometer getSpectrometer (int index)
 Obtains a reference to the specified spectrometer, performing any prelimary "open" / instantiation steps required to leave the spectrometer fully ready for use.
 
int openAllSpectrometers ()
 Iterate over all discoverable Wasatch Photonics USB spectrometers, and return the number found. Individual spectrometers can then be accessed via the getSpectrometer(index) call.
 

Properties

Logger logger [get]
 
string version [get]
 

Detailed Description

Singleton providing access to individual Spectrometer instances, while providing high-level support infrastructure like a master version string, reusable logger etc.

In defiance of Microsoft convention, there are no Hungarian prefixes, and camelCase is used throughout. Sorry.

Member Function Documentation

◆ closeAllSpectrometers()

void WasatchNET.IDriver.closeAllSpectrometers ( )

Automatically called as part of application shutdown (can be called manually).

Implemented in WasatchNET.Driver.

◆ getMultiChannelWrapper()

MultiChannelWrapper WasatchNET.IDriver.getMultiChannelWrapper ( )

Gets a custom Wrapper object provided to automate multi-channel operations.

Returns
a MultiChannelWrapper

Implemented in WasatchNET.Driver.

◆ getNumberOfSpectrometers()

int WasatchNET.IDriver.getNumberOfSpectrometers ( )

How many Wasatch USB spectrometers were found.

Returns
number of enumerated Wasatch spectrometers

Implemented in WasatchNET.Driver.

◆ getSpectrometer()

Spectrometer WasatchNET.IDriver.getSpectrometer ( int  index)

Obtains a reference to the specified spectrometer, performing any prelimary "open" / instantiation steps required to leave the spectrometer fully ready for use.

Parameters
indexzero-indexed (should be less than the value returned by openAllSpectrometers() / getNumberOfSpectrometers())

Spectrometers are deterministically ordered by (model, serialNumber) for repeatability.

Returns
a reference to the requested Spectrometer object, or null on error

Implemented in WasatchNET.Driver.

◆ openAllSpectrometers()

int WasatchNET.IDriver.openAllSpectrometers ( )

Iterate over all discoverable Wasatch Photonics USB spectrometers, and return the number found. Individual spectrometers can then be accessed via the getSpectrometer(index) call.

The intent is that this method will only be called once per application session, at startup, and that all spectrometers will be opened and initialized once and then continue operating throughout the application lifetime.

However, long-running (process monitoring) applications may find that individual spectrometers may need to be power-cycled or re-enumerated during an application session, and the customer may not wish to call closeAllSpectrometers() to halt all spectrometer activity while resetting one device. Therefore, openAllSpectrometers will attempt to "quietly" (non-destructively) re-open spectrometers which were last seen to be in a "working" state (successfully retrieving spectra), and only forcibly re-initialize (to default values) spectrometers who were last seen to fail on an attempt to read spectra.

Returns
number of Wasatch Photonics USB spectrometers found

Implemented in WasatchNET.Driver.

Property Documentation

◆ logger

Logger WasatchNET.IDriver.logger
get

Implemented in WasatchNET.Driver.

◆ version

string WasatchNET.IDriver.version
get

Implemented in WasatchNET.Driver.


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