11#ifndef ASRTC_COLLECT_SERVER_H
12#define ASRTC_COLLECT_SERVER_H
18#include "../asrtl/allocator.h"
19#include "../asrtl/chann.h"
20#include "../asrtl/collect_proto.h"
21#include "../asrtl/flat_tree.h"
22#include "../asrtl/status.h"
24typedef void ( *asrt_collect_ready_ack_cb )(
void* ptr,
enum asrt_status status );
26enum asrt_collect_server_state
28 ASRT_COLLECT_SERVER_IDLE = 0,
29 ASRT_COLLECT_SERVER_READY_SENT,
30 ASRT_COLLECT_SERVER_READY_ACK_RECV,
31 ASRT_COLLECT_SERVER_ACTIVE,
37 asrt_collect_ready_ack_cb ack_cb;
63 uint32_t tree_block_cap;
64 uint32_t tree_node_cap;
66 enum asrt_collect_server_state state;
67 asrt_flat_id next_node_id;
74enum asrt_status asrt_collect_server_init(
78 uint32_t tree_block_cap,
79 uint32_t tree_node_cap );
89enum asrt_status asrt_collect_server_send_ready(
93 asrt_collect_ready_ack_cb ack_cb,
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee ...
Definition: allocator.h:28
Controller-side collect server (ASRT_COLL channel).
Definition: collect.h:55
node_id maps to blocks[node_id / node_capacity][node_id % node_capacity].
Definition: flat_tree.h:121
A node in a doubly-linked channel chain.
Definition: chann.h:122