Hyperion

Declared In:

Introduction

Class that encapsulates the behavior of the hyperion instrument.



Groups

Acquisition API

Group members:

disable_peak_streaming
disable_spectrum_streaming
enable_peak_streaming
enable_spectrum_streaming
get_available_laser_scan_speeds
get_laser_scan_speed
get_peak_streaming_status
get_peaks
get_power_calibration_info
get_raw_spectrum
get_scan_parameters
get_spectrum
get_spectrum_streaming_status
set_laser_scan_speed
set_peak_stream_divider
set_spectrum_stream_divider
stream_peaks
stream_spectrum

 

Utility Functions

Group members:

close_comm
connect_comm
get_comm
get_last_error

 

System API

Group members:

get_instrument_name
get_library_version
get_serial_number
get_version
set_instrument_name

 

Constructors

Group members:

Hyperion(hComm *)
Hyperion(std :: string, int, int)
~Hyperion

 

Net API

Group members:

get_active_network_settings
get_network_ip_mode
get_static_network_settings
set_network_ip_mode
set_static_network_settings

Member Functions

close_comm
connect_comm
disable_peak_streaming
disable_spectrum_streaming
enable_peak_streaming
enable_spectrum_streaming
get_active_network_settings
get_available_laser_scan_speeds
get_comm
get_instrument_name
get_laser_scan_speed
get_last_error
get_library_version
get_network_ip_mode
get_peak_streaming_status
get_peaks
get_power_calibration_info
get_raw_spectrum
get_scan_parameters
get_serial_number
get_spectrum
get_spectrum_streaming_status
get_static_network_settings
get_version
Hyperion(hComm *)
Hyperion(std :: string, int, int)
set_instrument_name
set_laser_scan_speed
set_network_ip_mode
set_peak_stream_divider
set_spectrum_stream_divider
set_static_network_settings
stream_peaks
stream_spectrum
~Hyperion

close_comm


public

void close_comm();
Discussion

Closes the comm and streamComm sockets if currently open.


connect_comm


public

void connect_comm();
Discussion

Re-connects the comm object if not already connected


disable_peak_streaming


public

void disable_peak_streaming();
Discussion

Disables streaming of peak data


disable_spectrum_streaming


public

void disable_spectrum_streaming();
Discussion

Disables streaming of spectrum data


enable_peak_streaming


public

void enable_peak_streaming( int streamingDivider, hComm *sComm = nullptr);
Parameters
streamingDivider

Output rate divider. Data will be output at the scan rate of the instrument divided by this.

sComm

hComm object to be used for streaming communication. If null, then the instrument IP address and default streaming port will be used.

Discussion

Enable streaming of peak data from the instrument.


enable_spectrum_streaming


public

void enable_spectrum_streaming( int streamingDivider, hComm *sComm = nullptr);
Parameters
streamingDivider

Output rate divider. Data will be output at the scan rate of the instrument divided by this.

sComm

hComm object to be used for streaming communication. If null, then the instrument IP address and default streaming port will be used.

Discussion

Enable streaming of spectrum data from the instrument.


get_active_network_settings


public

hNetworkSettings get_active_network_settings();
Return Value

Returns a hNetworkSettings structure that contains the returned network settings.

Discussion

Gets the current active network settings for the instrument


get_available_laser_scan_speeds


public

std::vector<int> get_available_laser_scan_speeds();
Return Value

returns A vector<int> containing all of the speeds that are supported on the instrument.

Discussion

Gets the valid laser scan speeds that can be set on this instrument.


get_comm


public

hComm* get_comm()
Discussion

Returns a pointer to the active hComm object.


get_instrument_name


public

std::string get_instrument_name();
Return Value

Returns a string that contains the instrument name..

Discussion

Gets the instrument name


get_laser_scan_speed


public

int get_laser_scan_speed();
Return Value

Returns the current laser scanning rate in Hz.

Discussion

Gets the current laser scanning speed.


get_last_error


public

int get_last_error( std::string &errorMessage);
Parameters
errorMessage

Upon successful completion, this contains the error message.

Discussion

Returns the error message associated with the most recent instrument or system error.


get_library_version


public

std::string get_library_version();
Return Value

Returns String containing the library version.

Discussion

Get the version of this API library


get_network_ip_mode


public

std::string get_network_ip_mode();
Return Value

Returns a string indicating the current network IP mode (STATIC or DHCP)

Discussion

Gets the current network mode, static or dynamic (DHCP)


get_peak_streaming_status


public

int get_peak_streaming_status( int &availableBufferPercentage);
Parameters
availableBufferPercentage

The current percent of space available in the output buffer. Use this to verify that data is being consumed fast enough to avoid buffer overflows.

Return Value

Returns 1 if the peak streaming is enabled on the instrument AND the peak streaming comm port is open on the client, and 0 otherwise.

Discussion

Gets the current status and available buffer for peak streaming


get_peaks


public

const hACQPeaks get_peaks();
Return Value

Returns a hACQPeaks structure that contains the peak data.

Discussion

Acquires a set of peaks from the Hyperion instrument


get_power_calibration_info


public

void get_power_calibration_info( std::vector<int> &offset, std::vector<int> &scale);
Parameters
offset

A vector<int> containing the calibration offsets for each channel

scale

A vector<int> containing the calibration scales for each channel.

Discussion

Gets the calibration offset and scale used for converting spectra to dBm power units. Converting spectral data is done by taking spectrumData/scale + offset.


