Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions protos/core/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,39 @@ service CoreService {
* need to be increased to prevent timeouts.
*/
rpc SetMavlinkTimeout(SetMavlinkTimeoutRequest) returns(SetMavlinkTimeoutResponse) {}
/*
* Feed the heartbeat watchdog.
*
* MAVSDK can be configured with a heartbeat watchdog (deadman timer).
* While configured, the periodic heartbeats sent by MAVSDK are only sent
* as long as this is called at least once per timeout period. If the
* watchdog times out, heartbeats stop until it is fed again.
*
* This allows MAVSDK's heartbeats to reflect the liveness of the client:
* if the client hangs or dies, heartbeats stop.
*
* Has no effect if no watchdog is configured (e.g. with the
* --heartbeat-watchdog-timeout option of mavsdk_server, or
* SetHeartbeatWatchdogTimeout).
*/
rpc FeedHeartbeatWatchdog(FeedHeartbeatWatchdogRequest) returns(FeedHeartbeatWatchdogResponse) {}
/*
* Set the heartbeat watchdog timeout.
*
* When timeout_s is greater than 0, the periodic heartbeats sent by MAVSDK
* are only sent as long as FeedHeartbeatWatchdog is called at least once
* per timeout period. If the watchdog times out, heartbeats stop until it
* is fed again.
*
* When timeout_s is 0, the watchdog is disabled and heartbeats follow the
* usual policy (always_send_heartbeats or a connected system).
*
* Values greater than 0 and less than 1 are rejected.
*
* This is an alternative to configuring the watchdog at mavsdk_server
* startup with the --heartbeat-watchdog-timeout option.
*/
rpc SetHeartbeatWatchdogTimeout(SetHeartbeatWatchdogTimeoutRequest) returns(SetHeartbeatWatchdogTimeoutResponse) {}
}

message SubscribeConnectionStateRequest {}
Expand All @@ -32,6 +65,14 @@ message SetMavlinkTimeoutRequest {
}
message SetMavlinkTimeoutResponse {}

message FeedHeartbeatWatchdogRequest {}
message FeedHeartbeatWatchdogResponse {}

message SetHeartbeatWatchdogTimeoutRequest {
double timeout_s = 1; // Timeout in seconds. 0 disables the watchdog. Minimum 1 when enabled.
}
message SetHeartbeatWatchdogTimeoutResponse {}

// Connection state type.
message ConnectionState {
bool is_connected = 2; // Whether the vehicle got connected or disconnected
Expand Down