Overview
EVerest Core uses strongly-typed data structures defined in YAML schema files. These types ensure:- Type Safety: Compile-time and runtime type checking
- Clear Contracts: Well-defined data structures between modules
- Validation: Automatic validation of data against schemas
- Documentation: Self-documenting data structures
Type Definition Location
All type definitions are located in thetypes/ directory:
Type Reference Format
Types are referenced using the format:/type_file#/TypeName
Examples:
/authorization#/ProvidedIdToken/energy#/EnforcedLimits/powermeter#/Powermeter/iso15118#/EnergyTransferMode
Core Type Categories
Authorization Types
Authorization Types
Energy Management Types
Energy Management Types
Source:
types/energy.yamlEnergy flow and limit data structures.EnergyFlowRequest
Complete energy flow request from energy tree nodes:Node UUID for limit enforcement routing
Node type: Undefined, Evse, Generic
Child node requests
Import limit time series
Export limit time series
Target setpoint time series
High priority request requiring immediate handling
Current EVSE state
User-defined optimization targets
EnforcedLimits
Energy limits enforced by EnergyManager:Target node UUID
Validity period in seconds
Enforced limits at root side
Informative schedule (not for enforcement)
LimitsReq
Energy limit request from EVSE to EnergyManager:Total power limit in Watts (positive, for DC or AC)
Max current per phase in Amperes (AC only)
Min current per phase (below this device won’t work)
Max number of phases (1-3)
Min number of phases (1-3)
Phase switching allowed during charging
EvseState
Simplified EVSE state enumeration:EVSE Manager Types
EVSE Manager Types
Source:
types/evse_manager.yamlEVSE manager data structures.SessionEvent
Session lifecycle events:Event type: SessionStarted, SessionFinished, TransactionStarted, TransactionFinished, Enabled, Disabled, etc.
Unique session identifier
Event timestamp (RFC3339 UTC)
Limits
Current EVSE limits:Maximum current in Amperes
Number of available phases (1 or 3)
EVInfo
Electric vehicle information:State of charge percentage (0-100)
Remaining energy needed in Wh
Total battery capacity in Wh
Planned departure time
ISO 15118 Types
ISO 15118 Types
Source:
types/iso15118.yamlISO 15118 protocol data structures (extensive, 68KB file).EnergyTransferMode
Energy transfer mode enumeration:PaymentOption
Payment options:DcEvTargetValues
DC EV target charging values:Target voltage in Volts
Target current in Amperes
DcEvMaximumLimits
DC EV maximum limits:Maximum current in Amperes
Maximum power in Watts
Maximum voltage in Volts
Power Meter Types
Power Meter Types
Source:
types/powermeter.yamlPower metering data structures.Powermeter
Complete power meter dataset:Measurement timestamp (RFC3339 UTC)
Unique meter identifier
Phase sequence error detected
Imported energy measurements:
total: Total imported energy (Wh)L1,L2,L3: Per-phase import (Wh)
Exported energy measurements (same structure)
Instantaneous power measurements:
total: Total power (W)L1,L2,L3: Per-phase power (W)
RMS voltage measurements:
L1,L2,L3: Line-to-neutral voltage (V)DC: DC voltage (V)
Reactive power (VAR)
RMS current measurements:
L1,L2,L3: Per-phase current (A)N: Neutral current (A)DC: DC current (A)
Grid frequency:
L1,L2,L3: Per-phase frequency (Hz)
TransactionReq
Transaction start request:EVSE identifier
Unique transaction identifier
Client/user identifier
Tariff information (for OCMF)
Cable ID if applicable
TransactionStartResponse
Transaction start result:Status: OK, NOT_SUPPORTED, UNEXPECTED_ERROR
Error description if status != OK
Minimum time before transaction can be stopped
Maximum time transaction can run
EVSE Security Types
EVSE Security Types
Display & Session Types
Display & Session Types
Source:
types/display_message.yaml, types/session_cost.yamlUser interface and session data.DisplayMessage
Message to display to user:Message text
Unique message identifier
Priority: AlwaysFront, InFront, NormalCycle
State: Charging, Faulted, Idle, Unavailable
SessionCost
Session cost information:Total session cost
Energy cost component
Time-based cost component
ISO 4217 currency code (e.g., “EUR”, “USD”)
Type Schema Features
Basic Types
string- Text data with optional length constraintsnumber- Floating point numbers with optional min/maxinteger- Whole numbers with optional rangeboolean- True/false valuesarray- Lists of items with optional size constraintsobject- Structured data with properties
Type Constraints
Type References
Types can reference other types:Enumerations
Strict enumeration types:Complete Type File List
| Type File | Description | Key Types |
|---|---|---|
| authorization.yaml | Auth & token types | IdToken, ProvidedIdToken, ValidationResult |
| board_support_common.yaml | Board support types | Common BSP types |
| charger_information.yaml | Charger info | Charger capabilities |
| dc_external_derate.yaml | DC derating | Derate requests |
| display_message.yaml | Display messages | DisplayMessage, MessagePriority |
| energy.yaml | Energy management | EnergyFlowRequest, EnforcedLimits |
| energy_price_information.yaml | Energy pricing | PricePerkWh |
| error_history.yaml | Error tracking | Error records |
| ev_board_support.yaml | EV BSP types | EV simulator types |
| evse_board_support.yaml | EVSE BSP types | Hardware control types |
| evse_manager.yaml | EVSE manager | SessionEvent, EVInfo, Limits |
| evse_security.yaml | Security & certs | Certificate types |
| iso15118.yaml | ISO 15118 protocol | 200+ ISO 15118 types |
| iso15118_vas.yaml | VAS services | Value-added services |
| isolation_monitor.yaml | Isolation monitoring | Isolation status |
| money.yaml | Financial types | Money, Price |
| ocpp.yaml | OCPP types | OCPP 2.0.1 types |
| payment_terminal.yaml | Payment terminals | Payment requests |
| power_supply_DC.yaml | DC power supply | DC capabilities, setpoints |
| powermeter.yaml | Power metering | Powermeter, TransactionReq |
| reservation.yaml | Reservations | Reservation data |
| serial_comm_hub_requests.yaml | Serial comms | Serial communication |
| session_cost.yaml | Session costs | SessionCost |
| system.yaml | System operations | Firmware, logs |
| temperature.yaml | Temperature | Temperature readings |
| text_message.yaml | Text messages | MessageContent |
| uk_random_delay.yaml | UK regulations | Random delay |
| units.yaml | Physical units | Power, Energy, Voltage |
| units_signed.yaml | Signed units | Signed measurements |
Using Types in Code
C++ Type Generation
Types are automatically generated as C++ structures:Type Validation
All data is validated against schemas:- Required fields must be present
- String lengths enforced
- Number ranges checked
- Enum values validated
- Regex patterns matched
Next Steps
- Review Interface Reference to see types in context
- Explore Module Reference for implementations
- Learn Error Handling for error types
- Study source YAML files in
types/directory for complete definitions