reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
python_action.h
Go to the documentation of this file.
1
34#ifndef PYTHON_ACTION_H
35#define PYTHON_ACTION_H
36
37#include "pythontarget.h"
38#include <structmember.h>
39#include <stdbool.h>
41#include "lf_types.h"
42
43extern PyTypeObject py_action_capsule_t;
44
68
85typedef struct {
86 PyObject_HEAD PyObject*
87 action; // Hold the void* pointer to a C action instance. However, passing void* directly
88 // to Python is considered unsafe practice. Instead, this void* pointer to the C action
89 // will be stored in a PyCapsule. @see https://docs.python.org/3/c-api/capsule.html
90 PyObject* value; // This value will be copied from the C action->value
91 bool is_present; // Same as value, is_present will be copied from the C action->is_present
94
95#endif
Type definitions that are widely used across different parts of the runtime.
PyTypeObject py_action_capsule_t
Definition python_action.c:135
#define FEDERATED_CAPSULE_EXTENSION
Definition python_capsule_extension.h:75
#define FEDERATED_GENERIC_EXTENSION
Definition python_capsule_extension.h:74
Definition python_action.h:85
bool is_present
Definition python_action.h:91
PyObject_HEAD PyObject * action
Definition python_action.h:87
PyObject * value
Definition python_action.h:90
Definition python_action.h:56
bool has_value
Definition python_action.h:63
int source_id
Definition python_action.h:64
self_base_t * parent
Definition python_action.h:62
PyObject * value
Definition python_action.h:65
lf_token_t * token
Definition python_action.h:58
lf_action_internal_t _base
Definition python_action.h:61
token_type_t type
Definition python_action.h:57
size_t length
Definition python_action.h:59
bool is_present
Definition python_action.h:60
Definition lf_types.h:307
Definition lf_token.h:94
The base type for all reactor self structs.
Definition lf_types.h:276
Type information for tokens. Specifically, this struct contains the fields needed to support token ty...
Definition lf_token.h:67