MockServer

class lsst.ts.cbp.MockServer(log=None)

Bases: object

Mocks the CBP server.

Parameters
loglogging.Logger, optional
Attributes
hoststr
portint
timeoutint
long_timeoutint
azimuthfloat
altitudefloat
focusint
maskstr
panic_statusbool
encodersEncoders
parkbool
auto_parkbool
masks_rotationdict of str:float
commandstuple of re.Pattern:functools.partial
loglogging.Logger

Methods Summary

cmd_loop(reader, writer)

Run the command loop.

do_aastat()

Return the azimuth encoder status.

do_abstat()

Return the altitude encoder status.

do_acstat()

Return the focus encoder status.

do_adstat()

Return the mask selection encoder status.

do_aestat()

Return the mask rotation encoder status.

do_altitude()

Return the altitude position.

do_autopark()

Return the autopark value.

do_azimuth()

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.

do_rotation()

Return the mask rotation value.

set_constrained_position(value, actuator)

Set actuator to position that is silently constrained to bounds.

start()

Start the server.

stop()

Stop the server.

Methods Documentation

async cmd_loop(reader, writer)

Run the command loop.

Parameters
readerasyncio.StreamReader
writerasyncio.StreamWriter
async do_aastat()

Return the azimuth encoder status.

Returns
str
async do_abstat()

Return the altitude encoder status.

Returns
str
async do_acstat()

Return the focus encoder status.

Returns
str
async do_adstat()

Return the mask selection encoder status.

Returns
str
async do_aestat()

Return the mask rotation encoder status.

Returns
str
async do_altitude()

Return the altitude position.

Returns
str
async do_autopark()

Return the autopark value.

Returns
str
async do_azimuth()

Return azimuth position.

Returns
str
async do_focus()

Return the focus value.

Returns
str
async do_mask()

Return the mask value.

Returns
str
async do_new_altitude(altitude)

Set the new altitude position.

Parameters
altitudefloat
Returns
str
async do_new_azimuth(azimuth)

Set the new azimuth position.

Parameters
azimuthfloat
Returns
str
async do_new_focus(focus)

Set the new focus value.

Parameters
focus
Returns
str
async do_new_mask(mask)

Set the new mask value.

Parameters
maskstr
Returns
str
async do_new_rotation(rotation)

Set the new mask rotation value.

Parameters
rotationfloat
Returns
str
async do_panic()

Return the panic status value.

Returns
str
async do_park(park='?')

Park or unpark the CBP.

Parameters
parkint, optional
Returns
str
async do_rotation()

Return the mask rotation value.

Returns
str
set_constrained_position(value, actuator)

Set actuator to position that is silently constrained to bounds.

Parameters
valuefloat

Desired value

actuatorlsst.ts.simactuators.PointToPointActuator

The actuator to set.

async start()

Start the server.

async stop()

Stop the server.