The concepts of HLA, one by one

This page goes through the concepts of HLA 4 (IEEE 1516-2025) in the order you meet them when you write a federate. Each section says what the concept is and why you would use it, names the services of IEEE 1516.1-2025 involved (with their clause numbers), and points to where MicroRTI implements it. The services marked † are callbacks: the RTI invokes them on the federate.

The running example

The repository has a chat room written as an HLA federation: the chat program in crates/microrti-examples. Each copy of chat is a federate. Its FOM module, Chat.xml, defines two classes:

KindClassMembersData type
object classParticipant: somebody in the roomattribute NameHLAunicodeString
interaction classCommunication: one line saidparameters Sender and MessageHLAunicodeString

Start an RTI and two chat programs named alice and bob (the five-minute tour has the commands). Here is bob’s terminal while alice joins, says one line and leaves:

* bob joined Chat at tcp://127.0.0.1:58062; type a line to say it, end the input (Ctrl-D) to leave
* alice joined
<alice> hello bob
* alice left
* left Chat; the room is closed

The three lines in the middle are callbacks from the RTI; the sections below say which.

Federation execution

A federation execution is one running federation, known by a name that is unique on its RTI. The first federate creates it and gives the FOM modules (and, if it wants, the logical time representation). Federates join it, work, and resign; when nobody is left, a federate destroys it. One RTI can run any number of federation executions side by side, and nothing passes from one to another: two test runs on the same RTI under different names do not see each other.

Services: Create Federation Execution (4.5), Destroy Federation Execution (4.6), which is refused while federates are joined, and List Federation Executions (4.7), answered by Report Federation Executions † (4.8).

In MicroRTI, the chat creates Chat when it does not exist, and its last participant destroys it, hence “the room is closed” above. microrti-cli list prints the federation executions of an RTI with their time representation:

Chat	HLAfloat64Time

The handlers are in crates/microrti-engine/src/services/federation.rs.

Federate

A federate is one member of a federation execution, usually a program of its own: a simulator, a recorder, a bridge to real equipment, a monitoring tool. It connects to the RTI (Connect, 4.2), joins a federation execution under a name that must be unique there and a federate type of its choice (Join Federation Execution, 4.11), and at the end resigns (Resign Federation Execution, 4.12) and disconnects (Disconnect, 4.3). When it resigns it says what happens to the object instances it still owns: deleted, released for others to take over, both, or nothing.

A federate that vanishes without resigning, because its process crashed or its network went away, is lost. The RTI then resigns it with the automatic resign directive of the FOM (4.1.6). Chat.xml sets it to CancelThenDeleteThenDivest, so a crashed participant’s object is deleted and the others see * alice left.

In MicroRTI, a session whose connection breaks, or that stays silent for rti_timeout_heart seconds (180 by default), becomes inactive. The federate can reconnect and resume it as if nothing had happened. If it has not done so after rti_timeout_purge seconds (600 by default), it is lost; until then the others still see it in the room.

One process may hold several federates: restaurant demo runs a waiter and a guest in the same program. microrti-cli members Chat lists who is joined, with the federate type:

HLAfederate-2	microrti-cli
bob	chat

HLAfederate-2 is the name MicroRTI gives a federate that joins without one (here the monitor of microrti-cli, federate handle 2). The server’s log uses that name too, with the federate type: federate joined ... federation=Chat federate=HLAfederate-2 federate_type=microrti-cli.

The RTI

The Run-Time Infrastructure (RTI) is the software every federate talks to. It keeps the federation executions, knows which federate publishes and subscribes to what, and routes every update and interaction. It enforces the rules (only the owner of an attribute may update it, nobody may send into another federate’s past) and coordinates logical time. Federates never open connections to each other.

In MicroRTI the RTI is microrti-engine, a deterministic state machine without any input or output of its own. It runs in one of two hosts: the microrti server, which puts it behind Federate Protocol listeners on TCP, TLS, WebSocket and secure WebSocket, or EmbeddedRti in the client library, which runs it inside your process (an RTI inside your process). The architecture page shows how the pieces fit.

Ambassadors and callbacks

Everything between a federate and the RTI goes through two objects. The RTI ambassador is the one your code calls, with one method per service: register this object, send this interaction, advance my time to 10. The federate ambassador is the one your code supplies and the RTI calls back, with one method per callback: an object was discovered, an interaction arrived, your time advance is granted.

You choose when callbacks run with the callback model, given at Connect (4.2):

  • evoked: callbacks wait in a queue until your code asks for them with Evoke Callback (10.57) or Evoke Multiple Callbacks (10.58), so they run on your thread, inside your main loop;
  • immediate: callbacks run as soon as they arrive, on a thread of the client library, while your own threads do something else.

A few services may not be invoked from inside a callback (12.8), and Disable Callbacks and Enable Callbacks (10.60, 10.59) pause and resume delivery.

In the Rust client of MicroRTI, the callbacks of one federate never run at the same time, whatever the model. The RTI ambassador is RtiAmbassador, and the federate ambassador is either your implementation of the FederateAmbassador trait or a closure that receives Callback values, wrapped in CallbackFn. The callback models are CallbackModel::Evoked and CallbackModel::Immediate; in Python they are CallbackModel.EVOKED and CallbackModel.IMMEDIATE, and you subclass FederateAmbassador. These lines come from minimal_federate.rs, a whole federate in about thirty lines:

let (queue, callbacks) = std::sync::mpsc::channel();
let federate_ambassador = CallbackFn::new(move |callback: Callback| queue.send(callback).or(Ok(())));
let rti = RtiAmbassador::new();
let configuration = RtiConfiguration::new().with_rti_address(address);
rti.connect_with_configuration(federate_ambassador, CallbackModel::Evoked, &configuration)?;
// ...
rti.evoke_callback(Duration::from_millis(100))?;
for callback in callbacks.try_iter() {
    if let Callback::ReceiveInteraction { parameter_values: said, .. } = callback {
        // ...
    }
}

The callback model lives in the client library alone: the RTI sends callbacks over the Federate Protocol session as they become due, and the client holds them back or delivers them. chat takes --callback-model evoked or immediate (the default) to show both.

FOM modules and the MIM

The FOM says what a federation can exchange: object classes with their attributes, interaction classes with their parameters, the data type of each attribute and parameter, and a few more tables (dimensions for regions, transportation types, the logical time types, switches). It is an XML document in the format of IEEE 1516.2-2025, the Object Model Template.

A FOM is usually split into modules: a base module that every federate uses, plus modules for one domain or one federate. The federate that creates the federation execution gives a list of modules, and a federate that joins may add more. The RTI merges them into the current FOM of the federation execution, which the standard calls the FDD, FOM Document Data (4.1.4). Modules must agree where they overlap, or the RTI refuses them with InconsistentFOM.

The MIM (MOM and Initialization Module, Annex G of 1516.1) is a module the RTI loads before all others. It defines the roots HLAobjectRoot and HLAinteractionRoot, the classes of the Management Object Model, the standard data types such as HLAunicodeString and HLAinteger32BE, the transportation types HLAreliable and HLAbestEffort, and the time types. Your modules build on it: Chat.xml uses HLAunicodeString without defining it.

In MicroRTI, microrti-fom reads, checks and merges modules, and has the standard MIM built in. It reads the 2025 format and also the 2010 format of HLA Evolved. Joining with more modules never changes a handle given out before. A federation execution can be created with a MIM of your own (the “with MIM” variants of Create Federation Execution), as long as it extends the standard one.

Object classes and interaction classes

An object class describes something that lasts and has a state: a participant, a vehicle, a radar. Its attributes are the parts of that state. An object instance is one such thing during a run: alice’s Participant in the chat room. One federate registers it and the others discover it; from then on the owner sends new values of its attributes and the others receive them. The RTI keeps track of every instance until it is deleted, so a federate that arrives late still discovers what exists.

An interaction class describes an event: something that happens once, such as one line said in the chat room, a shot fired or a customer paying. Its parameters carry the details. An interaction is not kept anywhere: a federate that subscribes later never sees the ones sent before.

When you design a FOM and hesitate between the two, ask whether a federate that joins late should learn about the thing. If it should, make it an object; if it only counts at the moment it happens, make it an interaction.

Classes form two trees, under HLAobjectRoot and HLAinteractionRoot, and a subclass inherits the attributes or parameters of its parents. A federate receives things as the class it subscribed to. In the Restaurant FOM of IEEE 1516.2, a guest that subscribes to Food.Drink and to Food.Drink.Soda discovers a glass of water as a Drink and a soda as a Soda. restaurant demo runs that case and checks it.

In the FOM everything has a name, but services take handles, short values the RTI hands out. A federate asks for them once with Get Object Class Handle (10.4), Get Attribute Handle (10.9), Get Interaction Class Handle (10.13) and Get Parameter Handle (10.15). Values of attributes and parameters travel as bytes that the RTI does not read; their encoding follows the data types of the FOM (IEEE 1516.2, 4.14). MicroRTI has microrti-encoding for that, and the Python client has microrti.encoding.

Declaration management: publish and subscribe

Before a federate registers an instance of a class or sends an interaction, it declares that it publishes the class: “I may produce these”. To receive anything, it subscribes: “send me these”. The RTI routes with these declarations: an update goes only to the federates that subscribed to that class and attribute, an interaction only to those that subscribed to its class.

Services: Publish Object Class Attributes (5.2), Publish Interaction Class (5.4), Subscribe Object Class Attributes (5.8) and Subscribe Interaction Class (5.10), with their Unpublish and Unsubscribe counterparts (5.3, 5.5, 5.9, 5.11). HLA 4 adds directed interactions, addressed to one object instance and received by the federates that own attributes of it (or that subscribed to them universally), with their own publish and subscribe services (5.6, 5.7, 5.12, 5.13) and Send Directed Interaction (6.14).

The RTI can also tell a publisher whether anybody listens, so that it stays quiet otherwise: Start Registration For Object Class † and Stop Registration For Object Class † (5.14, 5.15), Turn Interactions On † and Turn Interactions Off † (5.16, 5.17). A federate turns these advisories on or off with switches (10.35, 10.41).

Each chat publishes Participant (attribute Name) and Communication, then subscribes to both. In MicroRTI the handlers are in services/declaration.rs of the engine.

Object management

Object management is the traffic itself. This is what one federate calls, and what the others receive:

The federate callsThe subscribers receive
Register Object Instance (6.8)Discover Object Instance † (6.9)
Update Attribute Values (6.10)Reflect Attribute Values † (6.11)
Send Interaction (6.12)Receive Interaction † (6.13)
Delete Object Instance (6.16)Remove Object Instance † (6.17)
Request Attribute Value Update (6.21)the owner receives Provide Attribute Value Update † (6.22) and answers with an update

In bob’s terminal at the top of this page, * alice joined is Discover Object Instance, <alice> hello bob is Receive Interaction and * alice left is Remove Object Instance. An instance can be registered under a name reserved first with Reserve Object Instance Name (6.2); the chat names each participant’s object after the participant that way. Every update and interaction may carry a user-supplied tag, bytes the RTI passes along without reading them.

microrti-cli monitor joins as an observer, subscribes to every class of the federation execution’s FOM, which it reads from the RTI, and prints each callback, decoded. Started after bob and before alice, in the same conversation, it printed:

microrti-cli --rti tcp://127.0.0.1:58062 monitor Chat
monitoring Chat: 1 object class, 1 interaction class
discover    bob class=HLAobjectRoot.Participant federate=bob
discover    alice class=HLAobjectRoot.Participant federate=alice
reflect     alice class=HLAobjectRoot.Participant federate=alice Name="alice"
interaction HLAinteractionRoot.Communication federate=alice Sender="alice" Message="hello bob"
remove      alice class=HLAobjectRoot.Participant federate=alice

