#include <errno.h>
#include <stdio.h>
#include "custom-node-types-gen.h"
#ifndef SOL_NO_API_VERSION
#define SOL_FLOW_NODE_OPTIONS_SUB_API_CHECK(options, expected, ...) \
do { \
SOL_NULL_CHECK(options, __VA_ARGS__); \
if (((const struct sol_flow_node_options *)options)->sub_api != (expected)) { \
SOL_WRN("" # options "(%p)->sub_api(%" PRIu16 ") != " \
"" # expected "(%" PRIu16 ")", \
(options), \
((const struct sol_flow_node_options *)options)->sub_api, \
(expected)); \
return __VA_ARGS__; \
} \
} while (0)
#else
#define SOL_FLOW_NODE_OPTIONS_SUB_API_CHECK(options, expected, ...)
#endif
};
static bool
{
int r;
SOL_FLOW_NODE_TYPE_CUSTOM_NODE_TYPES_READER__OUT__OUT,
if (r < 0) {
fprintf(stderr, "ERROR: could not send packet on port=%d, value=%d\n",
SOL_FLOW_NODE_TYPE_CUSTOM_NODE_TYPES_READER__OUT__OUT, mdata->
val);
return false;
}
return true;
}
static int
{
const struct sol_flow_node_type_custom_node_types_reader_options *opts;
SOL_FLOW_NODE_TYPE_CUSTOM_NODE_TYPES_READER_OPTIONS_API_VERSION,
-EINVAL);
opts = (const struct sol_flow_node_type_custom_node_types_reader_options *)
options;
mdata->
val = opts->intopt;
SOL_FLOW_NODE_TYPE_CUSTOM_NODE_TYPES_READER__OUT__OUT, mdata->
val);
}
static void
{
}
};
static int
{
const struct sol_flow_node_type_custom_node_types_writer_options *opts;
SOL_FLOW_NODE_TYPE_CUSTOM_NODE_TYPES_WRITER_OPTIONS_API_VERSION,
-EINVAL);
opts = (const struct sol_flow_node_type_custom_node_types_writer_options *)
options;
if (opts->prefix)
mdata->
prefix = strdup(opts->prefix);
return 0;
}
static void
{
}
static int
{
int r;
bool in_value;
printf("%s=%s\n",
in_value ? "true" : "false");
return 0;
}
static int
{
int r;
SOL_FLOW_NODE_TYPE_CUSTOM_NODE_TYPES_LOGIC__IN__IN,
in_value.val % 2 == 0);
return 0;
}
#include "custom-node-types-gen.c"