OceanDirectPython  3.1.1
OceanDirect Python API
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced Class Reference

Subclass containing advanced features that may or may not be in the spectrometer. More...

Public Member Functions

def __init__ (self, 'Spectrometer' device)
 
None set_enable_lamp (self, bool enable)
 Enable or disable the lamp. More...
 
bool get_enable_lamp (self)
 Return the lamp state. More...
 
None set_shutter_open (self, bool shutterState)
 This function will open or close the shutter on the spectrometer. More...
 
None get_shutter_state (self)
 This function returns the shutter state of the spectrometer. More...
 
list[float] get_wavelength_coeffs (self)
 Read the wavelength coefficients from the device. More...
 
list[float] get_nonlinearity_coeffs (self)
 Read the nonlinearity coefficients stored in the device. More...
 
int get_nonlinearity_coeffs_count1 (self)
 Read the nonlinearity coefficients count from the device. More...
 
float get_nonlinearity_coeffs1 (self, int index)
 Read the nonlinearity coefficients count of a given position from the device. More...
 
float get_tec_temperature_degrees_C (self)
 Returns the temperature reading (celsius) of a detector thermistor. More...
 
None set_temperature_setpoint_degrees_C (self, float temp_C)
 Apply the setpoint temperature (Celsius) in the thermo-electric cooler. More...
 
None set_tec_enable (self, bool coolerEnable)
 Enable or disable the thermo-electric cooler attached to the detector. More...
 
bool get_tec_enable (self)
 Read the state of the thermo-electric cooler whether it's enable or disable. More...
 
float get_temperature_setpoint_degrees_C (self)
 Read the set point temperature of the thermo-electric cooler. More...
 
bool get_tec_stable (self)
 Returns the state of thermo-electric cooler temperature on whether it reached the stable temperature or not. More...
 
bool get_tec_fan_enable (self)
 Returns the thermo-electric cooler fan state whether it's enabled or not. More...
 
int get_light_source_count (self)
 Gets the number of light sources that are represented by the given featureID. More...
 
bool has_light_source_enable (self, int light_source_index)
 Queries whether the indicated light source within the given feature instance has a usable enable/disable control. More...
 
bool is_light_source_enabled (self, int light_source_index)
 Queries whether the indicated light source within the given feature instance is enabled (energized). More...
 
None enable_light_source (self, int light_source_index, bool enable)
 Attempts to enable or disable the indicated light source within the given feature instance. More...
 
None set_single_strobe_enable (self, bool enable)
 Set the enable status of the single strobe signal. More...
 
None set_single_strobe_delay (self, int delayMicrosecond)
 Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
None set_single_strobe_width (self, int widthMicrosecond)
 Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
bool get_single_strobe_enable (self)
 Get the enable status of the single strobe signal. More...
 
int get_single_strobe_delay (self)
 Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
int get_single_strobe_width (self)
 Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
int get_light_source_count (self)
 Gets the number of light sources that are represented by the given featureID. More...
 
bool has_light_source_enable (self, int light_source_index)
 Queries whether the indicated light source within the given feature instance has a usable enable/disable control. More...
 
bool is_light_source_enabled (self, int light_source_index)
 Queries whether the indicated light source within the given feature instance is enabled (energized). More...
 
None enable_light_source (self, int light_source_index, bool enable)
 Attempts to enable or disable the indicated light source within the given feature instance. More...
 
None set_single_strobe_enable (self, bool enable)
 Set the enable status of the single strobe signal. More...
 
None set_single_strobe_delay (self, int delayMicrosecond)
 Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
None set_single_strobe_width (self, int widthMicrosecond)
 Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
bool get_single_strobe_enable (self)
 Get the enable status of the single strobe signal. More...
 
int get_single_strobe_delay (self)
 Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
int get_single_strobe_width (self)
 Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
int get_single_strobe_delay_minimum (self)
 Get the minimum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
int get_single_strobe_delay_maximum (self)
 Get the maximum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
int get_single_strobe_delay_increment (self)
 Gets the single strobe delay increment in microseconds. More...
 
int get_single_strobe_width_minimum (self)
 Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
int get_single_strobe_width_maximum (self)
 Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
int get_single_strobe_width_increment (self)
 Get the single strobe width increment. More...
 
int get_single_strobe_cycle_maximum (self)
 Gets the single strobe cycle maximum in microseconds. More...
 
None set_continuous_strobe_period (self, int period)
 Sets the continuous strobe period in microseconds. More...
 
None set_continuous_strobe_enable (self, bool enable)
 Sets the continuous strobe enable state on the device. More...
 
int get_continuous_strobe_period (self)
 Get the continuous strobe period in microseconds. More...
 
bool get_continuous_strobe_enable (self)
 Gets the continuous strobe state (enabled or disabled) of the device. More...
 
int get_continuous_strobe_period_minimum (self)
 Gets the minimum continuous strobe period of the device in microseconds. More...
 
int get_continuous_strobe_period_maximum (self)
 Gets the maximum continuous strobe period of the device in microseconds. More...
 
int get_continuous_strobe_period_increment (self)
 This function gets the current size of the strobe period increment of the device in microseconds. More...
 
int get_continuous_strobe_width (self)
 Gets the strobe width of the device in microseconds. More...
 
None set_continuous_strobe_width (self, int widthMicrosecond)
 Sets the continuous strobe width on the device. More...
 
None clear_data_buffer (self)
 Clear the data buffer. More...
 
int get_data_buffer_number_of_elements (self)
 Get the number of data elements currently in the buffer. More...
 
int get_data_buffer_capacity (self)
 Get the present limit of how many data elements will be retained by the buffer. More...
 
int get_data_buffer_capacity_maximum (self)
 Get the maximum possible configurable size for the data buffer. More...
 
int get_data_buffer_capacity_minimum (self)
 Get the minimum possible configurable size for the data buffer. More...
 
None set_data_buffer_capacity (self, int capacity)
 Set the number of data elements that the buffer should retain. More...
 
None set_data_buffer_enable (self, bool enable)
 Enable or disable data buffering. More...
 
bool get_data_buffer_enable (self)
 Reads the device data buffering enable state. More...
 
None abort_acquisition (self)
 Abort spectra acquisition and put the device into an idle state. More...
 
None acquire_spectra_to_buffer (self)
 Start spectra acquisition. More...
 
bool get_device_idle_state (self)
 Return device idle state. More...
 
int get_number_of_backtoback_scans (self)
 Get the number of back-to-back scans. More...
 
None set_number_of_backtoback_scans (self, int numScans)
 Set the number of spectra that the device will capture per trigger event. More...
 
int get_raw_spectrum_with_metadata (self, list[list[float]] list_raw_spectra, list[int] list_timestamp, int buffer_size)
 Returns spectra with metadata information. More...
 
int get_usb_endpoint_primary_out (self)
 This function returns the usb primary OUT endpoint for the type specified. More...
 
int get_usb_endpoint_primary_in (self)
 This function returns the usb primary IN endpoint for the type specified. More...
 
int get_usb_endpoint_secondary_out (self)
 This function returns the usb secondary OUT endpoint for the type specified. More...
 
int get_usb_endpoint_secondary_in (self)
 This function returns the usb secondary IN endpoint for the type specified. More...
 
str get_revision_firmware (self)
 Reads out the firmware revision from the device's internal memory if that feature is supported. More...
 
str get_revision_fpga (self)
 Reads out the FPGA revision from the device's internal memory if that feature is supported. More...
 
str get_revision_system (self)
 Reads out the System revision from the device's internal memory if that feature is supported. More...
 
bool ipv4_is_dhcp_enabled (self, int ifNum)
 Check to see if DHCP (client) is enabled on the specified interface. More...
 
bool ipv4_is_dhcp_enabled2 (self)
 
None ipv4_set_dhcp_enable (self, int ifNum, bool enabled)
 Turn the DHCP client on or off for the device on the specified interface. More...
 
None ipv4_set_dhcp_enable2 (self, bool enabled)
 
int ipv4_get_number_of_ip_addresses (self, int ifNum)
 Get the number of IP addresses available on the specified interface. More...
 
int ipv4_get_number_of_ip_addresses2 (self)
 
tuple[list[int], int] ipv4_read_ip_address (self, int ifNum, int addressIndex)
 Get the assigned ip address provided by the index of a particular interface. More...
 
tuple[list[int], int] ipv4_read_ip_address2 (self, int addressIndex)
 
None ipv4_add_static_ip_address (self, int ifNum, list[int] ipAddress, int netmask)
 Add a static IP address to the specified interface. More...
 
