|
asrt
Automated System Runtime Testing library
|
Active query state for a pending QUERY or FIND_BY_KEY request. More...
#include <param.h>
Public Attributes | |
| union asrt_param_cb | cb |
| void * | cb_ptr |
| enum asrt_param_err_e | error_code |
| Error code from the server, if any. | |
| asrt_flat_value_type | expected_type |
| Type filter; NONE means accept any type. | |
| char const * | key |
| Key of the returned node, valid until next query. | |
| asrt_flat_id | next_sibling |
| Next sibling ID (0 = none). | |
| asrt_flat_id | node_id |
| Node ID requested or returned. | |
| uint32_t | start |
Active query state for a pending QUERY or FIND_BY_KEY request.
Because the param client is non-blocking, it cannot store the query parameters or the callback internally — doing so would limit the client to a single static query slot and complicate ownership. Instead, the caller allocates (or statically declares) an asrt_param_query, fills in the callback fields via one of the typed helpers, and passes it to asrt_param_client_query(). The client stores a pointer to this struct for the duration of the in-flight request and calls the callback from within asrt_chann_tick_successors() once the RESPONSE is decoded.
The struct must remain at a stable address and must not be reused for a second query until the callback for the first has fired (check with asrt_param_query_pending()).