MockServer#
- class lsst.ts.cbp.MockServer(log=None)#
Bases:
OneClientReadLoopServerMocks the CBP server.
- Parameters:
log (
logging.Logger, optional) – Optional logger used for mock-server diagnostics.
- commands#
Command dispatch table.
- Type:
tupleofre.PatterntoCallable
- log#
- Type:
Methods Summary
cmd_loop()Run the command loop.
Return the azimuth encoder status.
Return the altitude encoder status.
Return the focus encoder status.
Return the mask selection encoder status.
Return the mask rotation encoder status.
Return the altitude position.
Return the autopark value.
Return azimuth position.
do_focus()Return the focus value.
do_mask()Return the mask value.
do_new_altitude(altitude)Set the new altitude position.
do_new_azimuth(azimuth)Set the new azimuth position.
do_new_focus(focus)Set the new focus value.
do_new_mask(mask)Set the new mask value.
do_new_rotation(rotation)Set the new mask rotation value.
do_panic()Return the panic status value.
do_park([park])Park or unpark the CBP.
Return the mask rotation value.
Read one command and dispatch it to the matching handler.
set_circular_constrained_position(value, ...)Set actuator to position that is silently constrained to bounds.
set_constrained_position(value, actuator)Set actuator to position that is silently constrained to bounds.
Methods Documentation
- async do_aastat()#
Return the azimuth encoder status.
- Returns:
status – Current azimuth encoder status returned by the mock controller.
- Return type:
- async do_abstat()#
Return the altitude encoder status.
- Returns:
status – Current altitude encoder status returned by the mock controller.
- Return type:
- async do_acstat()#
Return the focus encoder status.
- Returns:
status – Current focus encoder status returned by the mock controller.
- Return type:
- async do_adstat()#
Return the mask selection encoder status.
- Returns:
status – Current mask selection encoder status returned by the mock controller.
- Return type:
- async do_aestat()#
Return the mask rotation encoder status.
- Returns:
status – Current mask rotation encoder status returned by the mock controller.
- Return type:
- async do_altitude()#
Return the altitude position.
- Returns:
position – Current altitude position returned by the mock controller.
- Return type:
- async do_autopark()#
Return the autopark value.
- Returns:
state – Current autopark state returned by the mock controller.
- Return type:
- async do_azimuth()#
Return azimuth position.
- Returns:
position – Current azimuth position returned by the mock controller.
- Return type:
- async do_focus()#
Return the focus value.
- Returns:
position – Current focus position returned by the mock controller.
- Return type:
- async do_mask()#
Return the mask value.
- Returns:
mask – Current mask identifier returned by the mock controller.
- Return type:
- async do_new_altitude(altitude)#
Set the new altitude position.
- async do_new_azimuth(azimuth)#
Set the new azimuth position.
- async do_new_focus(focus)#
Set the new focus value.
- async do_new_mask(mask)#
Set the new mask value.
- async do_new_rotation(rotation)#
Set the new mask rotation value.
- async do_panic()#
Return the panic status value.
- Returns:
status – Current panic status returned by the mock controller.
- Return type:
- async do_park(park='?')#
Park or unpark the CBP.
- async do_rotation()#
Return the mask rotation value.
- Returns:
rotation – Current mask rotation returned by the mock controller.
- Return type:
- async read_and_dispatch()#
Read one command and dispatch it to the matching handler.
- Return type:
- set_circular_constrained_position(value, actuator)#
Set actuator to position that is silently constrained to bounds.
- Parameters:
value (
float) – Desired valueactuator (
lsst.ts.simactuators.CircularPointToPointActuator) – The actuator to set.
- Return type:
- set_constrained_position(value, actuator)#
Set actuator to position that is silently constrained to bounds.
- Parameters:
value (
float) – Desired valueactuator (
lsst.ts.simactuators.PointToPointActuator) – The actuator to set.
- Return type: