Skip to main content

Update Manager controller

The update manager (UM) controller package (umcontroller) is responsible for SOTA/FOTA update logic. See SOTA/FOTA for an overview of SOTA/FOTA.

Component overview

See below an overview diagram of the UM controller component.

loading...

umCtrlServer is the gRPC server, which implements communication with the update manager. gRPC protofile

On the startup UM connect to umcontroller server and informs about the current status and supported components. Count and IDs Um client present in CM configuration file. If not all clients have connected to CM during X seconds, the system will detect an error.

On each new connection, the server creates umHandler and provides connection info to UmControlle. UMcontroller performs validation and assigns appropriate UmClientConfig.

The system supports system updates by component. Each update manager client could support several update components. umHandler implements FSM which covers update logic for one Update Manager client.

UmController implements FSM per all UMs and components.

Based on the configuration, UMs can be located on another logical unit and don't have access to the file system where CM is located. FileStorage represents the HTTP server that provides update packages for remote Update Managers.

See below a sequence diagram for the update manager.

UMUMCMCMumControllerumControllerumCtrlServerumCtrlServerumHandlerumHandlerfileStoragefileStoragenew()newServer()Start()umControllerRegisterUM()UMStatusnewUmHandlerumHandleropenConnectionhandleNewConnectionGetStatus()comonentsProcessDesiredComponents(components)downloadComponentUpdategetImageURL(isLocat)imageURLPrepareUpdate(components)PrepareUpdate(components)PREPAREDPREPAREDStartUpdate()StartUpdate()UPDATEDUPDATEDApplyUpdate()ApplyUpdate()IDLEIDLE

umController FSM

FSM.png

umHandler FSM

umHandler_fsm.png