None ipv4_add_static_ip_address2 (self, list[int] ipAddress, int netmask)
 
None ipv4_delete_static_ip_address (self, int ifNum, int addressIndex)
 Delete a static IP address on the specified interface. More...
 
None ipv4_delete_static_ip_address2 (self, int addressIndex)
 
None ipv4_set_default_gateway_ip_address (self, int ifNum, list[int] ipAddress)
 Set the default gateway IP address to the specified interface. More...
 
None ipv4_set_default_gateway_ip_address2 (self, list[int] ipAddress)
 
list[int] ipv4_get_default_gateway_ip_address (self, int ifNum)
 Get the default gateway IP address to the specified interface. More...
 
list[int] ipv4_get_default_gateway_ip_address2 (self)
 
int get_gpio_pin_count (self)
 Get GPIO pin count. More...
 
None gpio_set_output_enable1 (self, int bit, bool isOutput)
 Sets the GPIO bit direction to either output or input. More...
 
bool gpio_get_output_enable1 (self, int bit)
 Get GPIO bit direction. More...
 
None gpio_set_output_enable2 (self, int bitmask)
 Set the direction (input/output) of the GPIO pins. More...
 
int gpio_get_output_enable2 (self)
 Get all GPIO bit direction. More...
 
None gpio_set_value1 (self, int bit, bool isHigh)
 Sets the GPIO bit value to either high or low. More...
 
bool gpio_get_value1 (self, int bit)
 Get the GPIO bit value in whether it's high(true) or low(false). More...
 
None gpio_set_value2 (self, int bitmask)
 Set the logic value for all GPIO pins. More...
 
int gpio_get_value2 (self)
 Get all GPIO bit values. More...
 
None gpio_set_output_alternate1 (self, int bit, bool isAlternate)
 Set the alternate functionality for the specified pins (bits). More...
 
None gpio_set_output_alternate2 (self, int bitmask)
 Set the alternate functionality for the specified pins (bits). More...
 
bool gpio_get_output_alternate1 (self, int bit)
 Get the setting for alternate functionality on the specified bit (pin). More...
 
int gpio_get_output_alternate2 (self)
 Get the settings for alternate functionality on the GPIO pins. More...
 
None set_led_enable (self, bool isEnabled)
 Enable or disable device LED. More...
 
bool get_led_enable (self)
 Get device LED state. More...
 
int get_device_original_vid (self)
 Get the original vendor id (VID) of the device. More...
 
int get_device_original_pid (self)
 Get the original product id (PID) of the device. More...
 
int get_device_vid (self)
 Get the current vendor id (VID) of the device. More...
 
int get_device_pid (self)
 Get the current product id (PID) of the device. More...
 
str get_device_original_manufacturer_string (self)
 Get the original manufacturer string of the device. More...
 
str get_device_original_model_string (self)
 Get the original model string of the device. More...
 
str get_device_manufacturer_string (self)
 Get the current manufacturer string of the device. More...
 
str get_device_model_string (self)
 Get the current model string of the device. More...
 
None set_device_manufacturer_string (self, str manufacturer)
 Set the current manufacturer string of the device. More...
 
None set_device_model_string (self, str model)
 Set the current model string of the device. More...
 
str get_device_alias (self)
 Read the device alias from the device. More...
 
None set_device_alias (self, str deviceAlias)
 Set a new device alias to the device. More...
 
None reset_device (self)
 Restarts the device. More...
 
str get_user_string (self)
 Read the user string from the device. More...
 
None set_user_string (self, str userString)
 Set a new user string to the device. More...
 
int get_user_string_count1 (self)
 Read the total user string count from the device. More...
 
str get_user_string1 (self, int index)
 Read the user string from the device. More...
 
None set_user_string1 (self, int index, str userString)
 Write the user string to the device. More...
 
int get_autonull_maximum_adc_count (self)
 Read the maximum ADC counts. More...
 
int get_autonull_baseline_level (self)
 Read the baseline level. More...
 
int get_autonull_saturation_level (self)
 Read the saturation level. More...
 
int get_autonull_fpga_digital_gain (self)
 Read the fpga digital gain value. More...
 
int get_autonull_fpga_digital_offset (self)
 Read the fpga digital gain offset. More...
 
int get_baud_rate (self)
 Read the device RS-232 baud rate. More...
 
None set_baud_rate (self, int baudRate)
 Set a new baud rate for the RS-232 port. More...
 
None save_settings_to_flash (self)
 Save settings to flash. More...
 
list[int] get_active_pixel_range (self)
 Read the active pixel range from the sensor pixel array. More...
 
list[int] get_optical_dark_pixel_range (self)
 Read the optical dark pixel range from the sensor pixel array. More...
 
list[int] get_transition_pixel_range (self)
 Read the transition pixel range from the sensor pixel array. More...
 
list[int] get_bad_pixel_indices (self)
 Read bad pixel indices from the sensor pixel array. More...
 
int get_network_interface_count (self)
 Read the number of supported communication interface. More...
 
int get_network_interface_type (self, int interfaceIndex)
 Return the interface type of the given interface index. More...
 
int get_network_interface_type2 (self)
 
bool get_network_interface_status (self, int interfaceIndex)
 Return true if the interface is enabled otherwise it's false. More...
 
bool get_network_interface_status2 (self)
 
None set_network_interface_status (self, int interfaceIndex, bool enable)
 Enable or disable the interface. More...
 
None set_network_interface_status2 (self, bool enable)
 
None save_network_interface_setting (self, int interfaceIndex)
 Save the network interface settings to the device. More...
 
None save_network_interface_setting2 (self)
 
bool get_ethernet_gigabit_enable_status (self, int interfaceIndex)
 Return the status on whether the gigabit ethernet is enabled or not. More...
 
bool get_ethernet_gigabit_enable_status2 (self)
 
None set_ethernet_gigabit_enable_status (self, int interfaceIndex, bool enable)
 Enable or disable the gigabit ethernet the status. More...
 
None set_ethernet_gigabit_enable_status2 (self, bool enable)
 
int get_network_interface_count (self)
 Read the number of supported communication interface. More...
 
int get_network_interface_type (self, int interfaceIndex)
 Return the interface type of the given interface index. More...
 
int get_network_interface_type2 (self)
 
bool get_network_interface_status (self, int interfaceIndex)
 Return true if the interface is enabled otherwise it's false. More...
 
bool get_network_interface_status2 (self)
 
None set_network_interface_status (self, int interfaceIndex, bool enable)
 Enable or disable the interface. More...
 
None set_network_interface_status2 (self, bool enable)
 
None save_network_interface_setting (self, int interfaceIndex)
 Save the network interface settings to the device. More...
 
None save_network_interface_setting2 (self)
 
bool get_ethernet_gigabit_enable_status (self, int interfaceIndex)
 Return the status on whether the gigabit ethernet is enabled or not. More...
 
bool get_ethernet_gigabit_enable_status2 (self)
 
None set_ethernet_gigabit_enable_status (self, int interfaceIndex, bool enable)
 Enable or disable the gigabit ethernet the status. More...
 
None set_ethernet_gigabit_enable_status2 (self, bool enable)
 
bool get_multicast_group_enabled (self, int interfaceIndex)
 Return true if the multicast group message is enabled otherwise it's false. More...
 
bool get_multicast_group_enabled2 (self)
 
None set_multicast_group_enabled (self, int interfaceIndex, bool enable)
 Enable or disable the multicast message group. More...
 
None set_multicast_group_enabled2 (self, bool enable)
 
list[int] get_ethernet_mac_address (self, int interfaceIndex)
 Read the ethernet 6-byte mac address from the spectrometer. More...
 
list[int] get_ethernet_mac_address2 (self)
 
None set_ethernet_mac_address (self, int interfaceIndex, list[int] macAddress)
 Writes a new ethernet 6-byte mac address into the spectrometer. More...
 
None set_ethernet_mac_address2 (self, list[int] macAddress)
 
bool get_ip_address_assigned_mode (self)
 Read the IP address mode from the OBP2 device. More...
 
None set_ip_address_assigned_mode (self, bool useDHCP)
 Set the IP address mode to the OBP2 device. More...
 
tuple[bool, list[int], list[int], list[int], list[int]] get_network_configuration (self)
 Read the network configuration parameters from an OBP2 enabled device. More...
 
None set_manual_network_configuration (self, list[int] ipv4Address, list[int] subnetMask, list[int] defaultGateway, list[int] dnsServer)
 Write the network configuration parameters (static ip address) on OBP2 enabled device. More...
 
