MockLabJackInterface¶
- class lsst.ts.atwhitelight.MockLabJackInterface(identifier, log, device_type='T4', connection_type='TCP', simulate=False)¶
Bases:
LabJackInterface
Mock version of LabJackInterface.
This mock monitors what data is written to the LabJack and adjusts what data is read to be what we expect from the real lamp controller.
- Parameters:
Notes
This mock LabJack starts up in the following state:
Lamp is off and fully cooled down
Lamp controller is reporting an error
The shutter is closed and disabled
Attributes Summary
Methods Summary
connect
()Connect to the LabJack and check we can read the specified channels.
Disconnect from the LabJack.
read
()Read all channels specified in LabjackChannels.read.
set_error
(controller_error)write
(**kwargs)Write to one or more labelled channels.
Attributes Documentation
- connected¶
Methods Documentation
- async blinking_error_loop()¶
- async connect()¶
Connect to the LabJack and check we can read the specified channels.
Disconnect first, if connected.
- async disconnect()¶
Disconnect from the LabJack. A no-op if disconnected.
- async move_shutter()¶
- async read()¶
Read all channels specified in LabjackChannels.read.
- Returns:
- data
types.SimpleNamespace
Struct of label=value, where label is a key in LabjackChannels.read
- data
- set_error(controller_error)¶