Files
PX4-Autopilot/dsdl/uavcan/protocol/dynamic_node_id/server/220.AppendEntries.uavcan
T
2015-05-26 20:22:21 +03:00

31 lines
823 B
Plaintext

#
# This type is a part of the Raft consensus algorithm.
# Please refer to the specification for details.
#
#
# Given min election timeout and cluster size, the maximum request interval can be derived as follows:
# max request interval = (min election timeout) / 2 requests / (cluster size - 1)
# Obviously, request interval can be lower than that if needed, but not higher.
#
# Real timeout is randomized in the range (MIN, MAX].
#
uint16 DEFAULT_MIN_ELECTION_TIMEOUT_MS = 4000
uint16 DEFAULT_MAX_ELECTION_TIMEOUT_MS = 6000
uint32 term
uint32 prev_log_term
uint8 prev_log_index
uint8 leader_commit
#
# Worst-case replication time can be computed as:
# worst replication time = (127 log entries) * (2 trips of next_index) * (cluster size - 1) * (request interval)
#
Entry[<=1] entries
---
uint32 term
bool success