tuple[list[int], list[int], list[int], list[int]] get_manual_network_configuration (self)
 Read the network configuration parameters (static ip address) from an OBP2 enabled device. More...
 

Public Attributes

 device
 

Static Public Attributes

 lamp_on = c_ubyte(1)
 
 lamp_off = c_ubyte(0)
 
int num_nonlinearity_coeffs = 8
 

Detailed Description

Subclass containing advanced features that may or may not be in the spectrometer.

The spectrometer specification guide (manual) should be consulted prior to using any of these features.

Definition at line 1364 of file OceanDirectAPI.py.

Constructor & Destructor Documentation

◆ __init__()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.__init__ (   self,
'Spectrometer device 
)

Definition at line 1373 of file OceanDirectAPI.py.

Member Function Documentation

◆ abort_acquisition()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.abort_acquisition (   self)

Abort spectra acquisition and put the device into an idle state.

To resume spectra acquisition, you have to call acquire_spectra_to_buffer() first before calling the get spectra command. Very few devices supported this command.

See also
acquire_spectra_to_buffer()
get_device_idle_state()

Definition at line 2274 of file OceanDirectAPI.py.

◆ acquire_spectra_to_buffer()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.acquire_spectra_to_buffer (   self)

Start spectra acquisition.

This would transition the device into a non-idle state. Very few devices supported this command. An exception will be thrown if the command is not supported by the device.

See also
abort_acquisition()
get_device_idle_state()

Definition at line 2289 of file OceanDirectAPI.py.

◆ clear_data_buffer()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.clear_data_buffer (   self)

Clear the data buffer.

An exception will be thrown if the command is not supported by the device.

Definition at line 2159 of file OceanDirectAPI.py.

◆ enable_light_source() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.enable_light_source (   self,
int  light_source_index,
bool  enable 
)

Attempts to enable or disable the indicated light source within the given feature instance.

Not all light sources have an enable/disable control, and this capability can be queried with has_light_source_enable(). Note that an enabled light source should emit light according to its last (or default) intensity setting which might be the minimum; in this case, the light source might appear to remain off.

Parameters
light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
enableWhether to enable the light source. A value of False will attempt to disable the light source, and any other value will enable it.

Definition at line 1650 of file OceanDirectAPI.py.

◆ enable_light_source() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.enable_light_source (   self,
int  light_source_index,
bool  enable 
)

Attempts to enable or disable the indicated light source within the given feature instance.

Not all light sources have an enable/disable control, and this capability can be queried with has_light_source_enable(). Note that an enabled light source should emit light according to its last (or default) intensity setting which might be the minimum; in this case, the light source might appear to remain off.

Parameters
light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
enableWhether to enable the light source. A value of False will attempt to disable the light source, and any other value will enable it.

Definition at line 1818 of file OceanDirectAPI.py.

◆ get_active_pixel_range()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_active_pixel_range (   self)

Read the active pixel range from the sensor pixel array.

This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.

Returns
A list of active pixel range.

Definition at line 3320 of file OceanDirectAPI.py.

◆ get_autonull_baseline_level()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_baseline_level (   self)

Read the baseline level.

Returns
The baseline level.

Definition at line 3226 of file OceanDirectAPI.py.

◆ get_autonull_fpga_digital_gain()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_fpga_digital_gain (   self)

Read the fpga digital gain value.

Returns
The digital gain value.

Definition at line 3252 of file OceanDirectAPI.py.

◆ get_autonull_fpga_digital_offset()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_fpga_digital_offset (   self)

Read the fpga digital gain offset.

Returns
The digital offset value.

Definition at line 3267 of file OceanDirectAPI.py.

◆ get_autonull_maximum_adc_count()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_maximum_adc_count (   self)

Read the maximum ADC counts.

Returns
The ADC counts.

Definition at line 3212 of file OceanDirectAPI.py.

◆ get_autonull_saturation_level()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_saturation_level (   self)

Read the saturation level.

Most devices returns 65535.

Returns
The saturation level.

Definition at line 3239 of file OceanDirectAPI.py.

◆ get_bad_pixel_indices()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_bad_pixel_indices (   self)

Read bad pixel indices from the sensor pixel array.

This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.

Returns
A list of bad pixel indices.

Definition at line 3365 of file OceanDirectAPI.py.

◆ get_baud_rate()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_baud_rate (   self)

Read the device RS-232 baud rate.

Not all devices supported this command.

See also
set_baud_rate()
Returns
The baud rate.

Definition at line 3282 of file OceanDirectAPI.py.

◆ get_continuous_strobe_enable()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_enable (   self)

Gets the continuous strobe state (enabled or disabled) of the device.

See also
set_continuous_strobe_enable()
Returns
True if continuous strobe is enabled otherwise it's False.

Definition at line 2076 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period (   self)

Get the continuous strobe period in microseconds.

See also
set_continuous_strobe_period()
Returns
the period in microseconds.

Definition at line 2062 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period_increment()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period_increment (   self)

This function gets the current size of the strobe period increment of the device in microseconds.

The increment is dependent on the strobe period. Small strobe periods i.e. less than about 1ms will have a small increment, typically 1 microsecond. Larger strobe periods will have larger increments, typically 1ms.

Returns
The current strobe period increment in microseconds.

Definition at line 2116 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period_maximum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period_maximum (   self)

Gets the maximum continuous strobe period of the device in microseconds.

Returns
The maximum strobe period in microseconds.

Definition at line 2103 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period_minimum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period_minimum (   self)

Gets the minimum continuous strobe period of the device in microseconds.

Returns
The minimum strobe period in microseconds.

Definition at line 2090 of file OceanDirectAPI.py.

◆ get_continuous_strobe_width()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_width (   self)

Gets the strobe width of the device in microseconds.

See also
set_continuous_strobe_width()
Returns
The current strobe width in microseconds.

Definition at line 2132 of file OceanDirectAPI.py.

◆ get_data_buffer_capacity()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_capacity (   self)

Get the present limit of how many data elements will be retained by the buffer.

This value can be changed with set_data_buffer_capacity(). An exception will be thrown if the command is not supported by the device.

See also
set_data_buffer_capacity()
Returns
A count of how many items the buffer will store before data may be lost.

Definition at line 2184 of file OceanDirectAPI.py.

◆ get_data_buffer_capacity_maximum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_capacity_maximum (   self)

Get the maximum possible configurable size for the data buffer.

An exception will be thrown if the command is not supported by the device.

Returns
The largest value that may be set with set_data_buffer_capacity().

Definition at line 2199 of file OceanDirectAPI.py.

◆ get_data_buffer_capacity_minimum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_capacity_minimum (   self)

Get the minimum possible configurable size for the data buffer.

An exception will be thrown if the command is not supported by the device.

Returns
The smallest value that may be set with set_data_buffer_capacity().

Definition at line 2213 of file OceanDirectAPI.py.

◆ get_data_buffer_enable()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_enable (   self)

Reads the device data buffering enable state.

An exception will be thrown if the command is not supported by the device.

See also
set_data_buffer_enable()
Returns
True if data buffering is enabled otherwise it's False.

Definition at line 2260 of file OceanDirectAPI.py.

◆ get_data_buffer_number_of_elements()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_number_of_elements (   self)

Get the number of data elements currently in the buffer.

An exception will be thrown if the command is not supported by the device.

Returns
A count of how many items are available for retrieval from the buffer.

Definition at line 2170 of file OceanDirectAPI.py.

◆ get_device_alias()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_alias (   self)

Read the device alias from the device.

If this field in the device is not yet populated then a non-zero(6) code will be returned.

See also
set_device_alias()
Returns
The device alias.

Definition at line 3081 of file OceanDirectAPI.py.

◆ get_device_idle_state()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_idle_state (   self)

Return device idle state.

Very few devices supported this command. An exception will be thrown if the command is not supported by the device.

See also
abort_acquisition()
Returns
True if the device is idle otherwise it's False.

Definition at line 2304 of file OceanDirectAPI.py.

◆ get_device_manufacturer_string()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_manufacturer_string (   self)

Get the current manufacturer string of the device.

See also
set_device_manufacturer_string()
Returns
The manufacturer string.

Definition at line 2983 of file OceanDirectAPI.py.

◆ get_device_model_string()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_model_string (   self)

Get the current model string of the device.

See also
set_device_model_string()
Returns
The model string.

Definition at line 2998 of file OceanDirectAPI.py.

◆ get_device_original_manufacturer_string()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_manufacturer_string (   self)

Get the original manufacturer string of the device.

Returns
The manufacturer string.

Definition at line 2955 of file OceanDirectAPI.py.

◆ get_device_original_model_string()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_model_string (   self)

