|
Wasatch.PY
Python application driver for Wasatch Photonics spectrometers
|
Public Member Functions | |
| __init__ (self, device_id, message_queue=None) | |
| acquire_data (self) | |
| connect (self) | |
| Public Methods. | |
| scans_to_average (self, int value) | |
Public Member Functions inherited from wasatch.InterfaceDevice.InterfaceDevice | |
| handle_requests (self, list[SpectrometerRequest] requests) | |
Public Attributes | |
| command_queue | |
| connected | |
| device | |
| device_id | |
| failure_count | |
| immediate_mode | |
| last_battery_percentage | |
| last_memory_check | |
| message_queue | |
| process_f | |
| process_id | |
| session_reading_count | |
| settings | |
| spec | |
| sum_count | |
| summed_spectra | |
| take_one | |
Public Attributes inherited from wasatch.InterfaceDevice.InterfaceDevice | |
| process_f | |
| remaining_throwaways | |
Protected Member Functions | |
| _init_process_funcs (self) | |
| Private Methods. | |
| _take_one_averaged_reading (self) | |
This is the basic implementation of our interface with Ocean Spectrometers
##########################################################################
This class adopts the external device interface structure
This invlovles receiving a request through the handle_request function
A request is processed based on the key in the request
The processing function passes the commands to the requested device
Once it recevies a response from the connected device it then passes that
back up the chain
Enlighten Request
|
handle_requests
|
------------
/ / | \ \
{ get_laser status, acquire, set_laser_watchdog, etc....}
\ \ | / /
------------
|
{self.ocean_call}
############################################################################
| wasatch.OceanDevice.OceanDevice.__init__ | ( | self, | |
| device_id, | |||
| message_queue = None ) |
Any class that communicates to a spectrometer should inherit this class. It provides the common functions that avoid repeated code.
Reimplemented from wasatch.InterfaceDevice.InterfaceDevice.
|
protected |
Private Methods.
|
protected |
| wasatch.OceanDevice.OceanDevice.acquire_data | ( | self | ) |
| wasatch.OceanDevice.OceanDevice.connect | ( | self | ) |
Public Methods.
| wasatch.OceanDevice.OceanDevice.scans_to_average | ( | self, | |
| int | value ) |
| wasatch.OceanDevice.OceanDevice.command_queue |
| wasatch.OceanDevice.OceanDevice.connected |
| wasatch.OceanDevice.OceanDevice.device |
| wasatch.OceanDevice.OceanDevice.device_id |
| wasatch.OceanDevice.OceanDevice.failure_count |
| wasatch.OceanDevice.OceanDevice.immediate_mode |
| wasatch.OceanDevice.OceanDevice.last_battery_percentage |
| wasatch.OceanDevice.OceanDevice.last_memory_check |
| wasatch.OceanDevice.OceanDevice.message_queue |
| wasatch.OceanDevice.OceanDevice.process_f |
| wasatch.OceanDevice.OceanDevice.process_id |
| wasatch.OceanDevice.OceanDevice.session_reading_count |
| wasatch.OceanDevice.OceanDevice.settings |
| wasatch.OceanDevice.OceanDevice.spec |
| wasatch.OceanDevice.OceanDevice.sum_count |
| wasatch.OceanDevice.OceanDevice.summed_spectra |
| wasatch.OceanDevice.OceanDevice.take_one |