61 #define SOL_FLOW_SINGLE_CONNECTIONS(...) \
62 (const uint16_t[]){ __VA_ARGS__, UINT16_MAX }
87 #ifndef SOL_NO_API_VERSION
96 #define SOL_FLOW_SINGLE_OPTIONS_API_VERSION (1)
172 #define SOL_FLOW_SINGLE_OPTIONS_DEFAULTS(...) { \
174 SOL_SET_API_VERSION(.api_version = SOL_FLOW_NODE_OPTIONS_API_VERSION, ) \
175 SOL_SET_API_VERSION(.sub_api = SOL_FLOW_SINGLE_OPTIONS_API_VERSION) \
struct sol_flow_node_type * sol_flow_single_new_type(const struct sol_flow_node_type *base_type)
create a wrapper type to use base_type nodes without a flow.
const uint16_t * connected_ports_in
indexes of input ports that should be connected.
Definition: sol-flow-single.h:143
Node options are a set of attributes defined by the Node Type that can change the behavior of a Node...
Definition: sol-flow.h:552
const struct sol_flow_node_type * sol_flow_single_type_get_child_type(const struct sol_flow_node_type *single_type)
Given a single-node type wrapper, return the internal (child) type.
const void * user_data
user data to give to callback process().
Definition: sol-flow-single.h:131
int32_t sol_flow_single_disconnect_port_in(struct sol_flow_node *node, uint16_t port_idx)
Disconnect the input port port_idx of the inner node.
struct sol_flow_node sol_flow_node
A node is an entity that has input/output ports.
Definition: sol-flow.h:71
void(* process)(void *user_data, struct sol_flow_node *node, uint16_t port, const struct sol_flow_packet *packet)
callback to deliver outgoing packets.
Definition: sol-flow-single.h:126
struct sol_flow_node * sol_flow_single_get_child(const struct sol_flow_node *node)
Return the reference to the inner node.
struct sol_flow_node * sol_flow_single_new(const char *id, const struct sol_flow_node_type *base_type, const struct sol_flow_node_options *options, const uint16_t *connected_ports_in, const uint16_t *connected_ports_out, void(*process)(void *user_data, struct sol_flow_node *node, uint16_t port, const struct sol_flow_packet *packet), const void *user_data)
create a single-node instance for the given base_type.
struct sol_flow_packet sol_flow_packet
A packet is a generic container for different kinds (types) of contents.
Definition: sol-flow-packet.h:54
struct sol_flow_node_options base
base guarantees sol_flow_node_options compatibility.
Definition: sol-flow-single.h:85
The node type describes the capabilities and operations of a node.
Definition: sol-flow.h:796
Structure for the specification of a single node.
Definition: sol-flow-single.h:79
int32_t sol_flow_single_connect_port_in(struct sol_flow_node *node, uint16_t port_idx)
Connect the input port port_idx of the inner node.
struct sol_flow_single_options sol_flow_single_options
Structure for the specification of a single node.
const struct sol_flow_node_options * options
options to give to the actual base type.
Definition: sol-flow-single.h:106
static int port
Definition: server-sse.c:72
These routines are used for Soletta flows manipulation.
const uint16_t * connected_ports_out
indexes of output ports that should be connected.
Definition: sol-flow-single.h:157
int32_t sol_flow_single_disconnect_port_out(struct sol_flow_node *node, uint16_t port_idx)
Disconnect the output port port_idx of the inner node.
int32_t sol_flow_single_connect_port_out(struct sol_flow_node *node, uint16_t port_idx)
Connect the output port port_idx of the inner node.