PneumaticsSimulator#
- class lsst.ts.atpneumatics.PneumaticsSimulator(host, cmd_evt_port, telemetry_port)#
Bases:
AtSimulatorSimulate the ATPneumatics system.
Methods Summary
cmd_evt_connect_callback(server)Callback function for when a cmd/evt client connects or disconnects.
configure([m1_covers_close_time, ...])Set configuration.
do_close_instrument_air_valve(sequence_id)do_close_m1_cell_vents(sequence_id)do_close_m1_cover(sequence_id)do_close_master_air_supply(sequence_id)do_m1_close_air_valve(sequence_id)do_m1_open_air_valve(sequence_id)do_m1_set_pressure(sequence_id, pressure)do_m2_close_air_valve(sequence_id)do_m2_open_air_valve(sequence_id)do_m2_set_pressure(sequence_id, pressure)do_open_instrument_air_valve(sequence_id)do_open_m1_cell_vents(sequence_id)do_open_m1_cover(sequence_id)do_open_master_air_supply(sequence_id)Initialize events and telemetry.
Load the JSON schemas needed to validate the incoming and outgoing JSON messages.
set_cell_vents_events(closed, opened)Set m1VentsLimitSwitches, m1VentsPosition and cellVentsState events.
set_m1_cover_events(closed, opened)Set m1CoverLimitSwitches and m1CoverState events.
telemetry_connect_callback(server)Callback function for when a tel client connects or disconnects.
Output telemetry and events that have changed
Output all telemetry data messages.
Methods Documentation
- async cmd_evt_connect_callback(server)#
Callback function for when a cmd/evt client connects or disconnects.
When a cmd/evt client connects, background tasks are started and events are sent. When the cmd/evt client disconnects, all background tasks get stopped.
- Parameters:
server (
OneClientServer)- Return type:
- async configure(m1_covers_close_time=20.0, m1_covers_open_time=20.0, cell_vents_close_time=5.0, cell_vents_open_time=1.0, m1_pressure=5.0, m2_pressure=6.0, main_pressure=300000.0, cell_load=100.0)#
Set configuration.
- Parameters:
m1_covers_close_time (
float) – Time to close M1 mirror covers [sec].m1_covers_open_time (
float) – Time to open M1 mirror covers [sec].cell_vents_close_time (
float) – Time to close cell vents [sec].cell_vents_open_time (
float) – Time to open cell vents [sec].m1_pressure (
float) – Initial M1 air pressure [Pa].m2_pressure (
float) – Initial M2 air pressure [Pa].main_pressure (
float) – Initial main air pressure [Pa].cell_load (
float) – Initial cell load [kg].
- Return type:
- async do_m1_set_pressure(sequence_id, pressure)#
- async do_m2_set_pressure(sequence_id, pressure)#
- async initialize()#
Initialize events and telemetry. :rtype:
NoneinstrumentState
m1CoverLimitSwitches
m1CoverState
m1SetPressure
m1State
cellVentsState (should be named m1VentsState)
m1VentsLimitSwitches
m1VentsPosition
m2SetPressure
m2State
mainValveState
powerStatus
- load_schemas()#
Load the JSON schemas needed to validate the incoming and outgoing JSON messages.
- Return type:
- async set_cell_vents_events(closed, opened)#
Set m1VentsLimitSwitches, m1VentsPosition and cellVentsState events.
Output any changes.
- async set_m1_cover_events(closed, opened)#
Set m1CoverLimitSwitches and m1CoverState events.
Output any changes.
- async telemetry_connect_callback(server)#
Callback function for when a tel client connects or disconnects.
When a tel client connects, the telemetry loop is started. When the tel client disconnects, the telemetry loop is stopped.
- Parameters:
server (
OneClientServer)- Return type:
- async telemetry_loop()#
Output telemetry and events that have changed
- Return type:
Notes
Here are the telemetry topics that are output:
m1AirPressure
m2AirPressure
mainAirSourcePressure
loadCell
See
update_eventsfor the events that are output.