get_raw_spectrum


public

const hACQSpectrum get_raw_spectrum( int channel);
Parameters
channel

The channel number to be acquired. If this is -1, all channels will be returned.

Return Value

Resturns an hACQSpectrum structure containing the spectrum data. Only the rawSpectrumData vector will contain data.

Discussion

Acquires a raw spectrum for the specified channel. If channel == -1, then this will get data for all channels.


get_scan_parameters


public

void get_scan_parameters( double &startWavelength, double &deltaWavelength, int &numWavelengths);
Parameters
startWavelength

The first wavelength in each scan, in units of nm.

deltaWavelength

The step size between neighboring wavelengths in the scan.

numWavelengths

The number of wavelengths in the scan.

Discussion

Get the parameters that define the wavelength scan range and number of points.


get_serial_number


public

std::string get_serial_number();
Return Value

Returns a string containing the serial number.

Discussion

Get the serial number of the Hyperion instrument


get_spectrum


public

const hACQSpectrum get_spectrum( int numChannelsToReturn = 0, int *channelsToReturn = nullptr);
Parameters
numChannelsToReturn

number of channels specified in the channelsToReturn array.

channelsToReturn

array of channels

Return Value

Returns an hACQSpectrum structure containing the spectrum data.

Discussion

Acquires a full spectrum data from the Hyperion instrument


get_spectrum_streaming_status


public

int get_spectrum_streaming_status( int &availableBufferPercentage);
Parameters
availableBufferPercentage

The current percent of space available in the output buffer. Use this to verify that data is being consumed fast enough to avoid buffer overflows.

Return Value

Returns 1 if the spectrum streaming is enabled on the instrument AND the spectrum streaming comm port is open on the client, and 0 otherwise.

Discussion

Gets the current status and available buffer for spectrum streaming


get_static_network_settings


public

hNetworkSettings get_static_network_settings();
Return Value

Returns a hNetworkSettings structure that contains the returned network settings.

Discussion

Gets the current static network settings.


get_version


public

void get_version( std::string &fwVersion, std::string &fPGAVersion, std::string &hLibraryVersion);
Parameters
fwVersion

Contains the value of the firmware version.

fPGAVersion

Contains the value of the FPGA version.

hLibraryVersion

Contains the value of this API library version

Discussion

Returns the firmware, fpga, and libray versions


Hyperion(hComm *)


public

Hyperion( hComm *comm);
Discussion

Constructor that takes a pointer to an hComm object (or descendant)


Hyperion(std :: string, int, int)


public

Hyperion( std::string ipAddress, int port = H_CMD_PORT, int timeout = H_DEFAULT_TIMEOUT);
Parameters
ipAddress

The TCP/IPv4 address of the instrument in #.#.#.# format.

port

The TCP port to connect to.

timeout

The default timeout for all TCP communication.

Discussion

Constructor that takes TCP parameters.


set_instrument_name


public

void set_instrument_name( std::string instrumentName);
Parameters
instrumentName

A string containing the instrument name.

Discussion

Set the instrument name.


set_laser_scan_speed


public

void set_laser_scan_speed( int scanSpeed);
Parameters
scanSpeed

The laser scan speed, in Hz.

Discussion

Sets the laser scan speed.


set_network_ip_mode


public

void set_network_ip_mode( hNetworkIPMode ipMode);
Parameters
ipMode

The network IPMode. Can be STATIC or DHCP.

Discussion

sets the network IP mode (static or DHCP). Note that if this is different than the current settings, then the hComm object will no longer be able to establish a connection and should be closed and re-initiated.


set_peak_stream_divider


public

void set_peak_stream_divider( int peakStreamingDivider);
Parameters
peakStreamingDivider

Value to be applied.

Discussion

Sets the value of the peak streaming divider, which determines the rate at which streaming peak data is returned. if peakStreamingDivider = 5, then every 5th sample is streamed out on the peak streaming port.


set_spectrum_stream_divider


public

void set_spectrum_stream_divider( int spectrumStreamingDivider);
Parameters
spectrumStreamingDivider

Value to be applied.

Discussion

Sets the value of the spectrum streaming divider, which determines the rate at which streaming spectrum data is returned. if peakStreamingDivider = 5, then every 5th spectrum is streamed out on the spectrum streaming port.


set_static_network_settings


public

void set_static_network_settings( std::string ipAddress, std::string netMask, std::string gateway );
Parameters
ipAddress

the TCP/IPv4 address of the instrument in #.#.#.# format.

netMask

The network mask of the instrument in #.#.#.# format.

gateway

The network gateway for the instrument in #.#.#.# format

Discussion

sets the static network settings. Note that if the current IP mode is static, then changing these parameters will result in not being able to communicate with the instrument and the hComm object should be closed and re-initiated.


stream_peaks


public

const hACQPeaks stream_peaks();
Return Value

Returns an hACQPeaks structure.

Discussion

Acquires a set of streamed peaks from the Hyperion instrument.


stream_spectrum


public

const hACQSpectrum stream_spectrum();
Return Value

Resturns an hACQSpectrum structure containing the spectrum data. Only the rawSpectrumData vector will contain data.

Discussion

Acquires streamed spectrum data from the Hyperion instrument, and stores it in the spectrum instance variable.


~Hyperion


public

~Hyperion();
Discussion

Destructor for Hyperion object