26 #include "../../static_function.h"
27 #include "../contiguous_tree/request_adapter.h"
28 #include "../function_view.h"
33 #include <source_location>
47 std::optional< collect_key_type >
opt_key;
127 return set( 0, key, t );
132 return set( 0, key, val );
135 template <
typename Arg >
136 bool set(
node_id parent, std::string_view key, Arg
const& arg )
141 template <
typename Arg >
142 bool set( std::string_view key, Arg
const& arg )
150 template <
typename Arg >
170 c.
set(
"sfile", loc.file_name() );
171 c.
set(
"sfun", loc.function_name() );
172 c.
set(
"sline", loc.line() );
void clear()
Definition: tree.h:320
Definition: memory_resource.h:33
Protocol library has custom type that represents message, however this is just simple overaly over st...
Definition: message.h:40
collect_awaiter(collect_request const &req, collector &coll)
collector & col
Definition: collect.h:75
bool await_ready() const
Definition: collect.h:88
coro_state get_state() const override
Definition: collect.h:79
node_id await_resume() const
Definition: collect.h:95
collect_request req
Definition: collect.h:72
void tick() override
Definition: collect.h:84
void await_suspend(std::coroutine_handle< coroutine< void >::promise_type > h)
Definition: collect.h:178
collect_server(protocol::channel_type chan, pmr::memory_resource &mem_res, collect_server_transmit_callback send_cb)
protocol::channel_type get_channel() const
Definition: collect.h:185
void clear()
Definition: collect.h:193
outcome on_msg(std::span< std::byte const > data)
data_tree const & get_tree() const
Definition: collect.h:198
outcome on_msg(collect_request const &req)
Definition: collect.h:104
bool exchange(collect_request const &req, collect_reply_callback cb)
collector(protocol::channel_type chann, collect_client_transmit_callback send_cb)
constexpr protocol::channel_type get_channel() const
Definition: collect.h:113
collector(collector const &)=delete
bool append(node_id parent, Arg const &arg)
Definition: collect.h:151
collect_awaiter set(node_id const parent, std::string_view key, contiguous_container_type t)
collector & operator=(collector const &)=delete
bool set(std::string_view key, Arg const &arg)
Definition: collect.h:142
bool set(node_id const parent, std::string_view key, value_type const &val)
collect_awaiter append(node_id const parent, contiguous_container_type t)
bool append(node_id const parent, value_type const &val)
collector & operator=(collector &&)=delete
outcome on_msg(collect_server_client_group const &var)
collect_awaiter set(std::string_view key, contiguous_container_type t)
Definition: collect.h:125
collector(collector &&)=delete
bool set(std::string_view key, value_type const &val)
Definition: collect.h:130
outcome on_msg(std::span< std::byte const > const &msg)
bool set(node_id parent, std::string_view key, Arg const &arg)
Definition: collect.h:136
Definition: coroutine.h:53
uint16_t channel_type
Definition: multiplexer.h:35
MIT License.
Definition: base.h:37
uint32_t node_id
Definition: base.h:42
coro_state
Definition: coroutine.h:36
node_id nid
Definition: collect.h:53
typename protocol::handler< collect_request >::message_type collect_client_server_message
Definition: collect.h:59
string_buffer< 32 > key_type_buffer
Definition: base.h:40
bool expects_reply
Definition: collect.h:46
status_awaiter expect(collector &c, bool expr, std::source_location loc=std::source_location::current())
Definition: collect.h:167
std::variant< int64_t, float, bool, string_buffer > value_type
Definition: base.h:51
collect_value_type value
Definition: collect.h:48
typename protocol::handler< collect_server_client_group >::message_type collect_server_client_message
Definition: collect.h:58
static constexpr protocol::channel_type collect_channel
Definition: collect.h:38
std::variant< collect_reply, tree_error_reply > collect_server_client_group
Definition: collect.h:56
std::variant< value_type, contiguous_container_type > collect_value_type
Definition: collect.h:41
node_id parent
Definition: collect.h:45
std::optional< collect_key_type > opt_key
Definition: collect.h:47
constexpr pointer data() noexcept
Returns pointer to first item of the storage.
Definition: static_storage.h:108
T res
Definition: algorithm.h:505
contiguous_container_type
Definition: base.h:40
physical_quantity< 0, 0, 0, 1, 0, 0, 0, 0, 0 > current
Definition: physical_quantity.h:113
Definition: static_function.h:109
outcome represents tristate resut of some operation, which can succeed, fail or produce an error.
Definition: outcome.h:49
result represents an result of some operation, as an alternative to returning just bool with true/fal...
Definition: result.h:42
Definition: coroutine.h:177
Definition: coroutine.h:45