'How to know if a federate has joined a federation in HLA
I am using HLA and the Portico RTI and I have a situation in which I have to know that if particular federates have joined the federation or not. Can someone help with this. This may be very basic but i am very new to HLA. Thanks in advance.
Solution 1:[1]
You can use the Management Object Model (MOM) to query the joined federates in a federation.
Subscribe to the object class HLAobjectRoot.HLAmanager.HLAfederate
and you will be updated with all the federates in the federation, including your own.
Solution 2:[2]
ante's solution is standard procedure, but here is an alternative method:
Assuming you have assigned a unique name(string) to that particular federate upon joining. You can call "Get Federate Handle service" of RTIambassador, with the federate's name as input parameter. A handle of the federate will be returned if it exists in the federation, otherwise an exception will be thrown.
Solution 3:[3]
Check your RID file (RTI.rid). It must be in the directory that your federate is executed from. There are some parameters you can change to see all the logs. Delete the # acoording to log level you want
# (1.2) Portico Log Level
# Specify the level that Portico will log at. Valid values are:
TRACE, DEBUG, INFO, WARN,
# ERROR, FATAL, OFF. The default value is "WARN".
#
# portico.loglevel = INFO
# portico.loglevel = TRACE
# portico.loglevel = DEBUG
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ante |
Solution 2 | |
Solution 3 | jrodolfo |