The HELICS C++ Application API is the primary interface for building co-simulation federates in C++. It provides a high-level object-oriented layer on top of the HELICS core, exposing classes for value-based data exchange, message passing, filtering, and time management. All classes live in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GMLC-TDC/HELICS/llms.txt
Use this file to discover all available pages before exploring further.
helics namespace and are declared in headers under include/helics/application_api/.
The public API is defined in Public_API.md and is subject to backwards-compatible stability guarantees across minor versions within a major version. Functions may be marked deprecated between minor versions but will not be removed until the next major version. The C shared library API (helics.h) is the primary driver of versioning decisions.
Translators and the global time coordinator option are in Beta and subject to finalization. Vector subscriptions and vector inputs are subject to change. Query data formats may update in minor releases.
CMake integration
HELICS installs CMake package config files that allow you to link against the C++ API with a few lines:HELICS::helics. Both targets export the necessary include directories automatically.
Public API headers
The following headers form the stable public API. All are installed toinclude/helics/application_api/.
| Header | Purpose |
|---|---|
ValueFederate.hpp | Value-based data exchange (publications/inputs) |
MessageFederate.hpp | Message-based data exchange (endpoints) |
CombinationFederate.hpp | Combined value and message federate |
CallbackFederate.hpp | Callback-driven federate (Beta) |
Federate.hpp | Base federate class with timing and lifecycle |
FederateInfo.hpp | Federate configuration structure |
Publications.hpp | Publication object and publish methods |
Inputs.hpp | Input object and get methods |
Subscriptions.hpp | Subscription aliases |
Endpoints.hpp | Endpoint object for message federates |
Filters.hpp | Filter objects for message manipulation |
Translators.hpp | Translator objects between value and message interfaces |
BrokerApp.hpp | Programmatic broker management |
CoreApp.hpp | Programmatic core management |
queryFunctions.hpp | Query helper functions |
helicsTypes.hpp | Type definitions and enumerations |
Key classes
Federate
Federate is the base class for all federate types. It manages the federate lifecycle, time requests, properties, and flags. It is declared in Federate.hpp.
Lifecycle methods
Lifecycle methods
Time management
Time management
Properties and flags
Properties and flags
ValueFederate
ValueFederate extends Federate with publication and input registration, enabling time-stamped value exchange between federates. Declared in ValueFederate.hpp.
MessageFederate
MessageFederate extends Federate with endpoint registration for packet-based message exchange. Declared in MessageFederate.hpp.
CombinationFederate
CombinationFederate inherits from both ValueFederate and MessageFederate using virtual inheritance, exposing the full set of both APIs. Use this when a single federate needs to both publish values and send messages. Declared in CombinationFederate.hpp.
CallbackFederate
CallbackFederate is a callback-driven federate where the user registers functions to be called at each time step rather than driving a simulation loop manually. It is declared in CallbackFederate.hpp and is considered Beta.
Publication
The Publication object is returned by registerPublication and is used to send values:
Input
The Input object is returned by registerInput / registerSubscription and is used to receive values:
FederateInfo
FederateInfo holds configuration for a federate before it is created. It can be loaded from a JSON/TOML file or set directly via properties:
BrokerApp and CoreApp
BrokerApp and CoreApp allow programmatic creation and management of brokers and cores within a C++ process:
Complete example
Versioning and backwards compatibility
HELICS follows semantic versioning. The public C++ API defined inPublic_API.md is backwards source-compatible across minor versions within a major version (e.g., all 3.x releases). Functions deprecated in one minor version will not be removed until the next major version. The C shared library ABI is the primary versioning driver; the C++ API may require recompilation across releases even when the source interface does not change.
For full, auto-generated API documentation including all method signatures and parameter descriptions, see the HELICS Doxygen reference.
C API Reference
Stable C shared library interface for FFI and language interop
Language Bindings
Python, Julia, Java, MATLAB, and more
Configuration Options
JSON configuration file reference
Doxygen
Auto-generated C++ API documentation