DeviceStatus

class pyniryo_nate.models.device.DeviceStatus(status: DeviceStatusValue, client_id: str | None = None, manual_mode: bool | None = None, armed: bool | None = None, device_name: str | None = None, model: str | None = None, hostname: str | None = None, ip: str | None = None, interfaces: list[DeviceInterface] = <factory>, execution: DeviceExecution | None = None)[source]

Bases: object

Aggregated state of the robot, for a client that holds no session on it: whether the robot can be used right now, and which robot it is. Every field but status is None when its source has nothing to give.

Parameters:
  • status (DeviceStatusValue) – The one state the robot is in.

  • client_id (str | None) – MQTT client id of the workstation holding the control session, None while the robot is free.

  • manual_mode (bool | None) – Only manual control modes are authorized; when False, only automatic modes are.

  • armed (bool | None) – The robot is armed and accepts commands. Not readable from status.

  • device_name (str | None) – Name the device manager gives the robot.

  • model (str | None) – Robot model, as configured.

  • hostname (str | None) – Fully qualified name the robot answers to on the local network.

  • ip (str | None) – Address the client dialled to reach the robot, None when it dialled a name.

  • interfaces (list[DeviceInterface]) – Every interface the robot is connected on, with the address it holds there.

  • execution (DeviceExecution | None) – The program the robot is running, None when it runs none.

Attributes

Methods

status: DeviceStatusValue
client_id: str | None = None
manual_mode: bool | None = None
armed: bool | None = None
device_name: str | None = None
model: str | None = None
hostname: str | None = None
ip: str | None = None
interfaces: list[DeviceInterface]
execution: DeviceExecution | None = None
classmethod from_transport_model(model: DeviceStatus) → DeviceStatus[source]
Parameters:

model (DeviceStatus)

Return type:

DeviceStatus