mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 11:27:34 +08:00
Dynamic node ID servers - configurable priority
This commit is contained in:
+1
-2
@@ -239,12 +239,11 @@ public:
|
||||
|
||||
int init(const TransferPriority priority)
|
||||
{
|
||||
int res = allocation_pub_.init();
|
||||
int res = allocation_pub_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
allocation_pub_.setPriority(priority);
|
||||
allocation_pub_.setTxTimeout(MonotonicDuration::fromMSec(1000 /* TODO FIXME ALLOCATION RANDOMIZATION */));
|
||||
|
||||
res = allocation_sub_.start(AllocationCallback(this, &AllocationRequestManager::handleAllocation));
|
||||
|
||||
+1
-2
@@ -258,12 +258,11 @@ public:
|
||||
/*
|
||||
* Initializing pub/sub and timer
|
||||
*/
|
||||
int res = discovery_pub_.init();
|
||||
int res = discovery_pub_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
discovery_pub_.setPriority(priority);
|
||||
|
||||
res = discovery_sub_.start(DiscoveryCallback(this, &ClusterManager::handleDiscovery));
|
||||
if (res < 0)
|
||||
|
||||
@@ -766,7 +766,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
res = append_entries_client_.init();
|
||||
res = append_entries_client_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
@@ -774,7 +774,7 @@ public:
|
||||
append_entries_client_.setCallback(AppendEntriesResponseCallback(this,
|
||||
&RaftCore::handleAppendEntriesResponse));
|
||||
|
||||
res = request_vote_client_.init();
|
||||
res = request_vote_client_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
|
||||
@@ -311,9 +311,7 @@ public:
|
||||
|
||||
int init(const TransferPriority priority)
|
||||
{
|
||||
// TODO FIXME set priority
|
||||
(void)priority;
|
||||
int res = get_node_info_client_.init();
|
||||
int res = get_node_info_client_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user