Lemonergy · Studio block
Enumeration constant
Emits a declared named enumeration member with its exact integer code.
- Implementation ID
enum-constant- Reviewed
- 2026-10-27
Behavior
Emits one named member of a declared enumeration as a typed integer-coded signal.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
out0 | output | 1 | Output 1; i32 signal. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
enumerationenumeration | 1 | ChargeMode | Explicit enumeration in the worked model. |
membersmembers | 1 | [{"name": "Idle", "value": 0}, {"name": "CC", "value": 1}, {"name": "CV", "value": 2}] | Explicit members in the worked model. |
membermember | 1 | CC | Explicit member in the worked model. |
Equations and rules
output = integer code of selected declared member
Worked example
Enumeration constant — executable model
ChargeMode.CC emits code1; selecting ChargeMode.CV emits code2.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
ResultResult | 0.2 | 1 | 1 | 1e-09 |
Use in a workflow
Enumeration constant — executable model
Emits a declared named enumeration member with its exact integer code.
- Enumeration constant: Emits one named member of a declared enumeration as a typed integer-coded signal.
- Use the block reference for settings and connections.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- Up to256 unique names and signed32 codes. Conflicting declarations are rejected. Use an explicit enumeration-code conversion before ordinary numeric operations.
Reference basis
This compiler and software type contract is defined by the documented behavior and executable example; no external research result or full external API parity is claimed.
Implementation sources
This reference follows the public interface and locally verified numerical checks for an upcoming release.
Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27
docs/glossary/native-block-verification.json
This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)