mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 12:00:34 +08:00
Dynamic allocation master - added definitions of Raft types
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# This message is used by allocation servers to find each other's node ID.
|
||||
# Please refer to the specification for details.
|
||||
#
|
||||
|
||||
#
|
||||
# This message should be broadcasted by the server at this interval until all other servers are discovered.
|
||||
#
|
||||
uint16 BROADCASTING_INTERVAL_MS = 1000
|
||||
|
||||
#
|
||||
# Number of servers in the cluster as configured on the sender.
|
||||
#
|
||||
uint8 configured_cluster_size
|
||||
|
||||
#
|
||||
# Node ID of servers that are known to the publishing server, including the publishing server itself.
|
||||
# Capacity of this array defines maximum size of the server cluster.
|
||||
#
|
||||
uint8[<=7] known_nodes
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# This type is a part of the Raft consensus algorithm.
|
||||
# Please refer to the specification for details.
|
||||
#
|
||||
|
||||
uint32 term
|
||||
uint8 prev_log_index
|
||||
uint8 prev_log_term
|
||||
uint8 leader_commit
|
||||
# Request message fits one CAN frame when there's no entries to send.
|
||||
Entry[<=5] entries
|
||||
|
||||
---
|
||||
|
||||
uint32 term
|
||||
bool success
|
||||
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# This type is a part of the Raft consensus algorithm.
|
||||
# Please refer to the specification for details.
|
||||
#
|
||||
|
||||
uint32 term
|
||||
uint8 last_log_index
|
||||
uint8 last_log_term
|
||||
|
||||
---
|
||||
|
||||
uint32 term
|
||||
bool vote_granted
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# One dynamic node ID allocation entry.
|
||||
# This type is a part of the Raft consensus algorithm.
|
||||
# Please refer to the specification for details.
|
||||
#
|
||||
|
||||
uint32 term
|
||||
uint8[16] unique_id
|
||||
uint7 node_id
|
||||
bool alignment
|
||||
Reference in New Issue
Block a user