genericroboticarm.sila_server.server module

exception genericroboticarm.sila_server.server.DeferredTaskFailed[source]

Bases: RuntimeError

Raised on the next command when a deferred tail task of a previous command failed. The robot is likely in an unexpected state, e.g. still holding a lid.

exception genericroboticarm.sila_server.server.RobotCommandQueueFull[source]

Bases: RuntimeError

class genericroboticarm.sila_server.server.Server(robo_interface: RoboInterface, server_uuid: UUID | None = None)[source]

Bases: SilaServer

_run_deferred(tail_task: Callable[[], None]) None[source]

Runs the tail task in the background and releases the task lock once it is done. The lock is handed over to that thread instead of being reacquired by it, so the next SiLA command queues up behind the tail task instead of racing it for the robot. :param tail_task: :return:

robot: RoboInterface
robot_command() Iterator[None][source]
stop(grace_period: float | None = None) None[source]

Stop the server and block until completion

Parameters:

grace_period (Time in seconds to wait before aborting all ongoing interactions)