Skip to main content

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 the types/ directory:
types/
├── authorization.yaml           # Authentication types
├── board_support_common.yaml    # Board support types
├── charger_information.yaml     # Charger info types
├── energy.yaml                  # Energy management types
├── evse_manager.yaml            # EVSE manager types
├── evse_security.yaml           # Security types
├── iso15118.yaml                # ISO 15118 types
├── powermeter.yaml              # Power meter types
└── ... (30 total type files)

Type Reference Format

Types are referenced using the format: /type_file#/TypeName Examples:
  • /authorization#/ProvidedIdToken
  • /energy#/EnforcedLimits
  • /powermeter#/Powermeter
  • /iso15118#/EnergyTransferMode

Core Type Categories

Source: types/authorization.yamlAuthentication and authorization data structures.

AuthorizationStatus

Authorization result enumeration:
type: string
enum:
  - Accepted         # Authorization granted
  - Blocked          # Token is blocked
  - ConcurrentTx     # Token already in use
  - Expired          # Token expired
  - Invalid          # Invalid token
  - NoCredit         # Insufficient credit
  - NotAllowedTypeEVSE  # Wrong EVSE type
  - NotAtThisLocation   # Wrong location
  - NotAtThisTime       # Outside allowed time
  - Unknown             # Token unknown
  - PinRequired         # PIN required
  - Timeout             # Authorization timeout

IdToken

Identity token structure:
value
string
required
Token value (printable case-insensitive ASCII, max 36 chars)
type
IdTokenType
required
Token type (Central, eMAID, MacAddress, ISO14443, ISO15693, KeyCode, Local, NoAuthorization)
additional_info
array[CustomIdToken]
Additional custom tokens for validation

ProvidedIdToken

Token with metadata from token providers:
request_id
integer
Authorization request ID (e.g., OCPP remoteStartId)
id_token
IdToken
required
The actual identity token
parent_id_token
IdToken
Parent token for hierarchical authorization
authorization_type
AuthorizationType
required
Type: OCPP, RFID, Autocharge, PlugAndCharge, BankCard
connectors
array[integer]
List of allowed connector IDs
prevalidated
boolean
Token already validated by provider
certificate
string
X.509 certificate (PEM format, max 5500 chars)

ValidationResult

Authorization validation result:
authorization_status
AuthorizationStatus
required
Authorization status enum
certificate_status
CertificateStatus
Certificate validation status
expiry_time
string (date-time)
Expiration time (RFC3339 UTC)
allowed_energy_transfer_modes
array[EnergyTransferMode]
Allowed charging modes for this authorization
Source: types/energy.yamlEnergy flow and limit data structures.

EnergyFlowRequest

Complete energy flow request from energy tree nodes:
uuid
string
required
Node UUID for limit enforcement routing
node_type
NodeType
required
Node type: Undefined, Evse, Generic
children
array[EnergyFlowRequest]
required
Child node requests
schedule_import
array[ScheduleReqEntry]
required
Import limit time series
schedule_export
array[ScheduleReqEntry]
required
Export limit time series
schedule_setpoints
array[ScheduleSetpointEntry]
required
Target setpoint time series
priority_request
boolean
High priority request requiring immediate handling
evse_state
EvseState
Current EVSE state
optimizer_target
OptimizerTarget
User-defined optimization targets

EnforcedLimits

Energy limits enforced by EnergyManager:
uuid
string
required
Target node UUID
valid_for
integer
required
Validity period in seconds
limits_root_side
LimitsRes
required
Enforced limits at root side
schedule
array[ScheduleResEntry]
Informative schedule (not for enforcement)

LimitsReq

Energy limit request from EVSE to EnergyManager:
total_power_W
NumberWithSource
Total power limit in Watts (positive, for DC or AC)
ac_max_current_A
NumberWithSource
Max current per phase in Amperes (AC only)
ac_min_current_A
NumberWithSource
Min current per phase (below this device won’t work)
ac_max_phase_count
IntegerWithSource
Max number of phases (1-3)
ac_min_phase_count
IntegerWithSource
Min number of phases (1-3)
ac_supports_changing_phases_during_charging
boolean
Phase switching allowed during charging

EvseState

Simplified EVSE state enumeration:
type: string
enum:
  - Unplugged          # No vehicle connected
  - WaitForAuth        # Waiting for authorization
  - WaitForEnergy      # Waiting for energy allocation
  - PrepareCharging    # Preparing to charge
  - PausedEV           # Paused by EV
  - PausedEVSE         # Paused by EVSE
  - Charging           # Active charging
  - Finished           # Charging complete
  - Disabled           # EVSE disabled
Source: types/evse_manager.yamlEVSE manager data structures.

SessionEvent

Session lifecycle events:
event
SessionEventEnum
required
Event type: SessionStarted, SessionFinished, TransactionStarted, TransactionFinished, Enabled, Disabled, etc.
session_id
string
Unique session identifier
timestamp
string (date-time)
Event timestamp (RFC3339 UTC)

Limits

Current EVSE limits:
max_current
number
Maximum current in Amperes
nr_of_phases_available
integer
Number of available phases (1 or 3)

EVInfo

Electric vehicle information:
soc
number
State of charge percentage (0-100)
remaining_energy_needed
number
Remaining energy needed in Wh
battery_capacity
number
Total battery capacity in Wh
departure_time
string (date-time)
Planned departure time
Source: types/iso15118.yamlISO 15118 protocol data structures (extensive, 68KB file).

EnergyTransferMode

Energy transfer mode enumeration:
type: string
enum:
  # ISO 15118-2
  - AC_single_phase_core
  - AC_three_phase_core
  - DC_core
  - DC_extended
  - DC_combo_core
  - DC_unique
  # ISO 15118-20
  - AC
  - DC
  - AC_BPT          # Bidirectional AC
  - DC_BPT          # Bidirectional DC
  - WPT             # Wireless power transfer
  - WPT_BPT         # Wireless bidirectional

PaymentOption

Payment options:
type: string
enum:
  - Contract        # Plug & Charge
  - ExternalPayment # EIM (external identification)

DcEvTargetValues

DC EV target charging values:
DC_Target_Voltage
number
required
Target voltage in Volts
DC_Target_Current
number
required
Target current in Amperes

DcEvMaximumLimits

DC EV maximum limits:
DC_EVMaximumCurrentLimit
number
required
Maximum current in Amperes
DC_EVMaximumPowerLimit
number
Maximum power in Watts
DC_EVMaximumVoltageLimit
number
required
Maximum voltage in Volts
Source: types/powermeter.yamlPower metering data structures.

Powermeter

Complete power meter dataset:
timestamp
string (date-time)
required
Measurement timestamp (RFC3339 UTC)
meter_id
string
Unique meter identifier
phase_seq_error
boolean
Phase sequence error detected
energy_Wh_import
object
Imported energy measurements:
  • total: Total imported energy (Wh)
  • L1, L2, L3: Per-phase import (Wh)
energy_Wh_export
object
Exported energy measurements (same structure)
power_W
object
Instantaneous power measurements:
  • total: Total power (W)
  • L1, L2, L3: Per-phase power (W)
voltage_V
object
RMS voltage measurements:
  • L1, L2, L3: Line-to-neutral voltage (V)
  • DC: DC voltage (V)
VAR
object
Reactive power (VAR)
current_A
object
RMS current measurements:
  • L1, L2, L3: Per-phase current (A)
  • N: Neutral current (A)
  • DC: DC current (A)
frequency_Hz
object
Grid frequency:
  • L1, L2, L3: Per-phase frequency (Hz)

TransactionReq

Transaction start request:
evse_id
string
required
EVSE identifier
transaction_id
string
required
Unique transaction identifier
client_id
string
required
Client/user identifier
tariff
string
Tariff information (for OCMF)
cable_id
integer
Cable ID if applicable

TransactionStartResponse

