Main /
hlacerti in Ptolemy
|
Decorates time updating in Ptolemy using HLA time management | |
Send TSO messages (UAV) through the RTI | |
Receive TSO messages (RAV) from the RTI |
A Ptolemy federate also needs a .fed file containing the name of the federation and all attributes that will be published and/or subscribed by the federates.
A federation can be created by splitting a centralized Ptolemy model in several federates.
A federate Aircraft
is created from a (opaque) composite actor AircraftAAct
(Continuous
director) by following these steps:
AircraftSAct
inside.
HlaManager
decorator,
HlaSubscriber
(or HlaAttributeReflector
) actor to each input port of AircraftSAct
,
HlaPublisher
(or HlaAttributeUpdater
) actor to each output port of AircraftSAct
,
See the documentation of HlaAttributeReflector
, HlaAttributeUpdater
and HlaManager
actors for more information. See also the manual.
A Ptolemy federate can automaticaly launches the rtig
process (if no one is running) with the .fed file name as a parameter.
Figure 2 shows a federation with 3 federates -- a Ptolemy federate, a C++ federate and a Java federate -- running in one computer called host
. The rtig
also run in the same computer; it can be launched by the user in a terminal or automatically by the first Ptolemy federate (by setting the parameter launchRTIG
in the HlaManager). The environment variable $CERTI_HOST
must be set to $localhost
.
Figure 3 shows the same federation running over 4 computers: the rtig
is launched by the user on host1
and each federate run in a different computer. In the other three computers, $CERTI_HOST
must be set to host1
. The rtig
is not launched automatically in host2
since $CERTI_HOST=host1
.
You can check here how run Ptolemy demos in one or more computers and here for creating a hlacerti
federation.