|
Wasatch.PY
Python application driver for Wasatch Photonics spectrometers
|
Continuously process in background thread. More...
Public Member Functions | |
| __init__ (self, device_id, command_queue, response_queue, settings_queue, message_queue, is_ocean, is_andor, is_spi, is_ble, log_level, callback=None) | |
| dedupe (self, Queue q) | |
| run (self) | |
| This is essentially the main() loop in a thread. | |
Static Public Attributes | |
| int | DEBUG_SEC = 10 |
| float | POLLER_WAIT_SEC = 0.05 |
Continuously process in background thread.
While waiting forever for the None poison pill on the command queue, continuously read from the device and post the results on the response queue.
Consider moving this class, and WasatchDeviceWrapper, our of Wasatch.PY and into ENLIGHTEN. Let Wasatch.PY be a simple single-spectrometer blocking driver, similar to Wasatch.NET and Wasatch.VCPP. No need to have Wasatch.PY handle the threads.
| wasatch.WrapperWorker.WrapperWorker.__init__ | ( | self, | |
| device_id, | |||
| command_queue, | |||
| response_queue, | |||
| settings_queue, | |||
| message_queue, | |||
| is_ocean, | |||
| is_andor, | |||
| is_spi, | |||
| is_ble, | |||
| log_level, | |||
| callback = None ) |
| wasatch.WrapperWorker.WrapperWorker.dedupe | ( | self, | |
| Queue | q ) |
| wasatch.WrapperWorker.WrapperWorker.run | ( | self | ) |
This is essentially the main() loop in a thread.
All communications with the parent thread are routed through one of the three queues (cmd inputs, response outputs, and a one-shot SpectrometerSettings).
| wasatch.WrapperWorker.WrapperWorker.callback |
| wasatch.WrapperWorker.WrapperWorker.command_queue |
| wasatch.WrapperWorker.WrapperWorker.connected_device |
|
static |
| wasatch.WrapperWorker.WrapperWorker.DEBUG_SEC |
| wasatch.WrapperWorker.WrapperWorker.device_id |
| wasatch.WrapperWorker.WrapperWorker.initial_connection_logging |
| wasatch.WrapperWorker.WrapperWorker.is_andor |
| wasatch.WrapperWorker.WrapperWorker.is_ble |
| wasatch.WrapperWorker.WrapperWorker.is_ocean |
| wasatch.WrapperWorker.WrapperWorker.is_spi |
| wasatch.WrapperWorker.WrapperWorker.log_level |
| wasatch.WrapperWorker.WrapperWorker.message_queue |
|
static |
| wasatch.WrapperWorker.WrapperWorker.response_queue |
| wasatch.WrapperWorker.WrapperWorker.settings_queue |
| wasatch.WrapperWorker.WrapperWorker.thread_start |