From 1209f95023a3732680d12d80857e03992f096fd0 Mon Sep 17 00:00:00 2001 From: hhvrc Date: Thu, 24 Oct 2024 13:58:09 +0200 Subject: [PATCH] rename OtaInstall to OtaUpdate --- DeprecatedV1Messages.fbs | 4 ++-- GatewayToHubMessage.fbs | 7 +++--- HubToGatewayMessage.fbs | 22 ++++++++++++------- ...ressTask.fbs => OtaUpdateProgressTask.fbs} | 4 ++-- 4 files changed, 21 insertions(+), 16 deletions(-) rename Types/{OtaInstallProgressTask.fbs => OtaUpdateProgressTask.fbs} (73%) diff --git a/DeprecatedV1Messages.fbs b/DeprecatedV1Messages.fbs index 43ba2ce..452474c 100644 --- a/DeprecatedV1Messages.fbs +++ b/DeprecatedV1Messages.fbs @@ -1,6 +1,6 @@ include "./Types/SemVer.fbs"; include "./Types/FirmwareBootType.fbs"; -include "./Types/OtaInstallProgressTask.fbs"; +include "./Types/OtaUpdateProgressTask.fbs"; attribute "fs_serializer"; @@ -43,7 +43,7 @@ table OtaInstallStarted { table OtaInstallProgress { update_id:int32; - task:Types.OtaInstallProgressTask; + task:Types.OtaUpdateProgressTask; progress:float; } diff --git a/GatewayToHubMessage.fbs b/GatewayToHubMessage.fbs index c152b09..aeb0e5a 100644 --- a/GatewayToHubMessage.fbs +++ b/GatewayToHubMessage.fbs @@ -40,8 +40,7 @@ table ShockerCommandList { commands:[ShockerCommand] (required); } -// Begin installing an OTA update -table OtaInstall { +table OtaUpdateRequest { version:Types.SemVer (required); } @@ -55,8 +54,8 @@ union GatewayToHubMessagePayload { /// Send a list of shocker commands to the hub ShockerCommandList, - /// Begin installing an OTA update - OtaInstall + /// Request an OTA update to be performed + OtaUpdateRequest } table GatewayToHubMessage (fs_serializer) { diff --git a/HubToGatewayMessage.fbs b/HubToGatewayMessage.fbs index c40a9d3..323d966 100644 --- a/HubToGatewayMessage.fbs +++ b/HubToGatewayMessage.fbs @@ -1,6 +1,6 @@ include "./Types/SemVer.fbs"; include "./Types/FirmwareBootType.fbs"; -include "./Types/OtaInstallProgressTask.fbs"; +include "./Types/OtaUpdateProgressTask.fbs"; attribute "fs_serializer"; @@ -16,18 +16,18 @@ table BootStatus { ota_update_id:int32; } -table OtaInstallStarted { +table OtaUpdateStarted { update_id:int32; version:Types.SemVer (required); } -table OtaInstallProgress { +table OtaUpdateProgress { update_id:int32; - task:Types.OtaInstallProgressTask; + task:Types.OtaUpdateProgressTask; progress:float; } -table OtaInstallFailed { +table OtaUpdateFailed { update_id:int32; message:string; fatal:bool; @@ -39,9 +39,15 @@ union HubToGatewayMessagePayload { /// Report the current boot status, used to report firmware version and OTA update results BootStatus, - OtaInstallStarted, - OtaInstallProgress, - OtaInstallFailed + + /// Report that an OTA update has started + OtaUpdateStarted, + + /// Report the progress of an OTA update + OtaUpdateProgress, + + /// Report that an OTA update has failed + OtaUpdateFailed } table HubToGatewayMessage (fs_serializer) { diff --git a/Types/OtaInstallProgressTask.fbs b/Types/OtaUpdateProgressTask.fbs similarity index 73% rename from Types/OtaInstallProgressTask.fbs rename to Types/OtaUpdateProgressTask.fbs index 4b8a643..5f855b6 100644 --- a/Types/OtaInstallProgressTask.fbs +++ b/Types/OtaUpdateProgressTask.fbs @@ -1,8 +1,8 @@ namespace OpenShock.Serialization.Types; -enum OtaInstallProgressTask : uint8 { +enum OtaUpdateProgressTask : uint8 { FetchingMetadata, - PreparingForInstall, + PreparingForUpdate, FlashingFilesystem, VerifyingFilesystem, FlashingApplication,