MockSpectrographController

class lsst.ts.atspectrograph.MockSpectrographController(port: int)

Bases: object

Mock Spectrograph Controller that talks over TCP/IP.

Parameters:
portint

TCP/IP port

Attributes Summary

host

initialized

Methods Summary

cmd_loop(reader, writer)

Command loop.

fwi(val)

home filter wheel

fwm(val)

Move filter wheel.

fws(val)

return filter wheel status

grm(val)

Move grating wheel.

grs(val)

return grating wheel status

gwi(val)

home filter wheel.

lsi(val)

home linear stage.

lsm(val)

Move linear stage.

lss(val)

return linear stage status

start()

Start the TCP/IP server, set start_task Done and start the command loop.

stop([timeout])

Stop the TCP/IP server.

Attributes Documentation

host
initialized

Methods Documentation

async cmd_loop(reader: StreamReader, writer: StreamWriter) None

Command loop.

Parameters:
readerasyncio.StreamReader

Stream reader.

writerasyncio.StreamWriter

Stream writer.

async fwi(val: str) bytes

home filter wheel

Parameters:
valstr

Ignored

async fwm(val: str) bytes

Move filter wheel.

Parameters:
valstr

Filter wheel position.

async fws(val: str) bytes

return filter wheel status

Parameters:
valstr

Ignored

async grm(val: str) bytes

Move grating wheel.

Parameters:
valstr

Grating position.

async grs(val: str) bytes

return grating wheel status

Parameters:
valstr

Ignored

async gwi(val: str) bytes

home filter wheel.

Parameters:
valstr

Ignored

async lsi(val: str) bytes

home linear stage.

Parameters:
valstr

Ignored

async lsm(val: str) bytes

Move linear stage.

async lss(val: str) bytes

return linear stage status

Parameters:
valstr

Ignored

async start() None

Start the TCP/IP server, set start_task Done and start the command loop.

async stop(timeout: float = 5.0) None

Stop the TCP/IP server.

Parameters:
timeoutfloat

Timeout to wait server to stop (in seconds).