Get the original model string of the device.

Returns
The model string.

Definition at line 2969 of file OceanDirectAPI.py.

◆ get_device_original_pid()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_pid (   self)

Get the original product id (PID) of the device.

Returns
The PID.

Definition at line 2916 of file OceanDirectAPI.py.

◆ get_device_original_vid()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_vid (   self)

Get the original vendor id (VID) of the device.

Returns
The VID.

Definition at line 2903 of file OceanDirectAPI.py.

◆ get_device_pid()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_pid (   self)

Get the current product id (PID) of the device.

Returns
The PID.

Definition at line 2942 of file OceanDirectAPI.py.

◆ get_device_vid()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_vid (   self)

Get the current vendor id (VID) of the device.

Returns
The VID.

Definition at line 2929 of file OceanDirectAPI.py.

◆ get_enable_lamp()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_enable_lamp (   self)

Return the lamp state.

See also
set_enable_lamp()
Returns
True if lamp is ON otherwise False.

Definition at line 1394 of file OceanDirectAPI.py.

◆ get_ethernet_gigabit_enable_status() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ethernet_gigabit_enable_status (   self,
int  interfaceIndex 
)

Return the status on whether the gigabit ethernet is enabled or not.

See also
set_ethernet_gigabit_enable_status()
Parameters
interfaceIndexThe ethernet interface to look at.
Returns
The interface status.

Definition at line 3464 of file OceanDirectAPI.py.

◆ get_ethernet_gigabit_enable_status() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ethernet_gigabit_enable_status (   self,
int  interfaceIndex 
)

Return the status on whether the gigabit ethernet is enabled or not.

See also
set_ethernet_gigabit_enable_status()
Parameters
interfaceIndexThe ethernet interface to look at.
Returns
The interface status.

Definition at line 3586 of file OceanDirectAPI.py.

◆ get_ethernet_gigabit_enable_status2() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ethernet_gigabit_enable_status2 (   self)

Definition at line 3479 of file OceanDirectAPI.py.

◆ get_ethernet_gigabit_enable_status2() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ethernet_gigabit_enable_status2 (   self)

Definition at line 3601 of file OceanDirectAPI.py.

◆ get_ethernet_mac_address()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ethernet_mac_address (   self,
int  interfaceIndex 
)

Read the ethernet 6-byte mac address from the spectrometer.

See also
set_ethernet_mac_address()
Parameters
interfaceIndexThe ethernet interface to look at.
Returns
The mac address.

Definition at line 3664 of file OceanDirectAPI.py.

◆ get_ethernet_mac_address2()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ethernet_mac_address2 (   self)

Definition at line 3686 of file OceanDirectAPI.py.

◆ get_gpio_pin_count()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_gpio_pin_count (   self)

Get GPIO pin count.

Returns
The pin count.

Definition at line 2687 of file OceanDirectAPI.py.

◆ get_ip_address_assigned_mode()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_ip_address_assigned_mode (   self)

Read the IP address mode from the OBP2 device.

See also
get_ip_address_assigned_mode()
Returns
True if the ip address was generated via DHCP. False if the ip address was statically assigned.

Definition at line 3716 of file OceanDirectAPI.py.

◆ get_led_enable()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_led_enable (   self)

Get device LED state.

If the device don't have an LED then an exception will be thrown.

See also
set_led_enable()
Returns
True if LED is enabled otherwise it's False.

Definition at line 2889 of file OceanDirectAPI.py.

