Setting up a DIS Network

58 views
Skip to first unread message

shane tye

unread,
Apr 27, 2016, 4:55:41 PM4/27/16
to OpenEaagles
Hello!

I am in the process of converting simulation middleware to use OpenEaagles DIS functionality. I have figured out how to integrate the PDUs we need, however I am now trying to initialize the network.

The old system we were using needed a port, destination address, exercise, site and app IDs to set up a connection. Looking at your nethandler example I see that a config file is used and parsed, I believe to set the slots in the slot table. I was wondering if this is the only setup required as I don't see any Init calls anywhere. Perhaps my lack of understanding of the slot table system is to blame and certain initialization protocols happen automatically if something is slotted.

I know this question is worded terribly but if more information is needed to give an answer I would be more than happy to provide it.

Really I just want to know what the best way to set up a multicast DIS network would be.

Thanks,
Shane

Elias Tarasov

unread,
Apr 28, 2016, 5:04:58 AM4/28/16
to OpenEaagles
Hello, Shane!

I've never used DIS personally.
However, for the basic network communication (TCP/IP) you need to add slots (IP and port) for the class that you want to use with the NetHandler.
Also, you need to add class member(s) (NetHandler or inherited from NetHandler type).
Other stuff are being done for you by OE.
testNetHandler illustrates how this could be achieved.

What exactly goes wrong?
You have parser error? Or compilation/runtime?

shane tye

unread,
Apr 28, 2016, 9:12:56 AM4/28/16
to OpenEaagles
At the moment I'm not running the program just trying to set it up.

I think from your answer and more study of the code I understand.
If I want to use the NetIO class and the UDPMultiCastHandler I would need to add the handler to the NetIO slot table and use the parser to fill in the
port/address information of the handler?


Elias Tarasov

unread,
Apr 28, 2016, 11:47:30 AM4/28/16
to OpenEaagles
Basically, yes.
NetIO class already has two pointers to NetHandler objects: netInput and netOutput.
So you need to setup both of them.
.......
NetIO :
( YourNetIOObject
  // Here go netInput slot which is actually an instance of the NetHandler class (UDPMulticastHandler is inherited from NetHandler)
  netInput :
  (
    UDPMulticastHandler  //Or whatever handler you want
       // Here go slots for the UDPMulticastHandler in turn.
       multicastGroup: "224.0.0.251" // Multicast group


       port: 2010 // Multicast port


       localPort: 2011 // Port to send from
       shared: 1 // Shared socket
  )
  netOutput :
  (
    //Same idea for the output.
  )
)

shane tye

unread,
Apr 28, 2016, 4:28:13 PM4/28/16
to OpenEaagles
Thank you Elias, this looks to be what I needed. I have another question which you may be able to answer.

In the examples the namspaces are changed i.e. Basic to base ect.

Why is this, and is there an easy way to build the examples or a step I'm missing to get around these changes?

As it is I can't run the examples due to this.

Elias Tarasov

unread,
Apr 28, 2016, 4:58:44 PM4/28/16
to OpenEaagles
Yes, it is updated version of examples according to latest OE update.
So you have to update OE first, then build it, then update and build examples.
After that, you will be able to run examples.
To workaround OE's build issue (HLA build problems) follow this advice: https://groups.google.com/forum/#!topic/openeaagles/an2270__uvo
If you already have your own code that uses old OE namespaces, then you need to rewrite it to follow new requirements.



shane tye

unread,
Apr 29, 2016, 3:40:58 PM4/29/16
to OpenEaagles
Thanks Elias,

Everything is going much better, the one question/problem I have left is;

Is it possible to put a custom component-derived class in a slot? I am trying to do this and the edl parser does not like my config file.
I have managed to make a config work using Existing OpenEaagles classes work, just not this. Do I maybe need to add my class to the Factory.h factory method?
In order to do this I would need to add my custom class to the OE library which I would rather leave as it is and make my code live in a new solution.

Here is my config file

//
// PDU Generator
//
( PDUGen
 (PDUNetwork:
 (
  netInput:       ( UdpUnicastHandler  port: 3001 shared: true )
  netOutput:      ( UdpUnicastHandler  ipAddress: "127.0.0.1"  port: 3001 localPort: 3002 shared: true )
 )
 )
 )


Thanks again for your help,
Shane

Elias Tarasov

unread,
Apr 30, 2016, 4:50:34 AM4/30/16
to OpenEaagles
Yes, you have to add your Component-derived class to the factory.
For the native OE classes it also must be done.

Otherwise parser says something like "form doesn't exist"
Reply all
Reply to author
Forward
0 new messages