Add a component to monitor the system

15 views
Skip to first unread message

Troy Daniels

unread,
Dec 27, 2016, 6:26:45 PM12/27/16
to OpenEaagles
I have an OpenEaagles simulation that was developed by a third party.  I am attempting to monitor the simulation and send messages to a separate application that we have a developed.  I am somewhat confused about the best way to do this.  

The first thing that I attempted to do was extend SimLogger and add that as a logger.  That seemed to mostly work, although since component only has one logger, it interfered with the existing logger that wrote events to a database.  It also did not really feel like what I was writing was a logger.

It seemed more natural to try to add it to the Simulation as a Component.  However, either events are not transmitted to components in general, or I did not find the way to enable this.  So while I was able to define the component and the updateTC method is called, I do not appear to get any sort of notification when something happens in the simulation.

I could also add the existing logger as a logger in my component and forward log events to it when I am done processing them.  That seems somewhat hackish but can certainly be made to work.

Is there a preferred way to do what I am trying to do?

Doug

unread,
Jan 17, 2017, 12:18:07 AM1/17/17
to OpenEaagles
Adding a component that does something via inspection of it's parent does seems like a simple solution.  In the input file, will need to attach it to the parent in the right location.

What you are asking is interesting, it should be easy to create a custom component that does something of interest, attach it, and in either updateTc() and/or updateData() perform some action.

Sounds like I need to add another example that demonstrates the technique.  If you want to post the code, I'll try to take a look.

Doug

andrea....@gmail.com

unread,
Jun 29, 2017, 10:31:07 AM6/29/17
to OpenEaagles
Doug,
I tried to do somthing similar, but I've have a problem never seen. I defined an object of type Component, dooing something (in this case initiate and run an Encounter model between two RPAS to test an Airborn Collision Avoidance System SW), and I defined two slot names, but at runtime they are not recognized. I taylored the application at the very minimum, the main program, the Encounter class and the edl file.
At run time I get the error NMA not known, even if I defined it with the SLOTTABLE macro.
I attach the file...don't you mind to have a look? I'm afraid the problem is in the Parent Class: maybe the Component class is not the proper class if I put the Encounter class as a component of the Worldmodel class...?

Thank a lot
Andrea
dafne.edl
Encounter.cpp
Encounter.hpp
main.cpp
Reply all
Reply to author
Forward
0 new messages