◆ get_light_source_count() [1/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_light_source_count (   self)

Gets the number of light sources that are represented by the given featureID.

Such light sources could be individual LEDs, light bulbs, lasers, etc. Each of these light sources may have different capabilities, such as programmable intensities and enables, which should be queried before they are used.

Returns
The number of light sources (e.g. bulbs) in the indicated feature

Definition at line 1601 of file OceanDirectAPI.py.

◆ get_light_source_count() [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_light_source_count (   self)

Gets the number of light sources that are represented by the given featureID.

Such light sources could be individual LEDs, light bulbs, lasers, etc. Each of these light sources may have different capabilities, such as programmable intensities and enables, which should be queried before they are used.

Returns
The number of light sources (e.g. bulbs) in the indicated feature

Definition at line 1768 of file OceanDirectAPI.py.

◆ get_manual_network_configuration()

tuple[list[int], list[int], list[int], list[int]] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_manual_network_configuration (   self)

Read the network configuration parameters (static ip address) from an OBP2 enabled device.

This function will return a tuple of 4 objects in this order: list[int] - the static IP address. list[int] - the subnet mask. list[int] - the default gateway IP address. list[int] - the DNS server IP address.

See also
set_manual_network_configuration()
Returns
A tuple of 4 object objects.

Definition at line 3836 of file OceanDirectAPI.py.

◆ get_multicast_group_enabled()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_multicast_group_enabled (   self,
int  interfaceIndex 
)

Return true if the multicast group message is enabled otherwise it's false.

See also
set_multicast_group_enabled()
Parameters
interfaceIndexThe ethernet interface to look at.
Returns
The multicast group enable status.

Definition at line 3625 of file OceanDirectAPI.py.

◆ get_multicast_group_enabled2()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_multicast_group_enabled2 (   self)

Definition at line 3640 of file OceanDirectAPI.py.

◆ get_network_configuration()

tuple[bool, list[int], list[int], list[int], list[int]] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_configuration (   self)

Read the network configuration parameters from an OBP2 enabled device.

This function will return a tuple of 6 objects in this order: address mode - True if it's using a DHCP IP address otherwise its False. list[int] - the static IP address. list[int] - the subnet mask. list[int] - the default gateway IP address. list[int] - the DNS server IP address.

See also
set_manual_network_configuration()
Returns
A tuple of 5 object objects.

Definition at line 3749 of file OceanDirectAPI.py.

◆ get_network_interface_count() [1/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_count (   self)

Read the number of supported communication interface.

Returns
The number of interface.

Definition at line 3380 of file OceanDirectAPI.py.

◆ get_network_interface_count() [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_count (   self)

Read the number of supported communication interface.

Returns
The number of interface.

Definition at line 3502 of file OceanDirectAPI.py.

◆ get_network_interface_status() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_status (   self,
int  interfaceIndex 
)

Return true if the interface is enabled otherwise it's false.

See also
set_network_interface_status()
Parameters
interfaceIndexThe interface to look at.
Returns
True if the interface if enabled otherwise it's False.

Definition at line 3410 of file OceanDirectAPI.py.

◆ get_network_interface_status() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_status (   self,
int  interfaceIndex 
)

Return true if the interface is enabled otherwise it's false.

See also
set_network_interface_status()
Parameters
interfaceIndexThe interface to look at.
Returns
True if the interface if enabled otherwise it's False.

Definition at line 3532 of file OceanDirectAPI.py.

◆ get_network_interface_status2() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_status2 (   self)

Definition at line 3425 of file OceanDirectAPI.py.

◆ get_network_interface_status2() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_status2 (   self)

Definition at line 3547 of file OceanDirectAPI.py.

◆ get_network_interface_type() [1/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_type (   self,
int  interfaceIndex 
)

Return the interface type of the given interface index.

Parameters
interfaceIndexThe interface to look at.
Returns
The interface type which could be one 0(Loopback), 1(wired ethernet), 2 (WIFI), and 3 (USB - CDC Ethernet).

Definition at line 3393 of file OceanDirectAPI.py.

◆ get_network_interface_type() [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_type (   self,
int  interfaceIndex 
)

Return the interface type of the given interface index.

Parameters
interfaceIndexThe interface to look at.
Returns
The interface type which could be one 0(Loopback), 1(wired ethernet), 2 (WIFI), and 3 (USB - CDC Ethernet).

Definition at line 3515 of file OceanDirectAPI.py.

◆ get_network_interface_type2() [1/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_type2 (   self)

Definition at line 3407 of file OceanDirectAPI.py.

◆ get_network_interface_type2() [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_network_interface_type2 (   self)

Definition at line 3529 of file OceanDirectAPI.py.

◆ get_nonlinearity_coeffs()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_nonlinearity_coeffs (   self)

Read the nonlinearity coefficients stored in the device.

This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.

Returns
A list of nonlinearity coefficients.

Definition at line 1449 of file OceanDirectAPI.py.

◆ get_nonlinearity_coeffs1()

float Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_nonlinearity_coeffs1 (   self,
int  index 
)

Read the nonlinearity coefficients count of a given position from the device.

This command is being used in legacy devices. If the device don't support this command then a non-zero error code will be returned. Use the function "get_nonlinearity_coeffs_count1()" to get the correct range of the index value.

Parameters
indexA zero based value referring to the coefficient position.
Returns
The nonlinearity coefficients.

Definition at line 1479 of file OceanDirectAPI.py.

◆ get_nonlinearity_coeffs_count1()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_nonlinearity_coeffs_count1 (   self)

Read the nonlinearity coefficients count from the device.

This command is being used in legacy devices. If the device don't support this command then a non-zero error code will be returned.

Returns
The nonlinearity coefficients count.

Definition at line 1465 of file OceanDirectAPI.py.

◆ get_number_of_backtoback_scans()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_number_of_backtoback_scans (   self)

Get the number of back-to-back scans.

See device manual if data buffering is supported.

See also
set_number_of_backtoback_scans()
Returns
The back-to-back scan value.

Definition at line 2319 of file OceanDirectAPI.py.

◆ get_optical_dark_pixel_range()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_dark_pixel_range (   self)

Read the optical dark pixel range from the sensor pixel array.

This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.

Returns
A list of optical dark pixel range.

Definition at line 3335 of file OceanDirectAPI.py.

◆ get_raw_spectrum_with_metadata()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_raw_spectrum_with_metadata (   self,
list[list[float]]  list_raw_spectra,
list[int]  list_timestamp,
int  buffer_size 
)

Returns spectra with metadata information.

For older devices such as FX/HDX, read a maximum of 15 spectra from the data buffer. This function requires that both back to back scans and data buffer be enabled. See "set_data_buffer_enable()" and "set_number_of_backtoback_scans()". For newer devices such as Ocean SR2, you can call this function right away. See device manual if this command is supported.

Parameters
list_raw_spectraThe spectra output buffer.
list_timestampThe timestamp output buffer of each spectra.
buffer_sizeThe buffer array size (maximum is 15).
Returns
The number of spectra read. It can be zero.

Definition at line 2347 of file OceanDirectAPI.py.

◆ get_revision_firmware()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_revision_firmware (   self)

Reads out the firmware revision from the device's internal memory if that feature is supported.

Returns
The firmware revision.

Definition at line 2442 of file OceanDirectAPI.py.

◆ get_revision_fpga()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_revision_fpga (   self)

Reads out the FPGA revision from the device's internal memory if that feature is supported.

Returns
The fpga revision.

Definition at line 2464 of file OceanDirectAPI.py.

◆ get_revision_system()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_revision_system (   self)

Reads out the System revision from the device's internal memory if that feature is supported.

Returns
The system revision.

Definition at line 2485 of file OceanDirectAPI.py.

◆ get_shutter_state()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_shutter_state (   self)

This function returns the shutter state of the spectrometer.

Returns
True if the shutter is opened otherwise returns False.

Definition at line 1420 of file OceanDirectAPI.py.

◆ get_single_strobe_cycle_maximum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_cycle_maximum (   self)

Gets the single strobe cycle maximum in microseconds.

Returns
The maximum cycle value.

Definition at line 2014 of file OceanDirectAPI.py.

◆ get_single_strobe_delay() [1/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay (   self)

Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

See also
set_single_strobe_delay()
Returns
The delay in microseconds.

Definition at line 1738 of file OceanDirectAPI.py.

◆ get_single_strobe_delay() [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay (   self)

Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

See also
set_single_strobe_delay()
Returns
The delay in microseconds.

Definition at line 1905 of file OceanDirectAPI.py.

◆ get_single_strobe_delay_increment()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay_increment (   self)

Gets the single strobe delay increment in microseconds.

Returns
The delay increment.

Definition at line 1962 of file OceanDirectAPI.py.

◆ get_single_strobe_delay_maximum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay_maximum (   self)

Get the maximum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Returns
The maximum delay in microseconds.

Definition at line 1948 of file OceanDirectAPI.py.

◆ get_single_strobe_delay_minimum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay_minimum (   self)

Get the minimum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Returns
The minimum delay in microseconds.

Definition at line 1934 of file OceanDirectAPI.py.

◆ get_single_strobe_enable() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_enable (   self)

Get the enable status of the single strobe signal.

Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.

See also
set_single_strobe_enable()
Returns
True if single strobe is enabled otherwise it's False.

Definition at line 1721 of file OceanDirectAPI.py.

◆ get_single_strobe_enable() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_enable (   self)

Get the enable status of the single strobe signal.

Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.

See also
set_single_strobe_enable()
Returns
True if single strobe is enabled otherwise it's False.

Definition at line 1889 of file OceanDirectAPI.py.

◆ get_single_strobe_width() [1/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width (   self)

Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

See also
set_single_strobe_width()
Returns
The pulse width in microseconds.

Definition at line 1753 of file OceanDirectAPI.py.

◆ get_single_strobe_width() [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width (   self)

Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

See also
set_single_strobe_width()
Returns
The pulse width in microseconds.

Definition at line 1920 of file OceanDirectAPI.py.

◆ get_single_strobe_width_increment()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width_increment (   self)

Get the single strobe width increment.

Returns
The width increment.

Definition at line 2001 of file OceanDirectAPI.py.

◆ get_single_strobe_width_maximum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width_maximum (   self)

Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Returns
The maximum width in microseconds.

Definition at line 1988 of file OceanDirectAPI.py.

◆ get_single_strobe_width_minimum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width_minimum (   self)

Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Returns
The minimum width in microseconds.

Definition at line 1975 of file OceanDirectAPI.py.

◆ get_tec_enable()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_enable (   self)

Read the state of the thermo-electric cooler whether it's enable or disable.

If this function is not supported by the device then an exception will be thrown.

See also
set_tec_enable()
Returns
True if the thermo-electric cooler is enabled, False otherwise.

Definition at line 1542 of file OceanDirectAPI.py.

◆ get_tec_fan_enable()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_fan_enable (   self)

Returns the thermo-electric cooler fan state whether it's enabled or not.

Few devices have cooler fan. If this function is not supported by the device then an exception will be thrown.

Returns
True if the fan is enabled, False otherwise.

Definition at line 1587 of file OceanDirectAPI.py.

◆ get_tec_stable()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_stable (   self)

Returns the state of thermo-electric cooler temperature on whether it reached the stable temperature or not.

If this function is not supported by the device then an exception will be thrown.

Returns
True if it's stable, False otherwise.

Definition at line 1573 of file OceanDirectAPI.py.

◆ get_tec_temperature_degrees_C()

float Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_temperature_degrees_C (   self)

Returns the temperature reading (celsius) of a detector thermistor.

This is equivalent to calling get_temperature(index) where the "index" is a detector thermistor index. If this function is not supported by the device then an exception will be thrown.

Returns
The temperature in degrees celsius.

Definition at line 1497 of file OceanDirectAPI.py.

◆ get_temperature_setpoint_degrees_C()

float Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_temperature_setpoint_degrees_C (   self)

Read the set point temperature of the thermo-electric cooler.

If this function is not supported by the device then an exception will be thrown.

See also
set_temperature_setpoint_degrees_C()
Returns
The temperature value in celsius.

Definition at line 1557 of file OceanDirectAPI.py.

◆ get_transition_pixel_range()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_transition_pixel_range (   self)

Read the transition pixel range from the sensor pixel array.

This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.

Returns
A list of transition pixel range.

Definition at line 3350 of file OceanDirectAPI.py.

◆ get_usb_endpoint_primary_in()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_primary_in (   self)

This function returns the usb primary IN endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2398 of file OceanDirectAPI.py.

◆ get_usb_endpoint_primary_out()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_primary_out (   self)

This function returns the usb primary OUT endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2383 of file OceanDirectAPI.py.

◆ get_usb_endpoint_secondary_in()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_secondary_in (   self)

This function returns the usb secondary IN endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2428 of file OceanDirectAPI.py.

◆ get_usb_endpoint_secondary_out()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_secondary_out (   self)

This function returns the usb secondary OUT endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2413 of file OceanDirectAPI.py.

◆ get_user_string()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_user_string (   self)

Read the user string from the device.

If this field in the device is not yet populated then a non-zero(6) code will be returned. This is the command supported for the newer OBP2.0 enabled devices.

See also
set_user_string()
Returns
The user string.

Definition at line 3125 of file OceanDirectAPI.py.

◆ get_user_string1()

str Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_user_string1 (   self,
int  index 
)

Read the user string from the device.

If this field in the device is not yet populated then a non-zero(6) code will be returned. If the device don't support this command then a non-zero error code will be returned. This command is used by legacy devices.

See also
set_user_string2()
Returns
The user string.

Definition at line 3175 of file OceanDirectAPI.py.

◆ get_user_string_count1()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_user_string_count1 (   self)

Read the total user string count from the device.

If the device don't support this command then a non-zero error code will be returned. This command is used by legacy devices.

See also
set_user_string2()
Returns
The string count.

Definition at line 3160 of file OceanDirectAPI.py.

◆ get_wavelength_coeffs()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_wavelength_coeffs (   self)

Read the wavelength coefficients from the device.

This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.

Returns
List of wavelength coefficient values.

Definition at line 1433 of file OceanDirectAPI.py.

◆ gpio_get_output_alternate1()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_output_alternate1 (   self,
int  bit 
)

Get the setting for alternate functionality on the specified bit (pin).

Not all spectrometers support this functionality.

Deprecated:
This function is deprecated starting with release 2.1 and will be removed in the future release.
See also
gpio_set_output_alternate1()
Parameters
bitThe GPIO bit or pin to set.
Returns
The bit value. True if the pin is set to alternate functionality, false otherwise (pin is a GPIO pin).

Definition at line 2843 of file OceanDirectAPI.py.

◆ gpio_get_output_alternate2()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_output_alternate2 (   self)

Get the settings for alternate functionality on the GPIO pins.

Not all spectrometers support this functionality.

Deprecated:
This function is deprecated starting with release 2.1 and will be removed in the future release.
See also
gpio_set_output_alternate2()
Returns
A bitmask with value 1 where the corresponding pin is set to alternate functionality, 0 otherwise (pin is a GPIO pin).

Definition at line 2860 of file OceanDirectAPI.py.

◆ gpio_get_output_enable1()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_output_enable1 (   self,
int  bit 
)

Get GPIO bit direction.

See also
gpio_set_output_enable1()
Parameters
bitThe bit position.
Returns
The bit direction which could be True(out) or False(in)

Definition at line 2714 of file OceanDirectAPI.py.

◆ gpio_get_output_enable2()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_output_enable2 (   self)

Get all GPIO bit direction.

See also
gpio_set_output_enable2()
Returns
All bit (int) direction where each bit could be True(out) or False(in).

Definition at line 2742 of file OceanDirectAPI.py.

◆ gpio_get_value1()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_value1 (   self,
int  bit 
)

Get the GPIO bit value in whether it's high(true) or low(false).

See also
gpio_set_value1()
Parameters
bitThe bit position.
Returns
The bit value. True for high and False for low.

Definition at line 2770 of file OceanDirectAPI.py.

◆ gpio_get_value2()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_value2 (   self)

Get all GPIO bit values.

See also
gpio_set_value2()
Returns
All bit value (int) where each bit could be True(high) or False(low).

Definition at line 2798 of file OceanDirectAPI.py.

◆ gpio_set_output_alternate1()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_output_alternate1 (   self,
int  bit,
bool  isAlternate 
)

Set the alternate functionality for the specified pins (bits).

Not all spectrometers support this functionality.

Deprecated:
This function is deprecated starting with release 2.1 and will be removed in the future release.
See also
gpio_get_output_alternate1()
Parameters
bitThe GPIO bit or pin to set.
isAlternateSet true to enable the alternate functionality for the pin, false otherwise (pin is a GPIO pin).

Definition at line 2812 of file OceanDirectAPI.py.

◆ gpio_set_output_alternate2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_output_alternate2 (   self,
int  bitmask 
)

Set the alternate functionality for the specified pins (bits).

Not all spectrometers support this functionality.

Deprecated:
This function is deprecated starting with release 2.1 and will be removed in the future release.
See also
gpio_get_output_alternate2()
Parameters
bitmaskThe bits set to 1 to set enable the alternate functionality, 0 otherwise (pin is a GPIO pin).

Definition at line 2828 of file OceanDirectAPI.py.

◆ gpio_set_output_enable1()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_output_enable1 (   self,
int  bit,
bool  isOutput 
)

Sets the GPIO bit direction to either output or input.

See also
gpio_get_output_enable1()
Parameters
bitThe bit position.
isOutputThe bit value which could be true(output) or false(input).

Definition at line 2700 of file OceanDirectAPI.py.

◆ gpio_set_output_enable2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_output_enable2 (   self,
int  bitmask 
)

Set the direction (input/output) of the GPIO pins.

See also
gpio_get_output_enable2()
Parameters
bitmaskThe bit mask specifying the pin directions i.e. the nth bit set to 1 sets the nth pin to output.

Definition at line 2729 of file OceanDirectAPI.py.

◆ gpio_set_value1()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_value1 (   self,
int  bit,
bool  isHigh 
)

Sets the GPIO bit value to either high or low.

See also
gpio_get_value1()
Parameters
bitThe bit position.
isHighThe bit value which could be true(high) or false(low).

Definition at line 2756 of file OceanDirectAPI.py.

◆ gpio_set_value2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_value2 (   self,
int  bitmask 
)

Set the logic value for all GPIO pins.

See also
gpio_get_value2()
Parameters
bitmaskThe bit mask specifying the logic level of each GPIO pin.

Definition at line 2785 of file OceanDirectAPI.py.

◆ has_light_source_enable() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.has_light_source_enable (   self,
int  light_source_index 
)

Queries whether the indicated light source within the given feature instance has a usable enable/disable control.

If this returns False (meaning no enable available) then calling enable_light_source() or is_light_source_enabled() is likely to result in an error.

Parameters
light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query
Returns
False to indicate specified light source cannot be enabled/disabled. True to indicate specified light source can be enabled/disabled with enable_light_source()

Definition at line 1616 of file OceanDirectAPI.py.

◆ has_light_source_enable() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.has_light_source_enable (   self,
int  light_source_index 
)

Queries whether the indicated light source within the given feature instance has a usable enable/disable control.

If this returns False (meaning no enable available) then calling enable_light_source() or is_light_source_enabled() is likely to result in an error.

Parameters
light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query
Returns
False to indicate specified light source cannot be enabled/disabled. True to indicate specified light source can be enabled/disabled with enable_light_source()

Definition at line 1784 of file OceanDirectAPI.py.

◆ ipv4_add_static_ip_address()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_add_static_ip_address (   self,
int  ifNum,
list[int]  ipAddress,
int  netmask 
)

Add a static IP address to the specified interface.

The IP address is specified as 4 bytes in an array. The leading part of the IP address must contain the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array. See device manual if TCP/IP connection is supported.

See also
ipv4_delete_static_ip_address()
Parameters
ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressThe static IP address to be added. This is 4-byte array data.
netmaskAn 8-bit network mask specifying the subnet of the network the device is on.

Definition at line 2592 of file OceanDirectAPI.py.

◆ ipv4_add_static_ip_address2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_add_static_ip_address2 (   self,
list[int]  ipAddress,
int  netmask 
)

Definition at line 2619 of file OceanDirectAPI.py.

◆ ipv4_delete_static_ip_address()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_delete_static_ip_address (   self,
int  ifNum,
int  addressIndex 
)

Delete a static IP address on the specified interface.

See device manual if TCP/IP connection is supported.

See also
ipv4_add_static_ip_address()
Parameters
ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
addressIndexThe index of the address to be deleted.

Definition at line 2622 of file OceanDirectAPI.py.

◆ ipv4_delete_static_ip_address2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_delete_static_ip_address2 (   self,
int  addressIndex 
)

Definition at line 2635 of file OceanDirectAPI.py.

◆ ipv4_get_default_gateway_ip_address()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_get_default_gateway_ip_address (   self,
int  ifNum 
)

Get the default gateway IP address to the specified interface.

See device manual if TCP/IP connection is supported.

See also
ipv4_set_default_gateway_ip_address()
Parameters
ifNumThe network interface. 0 for ethernet, 1 for wifi.
Returns
The ip address (4-byte).

Definition at line 2663 of file OceanDirectAPI.py.

◆ ipv4_get_default_gateway_ip_address2()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_get_default_gateway_ip_address2 (   self)

Definition at line 2684 of file OceanDirectAPI.py.

◆ ipv4_get_number_of_ip_addresses()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_get_number_of_ip_addresses (   self,
int  ifNum 
)

Get the number of IP addresses available on the specified interface.

If DHCP is enabled on the specified interface then index 0 represents the DHCP address and the following addresses will be any static IP addresses. See device manual if TCP/IP connection is supported.

See also
ipv4_add_static_ip_address()
Parameters
ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
The number of IP addresses on the specified interface.

Definition at line 2544 of file OceanDirectAPI.py.

◆ ipv4_get_number_of_ip_addresses2()

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_get_number_of_ip_addresses2 (   self)

Definition at line 2561 of file OceanDirectAPI.py.

◆ ipv4_is_dhcp_enabled()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_is_dhcp_enabled (   self,
int  ifNum 
)

Check to see if DHCP (client) is enabled on the specified interface.

If DHCP is enabled then the device will be able to receive an IP address from a DHCP server in the network it is connected to. See device manual if TCP/IP connection is supported.

See also
ipv4_set_dhcp_enable()
Parameters
ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
True if DHCP is enabled on the specified interface otherwise it's False.

Definition at line 2506 of file OceanDirectAPI.py.

◆ ipv4_is_dhcp_enabled2()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_is_dhcp_enabled2 (   self)

Definition at line 2523 of file OceanDirectAPI.py.

◆ ipv4_read_ip_address()

tuple[list[int], int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_read_ip_address (   self,
int  ifNum,
int  addressIndex 
)

Get the assigned ip address provided by the index of a particular interface.

See device manual if TCP/IP connection is supported.

See also
ipv4_add_static_ip_address()
Parameters
ifNumThe network interface. 0 for ethernet, 1 for wifi.
addressIndexThe location of the ip address. Starts with 0.
Returns
A tuple of ip address (4-byte) and network mask (int).

Definition at line 2564 of file OceanDirectAPI.py.

◆ ipv4_read_ip_address2()

tuple[list[int], int] Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_read_ip_address2 (   self,
int  addressIndex 
)

Definition at line 2589 of file OceanDirectAPI.py.

◆ ipv4_set_default_gateway_ip_address()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_set_default_gateway_ip_address (   self,
int  ifNum,
list[int]  ipAddress 
)

Set the default gateway IP address to the specified interface.

See device manual if TCP/IP connection is supported.

See also
ipv4_get_default_gateway_ip_address()
Parameters
ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressThe static IP address to be added. This is 4-byte array data.

Definition at line 2638 of file OceanDirectAPI.py.

◆ ipv4_set_default_gateway_ip_address2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_set_default_gateway_ip_address2 (   self,
list[int]  ipAddress 
)

Definition at line 2660 of file OceanDirectAPI.py.

◆ ipv4_set_dhcp_enable()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_set_dhcp_enable (   self,
int  ifNum,
bool  enabled 
)

Turn the DHCP client on or off for the device on the specified interface.

See device manual if TCP/IP connection is supported.

See also
ipv4_is_dhcp_enabled()
Parameters
ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
enabledFalse turns the DHCP client off. True turns the DHCP client on.

Definition at line 2526 of file OceanDirectAPI.py.

◆ ipv4_set_dhcp_enable2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_set_dhcp_enable2 (   self,
bool  enabled 
)

Definition at line 2541 of file OceanDirectAPI.py.

◆ is_light_source_enabled() [1/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.is_light_source_enabled (   self,
int  light_source_index 
)

Queries whether the indicated light source within the given feature instance is enabled (energized).

Parameters
light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
Returns
False to indicate specified light source is disabled (should emit no light). True to indicate specified light source is enabled (should emit light depending on configured intensity setting).

Definition at line 1634 of file OceanDirectAPI.py.

◆ is_light_source_enabled() [2/2]

bool Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.is_light_source_enabled (   self,
int  light_source_index 
)

Queries whether the indicated light source within the given feature instance is enabled (energized).

Parameters
light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
Returns
False to indicate specified light source is disabled (should emit no light). True to indicate specified light source is enabled (should emit light depending on configured intensity setting).

Definition at line 1802 of file OceanDirectAPI.py.

◆ reset_device()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.reset_device (   self)

Restarts the device.

Definition at line 3114 of file OceanDirectAPI.py.

◆ save_network_interface_setting() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.save_network_interface_setting (   self,
int  interfaceIndex 
)

Save the network interface settings to the device.

Parameters
interfaceIndexThe interface to saved to.

Definition at line 3449 of file OceanDirectAPI.py.

◆ save_network_interface_setting() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.save_network_interface_setting (   self,
int  interfaceIndex 
)

Save the network interface settings to the device.

Parameters
interfaceIndexThe interface to saved to.

Definition at line 3571 of file OceanDirectAPI.py.

◆ save_network_interface_setting2() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.save_network_interface_setting2 (   self)

Definition at line 3461 of file OceanDirectAPI.py.

◆ save_network_interface_setting2() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.save_network_interface_setting2 (   self)

Definition at line 3583 of file OceanDirectAPI.py.

◆ save_settings_to_flash()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.save_settings_to_flash (   self)

Save settings to flash.

Not all devices supported this command.

Definition at line 3309 of file OceanDirectAPI.py.

◆ set_baud_rate()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_baud_rate (   self,
int  baudRate 
)

Set a new baud rate for the RS-232 port.

Not all devices supported this command.

See also
get_baud_rate()
Parameters
baudRateThe baud rate value.

Definition at line 3296 of file OceanDirectAPI.py.

◆ set_continuous_strobe_enable()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_continuous_strobe_enable (   self,
bool  enable 
)

Sets the continuous strobe enable state on the device.

See also
get_continuous_strobe_enable()
Parameters
enableA boolean used for denoting the desired state (on/off) of the continuous strobe generator. If the value of enable is nonzero, then the continuous strobe will operate. If the value of enable is zero, then the continuous strobe will stop. Note that on some devices the continuous strobe enable is tied to other enables (such as lamp enable or single strobe enable) which may cause side effects.

Definition at line 2040 of file OceanDirectAPI.py.

◆ set_continuous_strobe_period()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_continuous_strobe_period (   self,
int  period 
)

Sets the continuous strobe period in microseconds.

See also
get_continuous_strobe_period()
Parameters
periodThe new period of the continuous strobe measured in microseconds

Definition at line 2027 of file OceanDirectAPI.py.

◆ set_continuous_strobe_width()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_continuous_strobe_width (   self,
int  widthMicrosecond 
)

Sets the continuous strobe width on the device.

See also
get_continuous_strobe_width()
Parameters
widthMicrosecondThe new width of the continuous strobe measured in microseconds.

Definition at line 2146 of file OceanDirectAPI.py.

◆ set_data_buffer_capacity()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_data_buffer_capacity (   self,
int  capacity 
)

Set the number of data elements that the buffer should retain.

This function must be used with "set_number_of_backtoback_scans()". An exception will be thrown if the command is not supported by the device.

See also
get_data_buffer_capacity()
Parameters
capacityLimit on the number of data elements to store. This is bounded by what is returned by get_data_buffer_capacity_minimum() and get_data_buffer_capacity_maximum().

Definition at line 2227 of file OceanDirectAPI.py.

◆ set_data_buffer_enable()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_data_buffer_enable (   self,
bool  enable 
)

Enable or disable data buffering.

An exception will be thrown if the command is not supported by the device.

See also
get_data_buffer_enable()
Parameters
enableTrue enable the buffer. False disable the buffer.

Definition at line 2243 of file OceanDirectAPI.py.

◆ set_device_alias()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_device_alias (   self,
str  deviceAlias 
)

Set a new device alias to the device.

See also
get_device_alias()
Parameters
deviceAliasThe device alias. If value is empty then an exception will be thrown.

Definition at line 3096 of file OceanDirectAPI.py.

◆ set_device_manufacturer_string()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_device_manufacturer_string (   self,
str  manufacturer 
)

Set the current manufacturer string of the device.

See also
get_device_manufacturer_string()
Parameters
manufacturerThe new manufacturer string.

Definition at line 3013 of file OceanDirectAPI.py.

◆ set_device_model_string()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_device_model_string (   self,
str  model 
)

Set the current model string of the device.

See also
get_device_model_string()
Parameters
modelThe new model string.

Definition at line 3029 of file OceanDirectAPI.py.

◆ set_enable_lamp()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_enable_lamp (   self,
bool  enable 
)

Enable or disable the lamp.

See also
get_enable_lamp()
Parameters
enableTrue to enable lamp, False otherwise.

Definition at line 1377 of file OceanDirectAPI.py.

◆ set_ethernet_gigabit_enable_status() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ethernet_gigabit_enable_status (   self,
int  interfaceIndex,
bool  enable 
)

Enable or disable the gigabit ethernet the status.

See also
get_ethernet_gigabit_enable_status()
Parameters
interfaceIndexThe ethernet interface to look at.
enableTrue will enable gigabit ethernet.

Definition at line 3482 of file OceanDirectAPI.py.

◆ set_ethernet_gigabit_enable_status() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ethernet_gigabit_enable_status (   self,
int  interfaceIndex,
bool  enable 
)

Enable or disable the gigabit ethernet the status.

See also
get_ethernet_gigabit_enable_status()
Parameters
interfaceIndexThe ethernet interface to look at.
enableTrue will enable gigabit ethernet.

Definition at line 3604 of file OceanDirectAPI.py.

◆ set_ethernet_gigabit_enable_status2() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ethernet_gigabit_enable_status2 (   self,
bool  enable 
)

Definition at line 3499 of file OceanDirectAPI.py.

◆ set_ethernet_gigabit_enable_status2() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ethernet_gigabit_enable_status2 (   self,
bool  enable 
)

Definition at line 3621 of file OceanDirectAPI.py.

◆ set_ethernet_mac_address()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ethernet_mac_address (   self,
int  interfaceIndex,
list[int]  macAddress 
)

Writes a new ethernet 6-byte mac address into the spectrometer.

See also
get_ethernet_mac_address()
Parameters
interfaceIndexThe ethernet interface to look at.
macAddressThe new mac address which is 6-byte long.

Definition at line 3689 of file OceanDirectAPI.py.

◆ set_ethernet_mac_address2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ethernet_mac_address2 (   self,
list[int]  macAddress 
)

Definition at line 3712 of file OceanDirectAPI.py.

◆ set_ip_address_assigned_mode()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_ip_address_assigned_mode (   self,
bool  useDHCP 
)

Set the IP address mode to the OBP2 device.

See also
get_ip_address_assigned_mode()
Parameters
useDHCPTrue will use DHCP server for ip assignment. False will use statically assigned IP address.

Definition at line 3731 of file OceanDirectAPI.py.

◆ set_led_enable()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_led_enable (   self,
bool  isEnabled 
)

Enable or disable device LED.

If the device don't have an LED then an exception will be thrown.

See also
get_led_enable()
Parameters
isEnabledTrue to enable LED blinking otherwise it's False.

Definition at line 2876 of file OceanDirectAPI.py.

◆ set_manual_network_configuration()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_manual_network_configuration (   self,
list[int]  ipv4Address,
list[int]  subnetMask,
list[int]  defaultGateway,
list[int]  dnsServer 
)

Write the network configuration parameters (static ip address) on OBP2 enabled device.

See also
get_manual_network_configuration()
get_network_configuration()
Parameters
ipv4AddressThe static IP address.
subnetMaskThe subnet mask.
defaultGatewayThe default gateway IP address.
dnsServerThe DNS server IP address.

Definition at line 3795 of file OceanDirectAPI.py.

◆ set_multicast_group_enabled()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_multicast_group_enabled (   self,
int  interfaceIndex,
bool  enable 
)

Enable or disable the multicast message group.

See also
get_multicast_group_enabled()
Parameters
interfaceIndexThe ethernet interface to look at.
enableTrue will enable multicast message group.

Definition at line 3643 of file OceanDirectAPI.py.

◆ set_multicast_group_enabled2()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_multicast_group_enabled2 (   self,
bool  enable 
)

Definition at line 3660 of file OceanDirectAPI.py.

◆ set_network_interface_status() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_network_interface_status (   self,
int  interfaceIndex,
bool  enable 
)

Enable or disable the interface.

See also
get_network_interface_status()
Parameters
interfaceIndexThe interface that will be enabled or disabled.
enableTrue will enable the interface. False will disable it.

Definition at line 3428 of file OceanDirectAPI.py.

◆ set_network_interface_status() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_network_interface_status (   self,
int  interfaceIndex,
bool  enable 
)

Enable or disable the interface.

See also
get_network_interface_status()
Parameters
interfaceIndexThe interface that will be enabled or disabled.
enableTrue will enable the interface. False will disable it.

Definition at line 3550 of file OceanDirectAPI.py.

◆ set_network_interface_status2() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_network_interface_status2 (   self,
bool  enable 
)

Definition at line 3446 of file OceanDirectAPI.py.

◆ set_network_interface_status2() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_network_interface_status2 (   self,
bool  enable 
)

Definition at line 3568 of file OceanDirectAPI.py.

◆ set_number_of_backtoback_scans()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_number_of_backtoback_scans (   self,
int  numScans 
)

Set the number of spectra that the device will capture per trigger event.

This function requires data buffer to be enabled. See "set_data_buffer_enable()". See device manual if data buffering is supported.

See also
get_number_of_backtoback_scans()
Parameters
numScansThe back-to-back scan value.

Definition at line 2333 of file OceanDirectAPI.py.

◆ set_shutter_open()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_shutter_open (   self,
bool  shutterState 
)

This function will open or close the shutter on the spectrometer.

Parameters
shutterStateTrue will open the shutter. False will then close the shutter.

Definition at line 1408 of file OceanDirectAPI.py.

◆ set_single_strobe_delay() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_delay (   self,
int  delayMicrosecond 
)

Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

See also
get_single_strobe_delay()
Parameters
delayMicrosecondThe delay, in microseconds, that the single strobe should wait before the pulse begins.

Definition at line 1692 of file OceanDirectAPI.py.

◆ set_single_strobe_delay() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_delay (   self,
int  delayMicrosecond 
)

Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

See also
get_single_strobe_delay()
Parameters
delayMicrosecondThe delay, in microseconds, that the single strobe should wait before the pulse begins.

Definition at line 1859 of file OceanDirectAPI.py.

◆ set_single_strobe_enable() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_enable (   self,
bool  enable 
)

Set the enable status of the single strobe signal.

Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.

See also
get_single_strobe_enable()
Parameters
enableTrue to enable single strobe otherwise use False.

Definition at line 1672 of file OceanDirectAPI.py.

◆ set_single_strobe_enable() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_enable (   self,
bool  enable 
)

Set the enable status of the single strobe signal.

Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.

See also
get_single_strobe_enable()
Parameters
enableTrue to enable single strobe otherwise use False.

Definition at line 1840 of file OceanDirectAPI.py.

◆ set_single_strobe_width() [1/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_width (   self,
int  widthMicrosecond 
)

Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

See also
get_single_strobe_width()
Parameters
widthMicrosecondThe duration, in microseconds, of the single strobe pulse after the rising edge occurs. Once this duration elapses, a falling edge will be generated.

Definition at line 1706 of file OceanDirectAPI.py.

◆ set_single_strobe_width() [2/2]

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_width (   self,
int  widthMicrosecond 
)

Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

See also
get_single_strobe_width()
Parameters
widthMicrosecondThe duration, in microseconds, of the single strobe pulse after the rising edge occurs. Once this duration elapses, a falling edge will be generated.

Definition at line 1874 of file OceanDirectAPI.py.

◆ set_tec_enable()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_tec_enable (   self,
bool  coolerEnable 
)

Enable or disable the thermo-electric cooler attached to the detector.

If this function is not supported by the device then an exception will be thrown.

See also
get_tec_enable()
Parameters
coolerEnableTrue to enable the cooler, False otherwise.

Definition at line 1528 of file OceanDirectAPI.py.

◆ set_temperature_setpoint_degrees_C()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_temperature_setpoint_degrees_C (   self,
float  temp_C 
)

Apply the setpoint temperature (Celsius) in the thermo-electric cooler.

If this function is not supported by the device then an exception will be thrown.

See also
get_temperature_setpoint_degrees_C()
Parameters
temp_CThe setpoint temperature in celsius.

Definition at line 1513 of file OceanDirectAPI.py.

◆ set_user_string()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_user_string (   self,
str  userString 
)

Set a new user string to the device.

The maximum string length is 16. This is the command supported for the newer OBP2.0 enabled devices.

See also
get_user_string()
Parameters
userStringThe user string. If value is empty then an exception will be thrown.

Definition at line 3141 of file OceanDirectAPI.py.

◆ set_user_string1()

None Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_user_string1 (   self,
int  index,
str  userString 
)

Write the user string to the device.

The maximum string length is 16. If the device don't support this command then a non-zero error code will be returned. This command is used by legacy devices.

See also
get_user_string2()
Parameters
indexThe user string index. If index is less than 0 then an exception will be thrown.
userStringThe user string. If value is empty then an exception will be thrown.

Definition at line 3192 of file OceanDirectAPI.py.

Member Data Documentation

◆ device

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.device

Definition at line 1374 of file OceanDirectAPI.py.

◆ lamp_off

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.lamp_off = c_ubyte(0)
static

Definition at line 1370 of file OceanDirectAPI.py.

◆ lamp_on

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.lamp_on = c_ubyte(1)
static

Definition at line 1369 of file OceanDirectAPI.py.

◆ num_nonlinearity_coeffs

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.num_nonlinearity_coeffs = 8
static

Definition at line 1371 of file OceanDirectAPI.py.