CommandInfo#

class lsst.ts.salobj.topics.CommandInfo(remote_command, seq_num, wait_done)#

Bases: object

Struct to hold information about a command.

Parameters:
  • remote_command (RemoteCommand) – Remote command.

  • seq_num (int) – Sequence number of command.

  • wait_done (bool) – Wait until the command is done to finish the task? If false then wait for the next ack instead.

Methods Summary

add_ackcmd(ackcmd)

Add a command acknowledgement to the queue.

close()

Stop pending tasks.

next_ackcmd([timeout])

Get next command acknowledgement of interest.

Methods Documentation

add_ackcmd(ackcmd)#

Add a command acknowledgement to the queue.

Parameters:

ackcmd (SalInfo.AckCmdType) – Command acknowledgement message.

Returns:

isdone – True if this is a final acknowledgement.

Return type:

bool

close()#

Stop pending tasks.

Return type:

None

async next_ackcmd(timeout=3600)#

Get next command acknowledgement of interest.

If wait_done true then return the final command acknowledgement, else return the next command acknowledgement. If the ackcmd is an error then raise AckError. If waiting times out then raise AckTimeoutError.

Parameters:

timeout (float, optional) – Time limit, in seconds. If None then use DEFAULT_TIMEOUT. This time limit is for the command to finish, if wait_done is true, else it is for the next command acknowledgement. If the command is acknowledged with CMD_INPROGRESS then the timeout is extended by the timeout value in the acknowledgement. Thus a slow command will not need a long timeout, so long as the command issues a CMD_INPROGRESS acknowledgement with a reasonable timeout value.

Returns:

ackcmd – Command acknowledgement.

Return type:

SalInfo.AckCmdType

Raises: