reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
port.h
Go to the documentation of this file.
1
64
65
#ifndef PORT_H
66
#define PORT_H
67
68
#include <stdlib.h>
69
#include <stdbool.h>
70
#include "
lf_token.h
"
// Defines token types and lf_port_base_t, lf_sparse_io_record
71
73
#define LF_SPARSE_WIDTH_THRESHOLD 10
74
79
#define LF_SPARSE_CAPACITY_DIVIDER 10
80
88
typedef
struct
lf_multiport_iterator_t
{
89
int
next
;
90
int
idx
;
// Index in the record of next or -1 if lf_multiport_next has not been called.
91
lf_port_base_t
**
port
;
92
int
width
;
93
}
lf_multiport_iterator_t
;
94
102
lf_multiport_iterator_t
_lf_multiport_iterator_impl
(
lf_port_base_t
** port,
int
width);
103
110
#define lf_multiport_iterator(in) \
111
(_lf_multiport_iterator_impl((lf_port_base_t**)self->_lf_##in, self->_lf_##in##_width))
112
118
int
lf_multiport_next
(
lf_multiport_iterator_t
* iterator);
119
120
#endif
/* PORT_H */
lf_token.h
Definitions for token objects, reference-counted wrappers around dynamically-allocated messages.
_lf_multiport_iterator_impl
lf_multiport_iterator_t _lf_multiport_iterator_impl(lf_port_base_t **port, int width)
Definition
port.c:61
lf_multiport_next
int lf_multiport_next(lf_multiport_iterator_t *iterator)
Definition
port.c:101
lf_multiport_iterator_t
Definition
port.h:88
lf_multiport_iterator_t::port
lf_port_base_t ** port
Definition
port.h:91
lf_multiport_iterator_t::idx
int idx
Definition
port.h:90
lf_multiport_iterator_t::width
int width
Definition
port.h:92
lf_multiport_iterator_t::next
int next
Definition
port.h:89
lf_port_base_t
Base type for ports. Port structs are customized types because their payloads are type specific....
Definition
lf_token.h:140
include
core
port.h
Generated by
1.13.2