Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_flow_node_type Struct Reference

The node type describes the capabilities and operations of a node. More...

#include <sol-flow.h>

Data Fields

uint16_t api_version
 Must match SOL_FLOW_NODE_TYPE_API_VERSION at runtime. More...
 
void(* close )(struct sol_flow_node *node, void *data)
 Member function to delete the node. More...
 
uint16_t data_size
 Size of the whole sol_flow_node_type derivate in bytes. More...
 
const void * default_options
 The default options for this type. More...
 
void(* dispose_type )(struct sol_flow_node_type *type)
 Called to dispose any extra resources. More...
 
uint16_t flags
 Node type flags. More...
 
const struct
sol_flow_port_type_in *(* 
get_port_in )(const struct sol_flow_node_type *type, uint16_t port)
 Member function to get the array of the node's input ports. More...
 
const struct
sol_flow_port_type_out *(* 
get_port_out )(const struct sol_flow_node_type *type, uint16_t port)
 Member function to get the array of the node's output ports. More...
 
void(* init_type )(void)
 Member function that allows initialization of node-specific data (packet types, logging domains, etc) More...
 
int(* open )(struct sol_flow_node *node, void *data, const struct sol_flow_node_options *options)
 Member function to instantiate the node. More...
 
uint16_t options_size
 Options size in bytes. More...
 
uint16_t ports_in_count
 Number of Input ports. More...
 
uint16_t ports_out_count
 Number of Output ports. More...
 
const void * type_data
 Pointer to per-type user data. More...
 

Detailed Description

The node type describes the capabilities and operations of a node.

So a node can be seen as a class instance, being the node type the class.

This description is usually defined as const static and shared by many different nodes.

Examples:
/src/samples/flow/c-api/find-type.c, /src/samples/flow/c-api/highlevel.c, /src/samples/flow/c-api/lowlevel.c, /src/samples/flow/c-api/simple-c-type.c, and /src/samples/flow/c-api/single-node.c.

Field Documentation

uint16_t sol_flow_node_type::api_version

Must match SOL_FLOW_NODE_TYPE_API_VERSION at runtime.

void(* sol_flow_node_type::close)(struct sol_flow_node *node, void *data)

Member function to delete the node.

uint16_t sol_flow_node_type::data_size

Size of the whole sol_flow_node_type derivate in bytes.

const void* sol_flow_node_type::default_options

The default options for this type.

void(* sol_flow_node_type::dispose_type)(struct sol_flow_node_type *type)

Called to dispose any extra resources.

Called as part of sol_flow_node_type_del() to dispose extra resources associated with the node type.

uint16_t sol_flow_node_type::flags

Node type flags.

const struct sol_flow_port_type_in*(* sol_flow_node_type::get_port_in)(const struct sol_flow_node_type *type, uint16_t port)

Member function to get the array of the node's input ports.

const struct sol_flow_port_type_out*(* sol_flow_node_type::get_port_out)(const struct sol_flow_node_type *type, uint16_t port)

Member function to get the array of the node's output ports.

void(* sol_flow_node_type::init_type)(void)

Member function that allows initialization of node-specific data (packet types, logging domains, etc)

Called at least once for each node type.

int(* sol_flow_node_type::open)(struct sol_flow_node *node, void *data, const struct sol_flow_node_options *options)

Member function to instantiate the node.

uint16_t sol_flow_node_type::options_size

Options size in bytes.

uint16_t sol_flow_node_type::ports_in_count

Number of Input ports.

uint16_t sol_flow_node_type::ports_out_count

Number of Output ports.

const void* sol_flow_node_type::type_data

Pointer to per-type user data.


The documentation for this struct was generated from the following file: