Navigation

core.logical.false

Inputs

Function has no inputs

Outputs

Name

Type

Title

Description

output

core.type.bool

Output

None

Parameters

Function has no parameters

State variables

Function has no state variables

Usage XML code snippet

core_logical_false snippet for FLOW configuration file
<f name="false" by_spec="core.logical.false">
</f>

Function’s artifacts

declaration.py
from fspeclib import *


Function(
    name='core.logical.false',
    title=LocalizedString(
        en='False constant'
    ),
    description=None,
    outputs=[
        Output(
            name='output',
            title='Output',
            value_type='core.type.bool'
        )
    ]
)
core_logical_false_exec.c
#include "core_logical_false.h"

void core_logical_false_exec(
    core_logical_false_outputs_t *o
)
{
    o->output = FALSE;
}
core_logical_false.h
/**
 *  Automatically-generated file. Do not edit!
 */

#ifndef FSPEC_CORE_LOGICAL_FALSE_H
#define FSPEC_CORE_LOGICAL_FALSE_H

#include <stdint.h>
#include <eswb/types.h>

#include "function.h"

/* Include declaration of dependency types */
#include "core_type_bool.h"

/**
 * @brief Outputs of `core.logical.false` function
 */
typedef struct core_logical_false_outputs_ {
    core_type_bool_t output; /// Output

} core_logical_false_outputs_t;

typedef struct core_logical_false_eswb_descriptors_ {
    eswb_topic_descr_t out_all;
} core_logical_false_eswb_descriptors_t;

typedef struct core_logical_false_interface_ {
    core_logical_false_outputs_t o;
    core_logical_false_eswb_descriptors_t eswb_descriptors;
} core_logical_false_interface_t;

void core_logical_false_exec(core_logical_false_outputs_t *o);

#endif // FSPEC_CORE_LOGICAL_FALSE_H
core_logical_false_spec.c
/**
 *  Automatically-generated file. Do not edit!
 */

#include "core_logical_false.h"
#include <eswb/types.h>

static const param_spec_t *params[1] = {
    NULL
};

static const input_spec_t *inputs[1] = {
    NULL
};

static const output_spec_t o_output = {
    .name = "output",
    .annotation = "Output",
    .flags = 0
};

static const output_spec_t *outputs[2] = {
    &o_output,
    NULL
};

fspec_rv_t core_logical_false_call_init_outputs(
    void *dh,
    const func_conn_spec_t *conn_spec,
    eswb_topic_descr_t mounting_td,
    const char *func_name
);

void core_logical_false_call_exec(void *dh);

const function_spec_t atomic_core_logical_false_spec = {
    .name = "core.logical.false",
    .annotation = "False constant",
    .inputs = inputs,
    .outputs = outputs,
    .params = params
};

const function_calls_t atomic_core_logical_false_calls = {
    .interface_handle_size = sizeof(core_logical_false_interface_t),
    .init = NULL,
    .init_inputs = NULL,
    .init_outputs = core_logical_false_call_init_outputs,
    .pre_exec_init = NULL,
    .exec = core_logical_false_call_exec,
    .set_params = NULL
};

const function_handler_t atomic_core_logical_false_handler = {
    .spec = &atomic_core_logical_false_spec,
    .calls = &atomic_core_logical_false_calls,
    .extension_handler = NULL
};
core_logical_false_interface.c
/**
 *  Automatically-generated file. Do not edit!
 */

#include "core_logical_false.h"

#include "error.h"
#include <eswb/api.h>
#include <eswb/topic_proclaiming_tree.h>
#include <eswb/errors.h>

fspec_rv_t core_logical_false_interface_outputs_init(
    core_logical_false_interface_t *interface,
    const func_conn_spec_t *conn_spec,
    eswb_topic_descr_t mounting_td,
    const char *func_name
)
{
    TOPIC_TREE_CONTEXT_LOCAL_DEFINE(cntx, 2);
    core_logical_false_outputs_t out;
    eswb_rv_t rv;

    topic_proclaiming_tree_t *rt = usr_topic_set_struct(cntx, out, func_name);

    usr_topic_add_struct_child(cntx, rt, core_logical_false_outputs_t, output, "output", tt_int32);
    rv = eswb_proclaim_tree(mounting_td, rt, cntx->t_num, &interface->eswb_descriptors.out_all);
    if (rv != eswb_e_ok) {
        return fspec_rv_publish_err;
    }

    return fspec_rv_ok;
}

fspec_rv_t core_logical_false_interface_outputs_update(core_logical_false_interface_t *interface)
{
    eswb_rv_t rv;

    rv = eswb_update_topic(interface->eswb_descriptors.out_all, &interface->o);
    if (rv != eswb_e_ok) {
        return 1;
    }

    return 0;
}

void core_logical_false_interface_update(core_logical_false_interface_t *interface)
{
    core_logical_false_exec(&interface->o);
    core_logical_false_interface_outputs_update(interface);
}

fspec_rv_t core_logical_false_call_init_outputs(
    void *dh,
    const func_conn_spec_t *conn_spec,
    eswb_topic_descr_t mounting_td,
    const char *func_name
)
{
    core_logical_false_interface_t *interface = (core_logical_false_interface_t*) dh;
    return core_logical_false_interface_outputs_init(interface, conn_spec, mounting_td, func_name);
}

void core_logical_false_call_exec(void *dh)
{
    core_logical_false_interface_t *interface = (core_logical_false_interface_t*) dh;
    core_logical_false_interface_update(interface);
}