Soletta™ Framework
|
Structure of Container Node. More...
#include <sol-flow.h>
Data Fields | |
void(* | add )(struct sol_flow_node *container, struct sol_flow_node *node) |
Member function that, if not NULL , is issued when child nodes of of an instance of this type are created. More... | |
struct sol_flow_node_type | base |
base part of the container node More... | |
int(* | process )(struct sol_flow_node *container, uint16_t source_in_port_idx, struct sol_flow_packet *packet) |
Member function issued when there is no parent and a sol_flow_send() was called in this container. More... | |
void(* | remove )(struct sol_flow_node *container, struct sol_flow_node *node) |
Member function that, if not NULL , is issued when child nodes of an instance of this type this are deleted. More... | |
int(* | send )(struct sol_flow_node *container, struct sol_flow_node *source_node, uint16_t source_out_port_idx, struct sol_flow_packet *packet) |
Member function issued when a child node sends packets to its output ports. More... | |
Structure of Container Node.
When a node type is a container (i.e. may act as parent of other nodes), it should provide extra operations. This is the case of the "static flow" node.
void(* sol_flow_node_container_type::add)(struct sol_flow_node *container, struct sol_flow_node *node) |
Member function that, if not NULL
, is issued when child nodes of of an instance of this type are created.
struct sol_flow_node_type sol_flow_node_container_type::base |
base part of the container node
int(* sol_flow_node_container_type::process)(struct sol_flow_node *container, uint16_t source_in_port_idx, struct sol_flow_packet *packet) |
Member function issued when there is no parent and a sol_flow_send() was called in this container.
This method, if present, may be used to redirect the packet to some child node. Otherwise the packet is dropped (deleted).
If this method is implemented and returns 0, the ownership of the packet is then handled by the function. If it returns non-zero, then the packet is automatically deleted.
void(* sol_flow_node_container_type::remove)(struct sol_flow_node *container, struct sol_flow_node *node) |
Member function that, if not NULL
, is issued when child nodes of an instance of this type this are deleted.
int(* sol_flow_node_container_type::send)(struct sol_flow_node *container, struct sol_flow_node *source_node, uint16_t source_out_port_idx, struct sol_flow_packet *packet) |
Member function issued when a child node sends packets to its output ports.