94 #define SOL_FLOW_SIMPLE_C_TYPE_PORT_TYPE_IN 1
99 #define SOL_FLOW_SIMPLE_C_TYPE_PORT_TYPE_OUT 2
107 #define SOL_FLOW_SIMPLE_C_TYPE_PORT_IN(name, type) \
108 SOL_TYPE_CHECK(const char *, name), \
109 SOL_TYPE_CHECK(const struct sol_flow_packet_type *, type), \
110 SOL_FLOW_SIMPLE_C_TYPE_PORT_TYPE_IN
118 #define SOL_FLOW_SIMPLE_C_TYPE_PORT_OUT(name, type) \
119 SOL_TYPE_CHECK(const char *, name), \
120 SOL_TYPE_CHECK(const struct sol_flow_packet_type *, type), \
121 SOL_FLOW_SIMPLE_C_TYPE_PORT_TYPE_OUT
174 #define sol_flow_simple_c_type_new(context_data_type, cb, ...) sol_flow_simple_c_type_new_full(#cb, sizeof(context_data_type), sizeof(struct sol_flow_node_type), cb, ## __VA_ARGS__, NULL)
187 #define sol_flow_simple_c_type_new_nocontext(cb, ...) sol_flow_simple_c_type_new_full(#cb, 0, sizeof(struct sol_flow_node_type), cb, ## __VA_ARGS__, NULL)
Node is being open (instantiated)
Definition: sol-flow-simple-c-type.h:76
Node is being closed (deleted)
Definition: sol-flow-simple-c-type.h:77
The input port defined by port index and port_name name received an incoming packet.
Definition: sol-flow-simple-c-type.h:80
The output port defined by port index and port_name name is being disconnected.
Definition: sol-flow-simple-c-type.h:82
The input port defined by port index and port_name name is being connected.
Definition: sol-flow-simple-c-type.h:78
The output port defined by port index and port_name name is being connected.
Definition: sol-flow-simple-c-type.h:81
uint16_t sol_flow_simple_c_type_get_port_in_index(const struct sol_flow_node_type *type, const char *port_in_name)
Helper to retrieve the input port index from its name.
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 char * port_name
Definition: sol-flow-simple-c-type.h:86
The input port defined by port index and port_name name is being disconnected.
Definition: sol-flow-simple-c-type.h:79
struct sol_flow_node sol_flow_node
A node is an entity that has input/output ports.
Definition: sol-flow.h:71
sol_flow_simple_c_type_event_type
Event type.
Definition: sol-flow-simple-c-type.h:75
These are common Soletta macros.
uint16_t options_size
Options size in bytes.
Definition: sol-flow.h:803
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
#define SOL_ATTR_SENTINEL
Used to ensure that the last parameter in a function call is an explicit NULL.
Definition: sol-macros.h:197
The node type describes the capabilities and operations of a node.
Definition: sol-flow.h:796
struct sol_flow_node_type * sol_flow_simple_c_type_new_full(const char *name, size_t context_data_size, uint16_t options_size, int(*func)(struct sol_flow_node *node, const struct sol_flow_simple_c_type_event *ev, void *data),...) SOL_ATTR_SENTINEL
Creates a flow node type using a simple C function.
const struct sol_flow_node_options * options
Definition: sol-flow-simple-c-type.h:87
uint16_t conn_id
If type is one of SOL_FLOW_SIMPLE_C_TYPE_EVENT_TYPE_PORT_* events, the reference connection identifie...
Definition: sol-flow-simple-c-type.h:85
struct sol_flow_simple_c_type_event sol_flow_simple_c_type_event
Simple C event structure.
These routines are used for Soletta flows manipulation.
enum sol_flow_simple_c_type_event::sol_flow_simple_c_type_event_type type
const struct sol_flow_packet * packet
Definition: sol-flow-simple-c-type.h:88
uint16_t port
If type is one of SOL_FLOW_SIMPLE_C_TYPE_EVENT_TYPE_PORT_* events, the reference port index...
Definition: sol-flow-simple-c-type.h:84
Simple C event structure.
Definition: sol-flow-simple-c-type.h:69
uint16_t sol_flow_simple_c_type_get_port_out_index(const struct sol_flow_node_type *type, const char *port_out_name)
Helper to retrieve the output port index from its name.