bob was in the room before the monitor subscribed, and the monitor still discovered him: discovery covers the instances that already exist. In MicroRTI the handlers are in services/object.rs.

Ownership

At any moment each attribute of each object instance has at most one owner, the only federate allowed to update it. The federate that registers an instance owns the attributes it publishes; the RTI owns the attributes of the Management Object Model. Ownership can move. One federate gives attributes away, at once (Unconditional Attribute Ownership Divestiture, 7.2) or only when somebody takes them (Negotiated Attribute Ownership Divestiture, 7.3); another asks for them (Attribute Ownership Acquisition, 7.8, or Attribute Ownership Acquisition If Available, 7.9); Query Attribute Ownership (7.17) and Is Attribute Owned By Federate (7.19) tell who owns what.

You need it for hand-overs, such as an aircraft whose position comes from a flight simulator until it lands and from an airport ground model afterwards, and to split one object between federates: one federate updates the position of a vehicle, another its fuel.

The chat does not transfer anything. The interoperability scenario of the repository (interop_scenario.rs) moves one attribute from federate A to B and back, and MicroRTI keeps the negotiation state in crates/microrti-engine/src/ownership.

Time management

Without time management, the RTI delivers everything as soon as it can, in the order it arrives: receive order. The chat works like that. With time management, messages carry a timestamp in logical time, federates advance their logical time only when the RTI grants it, and the RTI makes sure a time-constrained federate never receives a message from its own past. A federate that sends timestamped messages is time-regulating; one that receives them in timestamp order is time-constrained.

Services: Enable Time Regulation (8.2), Enable Time Constrained (8.5), Time Advance Request (8.8), Next Message Request (8.10), Time Advance Grant † (8.14), and the variants of update, send and delete that take a timestamp. Logical time, explained covers all of it with an example.

MicroRTI implements clause 8 in services/time.rs and src/timemgmt, with the two standard time representations, HLAfloat64Time (the default) and HLAinteger64Time.

Data distribution management

Subscriptions work per class: a federate that subscribes to a class receives every instance of it, wherever it is. In a large scenario that is too much, since a sensor in one corner of the map has no use for updates from the opposite corner. Data distribution management (DDM) narrows delivery with regions. The FOM defines dimensions, axes of integers from 0 to an upper bound onto which the model maps something like a grid cell or a frequency band, and says which classes use them. A federate creates a region and sets a range on each dimension, the lower bound included and the upper bound excluded. Subscribers attach regions to their subscriptions, senders to their updates and interactions, and the RTI delivers only where a sender’s region overlaps a subscriber’s.

Services: Create Region (9.2), Set Range Bounds (10.28), Commit Region Modifications (9.3), Subscribe Object Class Attributes With Regions (9.8), Subscribe Interaction Class With Regions (9.10), Register Object Instance With Regions (9.5), Associate Regions For Updates (9.6), Send Interaction With Regions (9.12), Delete Region (9.4).

The interoperability scenario of the repository shows it with the FOM module Interop.xml, whose interaction class Zoned uses a dimension Zone from 0 to 100. Federate B subscribes to Zoned with a region covering 10 to 20. Federate A sends one Zoned interaction with its region set to 0 to 5, then another with 15 to 16. B receives only the second. The filtering happens in the RTI, so the first interaction never travels to B.

MicroRTI implements 9.2 to 9.13 in services/ddm.rs and src/regions.

Synchronization points

A synchronization point is a label that a set of federates must all reach before any of them goes on, for example “everybody has joined and subscribed, start now”. One federate registers the point. The RTI confirms the registration and announces the point to every federate (or to the set given), and each federate reports when it has reached it. When all have, the RTI tells them the federation is synchronized. The RTI pauses nothing itself: each federate waits for that last callback before it goes on.