Transaction start result:
status
TransactionRequestStatus
required
Status: OK, NOT_SUPPORTED, UNEXPECTED_ERROR
error
string
Error description if status != OK
transaction_min_stop_time
string (date-time)
Minimum time before transaction can be stopped
transaction_max_stop_time
string (date-time)
Maximum time transaction can run
Source: types/evse_security.yamlCertificate and security types.

CertificateType

Certificate type enumeration:
type: string
enum:
  - V2GRootCertificate
  - MORootCertificate
  - CSMSRootCertificate
  - V2GCertificateChain
  - MFRootCertificate

InstallCertificateResult

Certificate installation result:
type: string
enum:
  - Accepted
  - Rejected
  - Failed
Source: types/display_message.yaml, types/session_cost.yamlUser interface and session data.

DisplayMessage

Message to display to user:
message
string
required
Message text
message_id
string
Unique message identifier
priority
MessagePriority
Priority: AlwaysFront, InFront, NormalCycle
state
MessageState
State: Charging, Faulted, Idle, Unavailable

SessionCost

Session cost information:
total_cost
number
Total session cost
energy_cost
number
Energy cost component
time_cost
number
Time-based cost component
currency
string
ISO 4217 currency code (e.g., “EUR”, “USD”)

Type Schema Features

Basic Types

  • string - Text data with optional length constraints
  • number - Floating point numbers with optional min/max
  • integer - Whole numbers with optional range
  • boolean - True/false values
  • array - Lists of items with optional size constraints
  • object - Structured data with properties

Type Constraints

type: string
minLength: 1
maxLength: 36
pattern: "^[A-Z0-9]*$"  # Regex validation

type: number
minimum: 0
maximum: 400

type: array
items:
  type: string
minItems: 1
maxItems: 10

Type References

Types can reference other types:
properties:
  id_token:
    type: object
    $ref: /authorization#/IdToken

Enumerations

Strict enumeration types:
type: string
enum:
  - Value1
  - Value2
  - Value3

Complete Type File List

Type FileDescriptionKey Types
authorization.yamlAuth & token typesIdToken, ProvidedIdToken, ValidationResult
board_support_common.yamlBoard support typesCommon BSP types
charger_information.yamlCharger infoCharger capabilities
dc_external_derate.yamlDC deratingDerate requests
display_message.yamlDisplay messagesDisplayMessage, MessagePriority
energy.yamlEnergy managementEnergyFlowRequest, EnforcedLimits
energy_price_information.yamlEnergy pricingPricePerkWh
error_history.yamlError trackingError records
ev_board_support.yamlEV BSP typesEV simulator types
evse_board_support.yamlEVSE BSP typesHardware control types
evse_manager.yamlEVSE managerSessionEvent, EVInfo, Limits
evse_security.yamlSecurity & certsCertificate types
iso15118.yamlISO 15118 protocol200+ ISO 15118 types
iso15118_vas.yamlVAS servicesValue-added services
isolation_monitor.yamlIsolation monitoringIsolation status
money.yamlFinancial typesMoney, Price
ocpp.yamlOCPP typesOCPP 2.0.1 types
payment_terminal.yamlPayment terminalsPayment requests
power_supply_DC.yamlDC power supplyDC capabilities, setpoints
powermeter.yamlPower meteringPowermeter, TransactionReq
reservation.yamlReservationsReservation data
serial_comm_hub_requests.yamlSerial commsSerial communication
session_cost.yamlSession costsSessionCost
system.yamlSystem operationsFirmware, logs
temperature.yamlTemperatureTemperature readings
text_message.yamlText messagesMessageContent
uk_random_delay.yamlUK regulationsRandom delay
units.yamlPhysical unitsPower, Energy, Voltage
units_signed.yamlSigned unitsSigned measurements

Using Types in Code

C++ Type Generation

Types are automatically generated as C++ structures:
// From /authorization#/IdToken
struct IdToken {
    std::string value;
    IdTokenType type;
    std::optional<std::vector<CustomIdToken>> additional_info;
};

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

Build docs developers (and LLMs) love