sgns::neoswarm::network::ResultAggregation¶
Collects NodeOutput responses from swarm peers with a timeout. More...
#include <result_aggregation.hpp>
Public Classes¶
| Name | |
|---|---|
| struct | Config |
Public Functions¶
| Name | |
|---|---|
| ResultAggregation() | |
| ResultAggregation(Config cfg) | |
| void | Submit(const NodeOutput & output) Submit a response from a node (thread-safe). |
| outcome::result< std::vector< NodeOutput > > | Collect() Wait for responses and return collected results. |
| void | Reset() Reset for a new collection round. |
| size_t | ResponseCount() const |
Detailed Description¶
Collects NodeOutput responses from swarm peers with a timeout.
Returns as soon as min_responses_ are received or the timeout expires.
Public Functions Documentation¶
function ResultAggregation¶
function ResultAggregation¶
function Submit¶
Submit a response from a node (thread-safe).
Parameters:
- output Node output to add to the collection.
function Collect¶
Wait for responses and return collected results.
Return: Vector of collected NodeOutputs or BroadcastTimeout.
Blocks until min_responses_ received or timeout expires.
function Reset¶
Reset for a new collection round.
function ResponseCount¶
Return: Number of responses received so far.
Updated on 2026-07-25 at 22:56:56 +0000