8 #ifndef __SOLAR_CAPTURE_EXT_NODE_H__
9 #define __SOLAR_CAPTURE_EXT_NODE_H__
149 const char* link_name,
151 const char* to_name_opt);
174 char** new_name_out);
229 const struct sc_attr* attr_opt,
269 const char* name,
int v_default);
288 const char* name,
const char* v_default);
306 struct sc_node* node,
const char* name,
326 const char* name,
double v_default);
414 extern int __sc_node_set_error(
struct sc_node* node,
const char* file,
415 int line,
const char* func,
int errno_code,
416 const char* fmt, ...);
418 extern int __sc_node_fwd_error(
struct sc_node* node,
const char* file,
419 int line,
const char* func,
int rc);
433 #define sc_node_set_error(node, errno_code, ...) \
434 __sc_node_set_error((node), __FILE__, __LINE__, __func__, \
435 (errno_code), __VA_ARGS__)
445 #define sc_node_fwd_error(node, rc) \
446 __sc_node_fwd_error((node), __FILE__, __LINE__, __func__, (rc))
489 int type_size,
void* pp_area);
Describes a type of node.
Definition: ext_node.h:204
int( sc_node_add_link_fn)(struct sc_node *from_node, const char *link_name, struct sc_node *to_node, const char *to_name_opt)
Signature of nt_add_link_fn function.
Definition: ext_node.h:148
int sc_node_init_get_arg_str(const char **v_out, struct sc_node *node, const char *name, const char *v_default)
Get an string argument.
int nf_node_api_ver
Definition: ext_node.h:70
sc_node_add_link_fn * nt_add_link_fn
Definition: ext_node.h:209
const char * nf_source_file
Definition: ext_node.h:72
sc_object_type
The type of data the sc_object contains.
Definition: object.h:16
const char * nt_name
Definition: ext_node.h:205
const char * nf_name
Definition: ext_node.h:71
const struct sc_node_type * nd_type
Definition: ext_node.h:18
const struct sc_node_link * sc_node_prep_get_link(struct sc_node *node, const char *link_name)
Find a named outgoing link.
void sc_forward_list(struct sc_node *node, const struct sc_node_link *link, struct sc_packet_list *pl)
Forward a list of packets.
void * nd_private
Definition: ext_node.h:20
void( sc_node_pkts_fn)(struct sc_node *node, struct sc_packet_list *packet_list)
Signature of nt_pkts_fn function.
Definition: ext_node.h:122
void( sc_node_end_of_stream_fn)(struct sc_node *node)
Signature of nt_end_of_stream_fn function.
Definition: ext_node.h:194
void sc_node_link_end_of_stream(struct sc_node *node, const struct sc_node_link *link)
Indicate end-of-stream on a link.
void sc_forward(struct sc_node *node, const struct sc_node_link *link, struct sc_packet *packet)
Forward a single packet.
Description of a link the node has.
Definition: ext_node.h:29
Representation of a packet.
Definition: ext_packet.h:56
const char * name
Definition: ext_node.h:30
An opaque object. Use this to pass all types of data that are not ints, doubles or char arrays (see S...
sc_node_select_subnode_fn * nt_select_subnode_fn
Definition: ext_node.h:210
sc_node_prep_fn * nt_prep_fn
Definition: ext_node.h:207
char * nd_name
Definition: ext_node.h:19
int sc_node_export_state(struct sc_node *node, const char *type_name, int type_size, void *pp_area)
Export dynamic state to solar_capture_monitor.
int sc_node_prep_check_links(struct sc_node *node)
Check the node's links for any unused links.
Struct to hold information about how to create an instance of this node.
Definition: ext_node.h:69
void * nf_private
Definition: ext_node.h:73
A list of packets or packet buffers.
Definition: ext_packet_list.h:14
sc_node_end_of_stream_fn * nt_end_of_stream_fn
Definition: ext_node.h:212
int sc_node_init_get_arg_int(int *v_out, struct sc_node *node, const char *name, int v_default)
Get an integer argument.
sc_node_init_fn * nf_init_fn
Definition: ext_node.h:74
int sc_node_type_alloc(struct sc_node_type **nt_out, const struct sc_attr *attr_opt, const struct sc_node_factory *factory)
Allocate an sc_node_type instance.
int( sc_node_prep_fn)(struct sc_node *node, const struct sc_node_link *const *links, int n_links)
Signature of nt_prep_fn function.
Definition: ext_node.h:101
int sc_node_prep_get_pool(struct sc_pool **pool_out, const struct sc_attr *attr, struct sc_node *node, const struct sc_node_link *const *links, int n_links)
Get a packet pool that can be used to obtain empty packet buffers that can be passed to any of the gi...
int sc_node_init_get_arg_dbl(double *v_out, struct sc_node *node, const char *name, double v_default)
Get a double argument.
Description of a node.
Definition: ext_node.h:17
const struct sc_node_link * sc_node_prep_get_link_or_free(struct sc_node *node, const char *link_name)
Find a named outgoing link or return a link for freeing.
struct sc_node *( sc_node_select_subnode_fn)(struct sc_node *node, const char *name, char **new_name_out)
Signature of nt_select_subnode_fn function.
Definition: ext_node.h:173
int sc_node_init_get_arg_obj(struct sc_object **obj_out, struct sc_node *node, const char *name, enum sc_object_type obj_type)
Get an sc_object argument.
int( sc_node_init_fn)(struct sc_node *node, const struct sc_attr *attr, const struct sc_node_factory *)
Signature of function to initialise a node.
Definition: ext_node.h:61
sc_node_pkts_fn * nt_pkts_fn
Definition: ext_node.h:208
void * nt_private
Definition: ext_node.h:206