Wasatch.PY
Python application driver for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
wasatch.WrapperWorker.WrapperWorker Class Reference

Continuously process in background thread. More...

Inheritance diagram for wasatch.WrapperWorker.WrapperWorker:

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.
 

Public Attributes

 callback
 
 command_queue
 
 connected_device
 
 DEBUG_SEC
 
 device_id
 
 initial_connection_logging
 
 is_andor
 
 is_ble
 
 is_ocean
 
 is_spi
 
 log_level
 
 message_queue
 
 response_queue
 
 settings_queue
 
 thread_start
 

Static Public Attributes

int DEBUG_SEC = 10
 
float POLLER_WAIT_SEC = 0.05
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

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 )

Member Function Documentation

◆ dedupe()

wasatch.WrapperWorker.WrapperWorker.dedupe ( self,
Queue q )

◆ run()

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).

Member Data Documentation

◆ callback

wasatch.WrapperWorker.WrapperWorker.callback

◆ command_queue

wasatch.WrapperWorker.WrapperWorker.command_queue

◆ connected_device

wasatch.WrapperWorker.WrapperWorker.connected_device

◆ DEBUG_SEC [1/2]

int wasatch.WrapperWorker.WrapperWorker.DEBUG_SEC = 10
static

◆ DEBUG_SEC [2/2]

wasatch.WrapperWorker.WrapperWorker.DEBUG_SEC

◆ device_id

wasatch.WrapperWorker.WrapperWorker.device_id

◆ initial_connection_logging

wasatch.WrapperWorker.WrapperWorker.initial_connection_logging

◆ is_andor

wasatch.WrapperWorker.WrapperWorker.is_andor

◆ is_ble

wasatch.WrapperWorker.WrapperWorker.is_ble

◆ is_ocean

wasatch.WrapperWorker.WrapperWorker.is_ocean

◆ is_spi

wasatch.WrapperWorker.WrapperWorker.is_spi

◆ log_level

wasatch.WrapperWorker.WrapperWorker.log_level

◆ message_queue

wasatch.WrapperWorker.WrapperWorker.message_queue

◆ POLLER_WAIT_SEC

float wasatch.WrapperWorker.WrapperWorker.POLLER_WAIT_SEC = 0.05
static

◆ response_queue

wasatch.WrapperWorker.WrapperWorker.response_queue

◆ settings_queue

wasatch.WrapperWorker.WrapperWorker.settings_queue

◆ thread_start

wasatch.WrapperWorker.WrapperWorker.thread_start

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