Services: Register Federation Synchronization Point (4.14), Confirm Synchronization Point Registration † (4.15), Announce Synchronization Point † (4.16), Synchronization Point Achieved (4.17), Federation Synchronized † (4.18).

MicroRTI keeps synchronization points, save and restore in src/coordination of the engine.

Save and restore

A federation save is a checkpoint of the whole federation under a label, now or at a logical time; a restore brings every federate back to it. The RTI saves its own state (instances, ownership, subscriptions, regions, logical times, queued messages) and tells every federate to save its own. Each federate must therefore be able to write and read its internal state under the label it is given.

Saving: Request Federation Save (4.19), Initiate Federate Save † (4.20), Federate Save Begun (4.21), Federate Save Complete (4.22), Federation Saved † (4.23). Restoring: Request Federation Restore (4.27), Confirm Federation Restoration Request † (4.28), Federation Restore Begun † (4.29), Initiate Federate Restore † (4.30), Federate Restore Complete (4.31), Federation Restored † (4.32). Abort and status services complete the set (4.24 to 4.26, 4.33 to 4.35).

MicroRTI saves the whole state of the federation execution, the Management Object Model included. By default the microrti server keeps saves in its memory, so they last as long as the RTI process. With the setting save_directory, each save is a file that survives a restart of the RTI, and a restore can read it later (federation saves).

The Management Object Model

The Management Object Model (MOM, clause 11) is how the RTI describes the federation to the federates, with HLA’s own objects and interactions. The MIM defines its object classes under HLAmanager, and the RTI keeps one HLAfederation instance for the federation execution and one HLAfederate instance per joined federate, whose attributes give its name, type, logical time, counters and more. It also defines interactions to ask for reports, to change switches of a federate, and to invoke services on a federate’s behalf. Any federate can subscribe to them, so monitoring and control tools are ordinary federates. The HLAfederation object also carries the current FDD as an XML document (attribute HLAcurrentFDD, 4.1.4.2): that is how microrti-cli learns the FOM of a federation execution it joins.

microrti-cli monitor --mom subscribes to the MOM classes too. On the chat room, with bob alone in it:

microrti-cli --rti tcp://127.0.0.1:58062 monitor Chat --mom --seconds 2
monitoring Chat: 5 object classes, 94 interaction classes
discover    HLAmanager-federate-1 class=HLAobjectRoot.HLAmanager.HLAfederate federate=federate 00000000
discover    HLAmanager-federate-2 class=HLAobjectRoot.HLAmanager.HLAfederate federate=federate 00000000
discover    HLAmanager-federation class=HLAobjectRoot.HLAmanager.HLAfederation federate=federate 00000000
discover    bob class=HLAobjectRoot.Participant federate=bob

There is one HLAfederate instance for bob and one for the monitor itself. The producing federate 00000000 is how MicroRTI marks what the RTI sends. The MOM lives in src/mom of the engine; the choices made where clause 11 leaves room are listed in the engine README.

The Federate Protocol

Up to HLA Evolved (2010), federates were written against the programming interfaces of the standard, mostly in Java and C++. Each RTI product shipped its own library implementing them, linked into every federate, and that library spoke the product’s own protocol to its RTI. A federate was built for one RTI product, and federates using different products could not share a federation.

HLA 4 defines a standard protocol for that link, the Federate Protocol (12.13). The service calls and callbacks are protobuf messages (Annex D), carried by a session layer with heartbeats and resume after a network fault, over TCP, TLS, WebSocket or secure WebSocket. Any program that speaks it can be a federate, in any language that has a client library, and the RTI and the client library can come from different sources.

Between processes, MicroRTI’s server and its Rust and Python clients speak only this protocol. The protocol layer is microrti-fedpro; the default ports are 15164 for TCP and 15165 for TLS. Federates built on the open-source Pitch FedProClient library, in Java and in C++, run against the microrti server, and a C++ federate of that library has shared the chat room with the Rust chat program (C++ federates).

Next steps