#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
static int32_t
{
const struct sol_flow_port_description *port_desc;
int err;
if (err < 0) {
fprintf(stderr, "ERROR: could not get irange packet value: %p %s\n",
return err;
}
port_desc = sol_flow_node_get_description_port_out(type, port);
if (!port_desc) {
fprintf(stderr, "ERROR: no output port description for index %" PRIu16
" of node %p\n",
port, n);
return -ENOENT;
}
printf("node type %s port #%" PRIu16 " '%s' (%s): %" PRId32 "\n",
type->description->name, port, port_desc->name,
port_desc->data_type, value);
}
static void
{
static int i = 0;
if (value < 0)
return;
i++;
if (i == 1)
return;
if (i % 2 == 0) {
puts("stop seconds and disconnect output port, will change in 1 minute");
} else {
puts("start seconds and connect output port, will change in 1 minute");
}
}
static void
{
}
static void
{
const char *strv_opts[] = {
"send_initial_packet=1",
NULL
};
int err;
SOL_FLOW_NODE_TYPE_WALLCLOCK_MINUTE, &type);
if (err < 0) {
fputs("could not find type: wallclock/minute\n", stderr);
return;
}
fputs("ERROR: couldn't find ouput port by name: ENABLED\n", stderr);
return;
}
fputs("ERROR: couldn't find ouput port by name: OUT\n", stderr);
return;
}
if (err < 0) {
fputs("could not parse options for wallclock/minute\n", stderr);
return;
}
if (err < 0) {
fputs("could not create options for wallclock/minute\n", stderr);
return;
}
}
static void
{
const char *strv_opts[] = {
"send_initial_packet=1",
NULL
};
int err;
SOL_FLOW_NODE_TYPE_WALLCLOCK_SECOND, &type);
if (err < 0) {
fputs("could not find type: wallclock/second\n", stderr);
return;
}
fputs("ERROR: couldn't find ouput port by name: ENABLED\n", stderr);
return;
}
fputs("ERROR: couldn't find ouput port by name: OUT\n", stderr);
return;
}
if (err < 0) {
fputs("could not parse options for wallclock/second\n", stderr);
return;
}
if (err < 0) {
fputs("could not create options for wallclock/second\n", stderr);
return;
}
}
static void
{
}
static void
{
}