Per-port-kind constants for generating a module's typed port slots.
Holds everything that varies between port kinds in one record.
`member_template` (typed channel/func ports) and `member_ref` (service /
bundle ports) are mutually exclusive. `find_style` / `indexed_find` select
the `connect()` resolution snippet for scalar and indexed ports
respectively; `alias_kind` selects which `using` aliases to emit for the
typed template parameters.
Definition at line 37 of file ports.py.
| str esiaccel.codegen.ports.CppPortKind.indexed_elem_type |
( |
| self, |
|
|
Optional[str] | alias_prefix = None ) |
Return the storage type used inside an `IndexedPorts<T>` for this kind.
Typed ports use the same `TypedFunction<...>` / `TypedReadPort<...>` etc.
that `member_type` produces. MMIO regions, telemetry metrics, and plain
bundle ports are stored as raw pointers because `std::map<int, T&>` is
ill-formed.
Definition at line 81 of file ports.py.
References indexed_elem, and member_type().
| str esiaccel.codegen.ports.CppPortKind.member_type |
( |
| self, |
|
|
Optional[str] | alias_prefix = None ) |
Return the C++ member type string for this kind (no member name).
For typed ports (function/callback/to-host/from-host channels)
`alias_prefix` is required; the returned template parameters are written
using the alias names (`<prefix>Args`, `<prefix>Result`, `<prefix>Data`)
that should be emitted at module-class scope. For non-typed ports (MMIO
regions, telemetry metrics, plain bundles) `alias_prefix` is ignored and
the runtime reference/pointer type is returned directly.
Definition at line 61 of file ports.py.
References member_ref, and member_template.
Referenced by indexed_elem_type().