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
portint

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

door_timefloat

Time to open or close either door (sec)

az_velfloat

Azimuth velocity (deg/sec)

home_azfloat

Azimuth home position (deg)

home_az_overshootfloat

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

home_az_velfloat

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

async cmd_loop(reader, writer)

Execute commands and output replies.

do_close_doors(doors)

Close the specified doors.

Parameters
doorsDoor

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
doorsDoor

Bit mask specifying the doors

do_set_cmd_az(data)

Set commanded azimuth position.

Parameters
datastr

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

async implement_home()

Home the azimuth axis.

set_cmd_az(cmd_az)

Set cmd_az and last_rot_right.

Parameters
cmd_azfloat

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

Returns
durationfloat

Move duration (second)

async start()

Start the TCP/IP server.

Set start_task done and start the command loop.

async stop(timeout=5)

Stop the TCP/IP server.