Skip to content

Commit

Permalink
Introduce trigger functionality, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Oct 24, 2024
1 parent c615826 commit ab1c332
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
31 changes: 26 additions & 5 deletions GatewayToHubMessage.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ table Ping {
unix_utc_time:ulong;
}

enum TriggerType : uint8 {
/// Restart the hub
Restart,

/// Trigger the emergency stop on the hub, this does however not allow for resending the emergency stop
EmergencyStop,

/// Enable the captive portal
CaptivePortalEnable,

/// Disable the captive portal
CaptivePortalDisable,
}

table Trigger {
type:TriggerType;
}

table ShockerCommand {
model:Types.ShockerModelType;
id:uint16;
Expand All @@ -22,19 +40,22 @@ table ShockerCommandList {
commands:[ShockerCommand] (required);
}

table CaptivePortalConfig {
force_enable:bool;
}

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

union GatewayToHubMessagePayload {
/// Ping message, should immediately be responded to with a pong
Ping,

/// Trigger a specific action on the hub
Trigger,

/// Send a list of shocker commands to the hub
ShockerCommandList,
CaptivePortalConfig,

/// Begin installing an OTA update
OtaInstall
}

Expand Down
3 changes: 3 additions & 0 deletions HubToGatewayMessage.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ table OtaInstallFailed {
}

union HubToGatewayMessagePayload {
/// Respond to a ping message
Pong,

/// Report the current boot status, used to report firmware version and OTA update results
BootStatus,
OtaInstallStarted,
OtaInstallProgress,
Expand Down

0 comments on commit ab1c332

Please sign in to comment.