CommandFutures

class lsst.ts.MTMount.CommandFutures

Bases: object

asyncio futures to track the progress of a low-level controller command.

Attributes:
ack : asyncio.Future

Future which ends as follows:

  • result = timeout (in sec) when the command is acknowledged (an Ack reply is read).
  • exception = lsst.ts.salobj.ExpectedError if the command fails (a NoAck reply is read) before the command is acknowledged.
done : asyncio.Future

Future which ends as follows:

Attributes Summary

timeout Return the timeout, in seconds.

Methods Summary

setack(timeout) Report a command as started.
setdone() Report a command as done.
setnoack(explanation) Report a command as failed.

Attributes Documentation

timeout

Return the timeout, in seconds.

Return None if command not acknowledged. Raise an exception if the command failed before being acknowledged.

Methods Documentation

setack(timeout)

Report a command as started.

Parameters:
timeout : float

Max time for command to complete (sec).

setdone()

Report a command as done.

setnoack(explanation)

Report a command as failed.

Parameters:
explanation : str

Explanation of what went wrong.

Notes

Sets the ack (if not done) else done future to lsst.ts.salobj.ExpectedError exception.

Do not set both, to avoid “exception was never retrieved” warnings.