Skip to content

Commit

Permalink
rename OtaInstall to OtaUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Oct 24, 2024
1 parent ab1c332 commit 1209f95
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
4 changes: 2 additions & 2 deletions DeprecatedV1Messages.fbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include "./Types/SemVer.fbs";
include "./Types/FirmwareBootType.fbs";
include "./Types/OtaInstallProgressTask.fbs";
include "./Types/OtaUpdateProgressTask.fbs";

attribute "fs_serializer";

Expand Down Expand Up @@ -43,7 +43,7 @@ table OtaInstallStarted {

table OtaInstallProgress {
update_id:int32;
task:Types.OtaInstallProgressTask;
task:Types.OtaUpdateProgressTask;
progress:float;
}

Expand Down
7 changes: 3 additions & 4 deletions GatewayToHubMessage.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ table ShockerCommandList {
commands:[ShockerCommand] (required);
}

// Begin installing an OTA update
table OtaInstall {
table OtaUpdateRequest {
version:Types.SemVer (required);
}

Expand All @@ -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) {
Expand Down
22 changes: 14 additions & 8 deletions HubToGatewayMessage.fbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include "./Types/SemVer.fbs";
include "./Types/FirmwareBootType.fbs";
include "./Types/OtaInstallProgressTask.fbs";
include "./Types/OtaUpdateProgressTask.fbs";

attribute "fs_serializer";

Expand All @@ -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;
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace OpenShock.Serialization.Types;

enum OtaInstallProgressTask : uint8 {
enum OtaUpdateProgressTask : uint8 {
FetchingMetadata,
PreparingForInstall,
PreparingForUpdate,
FlashingFilesystem,
VerifyingFilesystem,
FlashingApplication,
Expand Down

0 comments on commit 1209f95

Please sign in to comment.