MockDomeController

class lsst.ts.ATDome.MockDomeController(port, door_time=1, az_vel=6, home_az=10, home_az_overshoot=1, home_az_vel=1)

Bases: object

Mock DomeController that talks over TCP/IP.

Parameters:
port : int

TCP/IP port. If 0 then pick an available port.

door_time : float

Time to open or close either door (sec)

az_vel : float

Azimuth velocity (deg/sec)

home_az : float

Azimuth home position (deg)

home_az_overshoot : float

Distance to move CCW past the home switch at full speed while homing, before coming back slowly (deg)

home_az_vel : float

Final velocity for azimuth homing, once the home switch has been contacted at full speed (deg/sec)

Notes

To start the server:

ctrl = MockDomeController(…) await ctrl.start()

To stop the server:

await ctrl.stop()

Known Limitations:

  • The following commands are not supported: AO, AF, RO, RF, CO, CF, TOL, HZ, HS, CS, LM, WT, RD, CFS, CFR, HELP
  • Encoder counts are not supported; reported values are bogus.
  • Door sequencing is not supported; doors move as if independent.

Attributes Summary

homing Is azimuth being homed?

Methods Summary

cmd_loop(reader, writer) Execute commands and output replies.
do_close_doors(doors) Close the specified doors.
do_full_status() Create full status as a list of strings.
do_home() Rotate azimuth to the home position.
do_open_doors(doors) Open the specified doors.
do_set_cmd_az(data) Set commanded azimuth position.
do_short_status() Create short status as a list of strings.
do_stop() Stop all motion.
door_iter(doors) Convert a doors bitmask to a list of Doors
implement_home() Home the azimuth axis.
set_cmd_az(cmd_az) Set cmd_az and last_rot_right.
start() Start the TCP/IP server.
stop([timeout]) Stop the TCP/IP server.

Attributes Documentation

homing

Is azimuth being homed?

Methods Documentation

cmd_loop(reader, writer)

Execute commands and output replies.

do_close_doors(doors)

Close the specified doors.

Parameters:
doors : Door

Bit mask specifying the doors

do_full_status()

Create full status as a list of strings.

do_home()

Rotate azimuth to the home position.

do_open_doors(doors)

Open the specified doors.

Parameters:
doors : Door

Bit mask specifying the doors

do_set_cmd_az(data)

Set commanded azimuth position.

Parameters:
data : str

Desired azimuth as a float encoded as a string (deg)

do_short_status()

Create short status as a list of strings.

do_stop()

Stop all motion.

door_iter(doors)

Convert a doors bitmask to a list of Doors

implement_home()

Home the azimuth axis.

set_cmd_az(cmd_az)

Set cmd_az and last_rot_right.

Parameters:
cmd_az : float

Desired azimuth (degree). Must be in the range [0, 360).

Returns:
duration : float

Move duration (second)

start()

Start the TCP/IP server.

Set start_task done and start the command loop.

stop(timeout=5)

Stop the TCP/IP server.