DeviceUpdate¶
- class pyniryo_nate.models.device.DeviceUpdate(state: DeviceUpdateState, stale: bool, target: DeviceUpdateTarget | None = None, progress: int | None = None, error: str | None = None)[source]¶
Bases:
objectWhere the robot stands on updating its embedded software. The robot stays on the release it runs until
start_update()asks for the newer one.A client cannot follow an installation to its end from this robot: the API and the broker are part of what a release replaces, so both go silent for the minutes the robot takes to come back. Read
APPLYING, lose the connection, and conclude on reconnection, where the state readsSUCCESSorERROR.- Parameters:
state (DeviceUpdateState) – Where the robot stands.
stale (bool) – The robot has had no recent contact with its fleet, so
targetmay be out of date.target (DeviceUpdateTarget | None) – The release the update is about, None while idle and after a check that found nothing newer.
progress (int | None) – How much of the release has been transferred, in percent, while downloading.
error (str | None) – Why the last update did not go through, when
stateisERROR.
Attributes
Methods
- state: DeviceUpdateState¶
- stale: bool¶
- target: DeviceUpdateTarget | None = None¶
- progress: int | None = None¶
- error: str | None = None¶
- classmethod from_transport_model(model: DeviceUpdate) DeviceUpdate[source]¶
- Parameters:
model (DeviceUpdate)
- Return type:
- classmethod from_a_transport_model(model: DeviceUpdateState) DeviceUpdate[source]¶
- Parameters:
model (DeviceUpdateState)
- Return type: