|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
A query or an event traveling a pad link. More...
#include <mpipe_dispatch.h>
Data Fields | |
| uint8_t | type |
| Dispatch type from mpipe_dispatch_type. | |
| struct mpipe_structure * | caps |
| The capability carried, or NULL when the dispatch carries none. | |
| struct mpipe_buffer_pool * | pool |
| Buffer pool its proposer makes available (not owned). | |
| struct mpipe_buffer_pool_config | pool_cfg |
| A pool config proposed without a pool, negotiated by value. | |
A query or an event traveling a pad link.
A dispatch travels a synchronous walk, so it references storage that outlives the walk instead of embedding a copy of everything it carries. It is declared with a designated initializer and has no init function - zero is the neutral value of every field:
| struct mpipe_structure* mpipe_dispatch::caps |
The capability carried, or NULL when the dispatch carries none.
The creator points this at storage it owns for the whole walk; every other element reads through it and answers by copying INTO it. Repointing it at storage of your own dangles the moment your frame returns.
| Value | On a query (in/out storage) | On an event (an announcement) |
|---|---|---|
| a capability | the filter to answer within | the format decided on |
| ANY | no constraint: answer with all you support | never send one |
| NULL | caller error: nowhere to answer | nothing to announce |
A query function may dereference this without checking: a caps query carrying no storage is refused by mpipe_pad_query() with -EINVAL before any of them is called. An event handler must check, since NULL is a valid thing for an event to carry.
A caps event carrying none is a trigger rather than an announcement: a source that knows no format (a file source) still sends one, and the first element that does know one puts it in and announces it downstream.
| struct mpipe_buffer_pool* mpipe_dispatch::pool |
Buffer pool its proposer makes available (not owned).
| struct mpipe_buffer_pool_config mpipe_dispatch::pool_cfg |
A pool config proposed without a pool, negotiated by value.
| uint8_t mpipe_dispatch::type |
Dispatch type from mpipe_dispatch_type.