Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Java Protocol Buffer Location Event #16

Closed
lbressler opened this issue Dec 11, 2014 · 2 comments
Closed

Creating Java Protocol Buffer Location Event #16

lbressler opened this issue Dec 11, 2014 · 2 comments
Labels

Comments

@lbressler
Copy link

I'm trying to send a Location Event from a Java program using the protobufs package.
I've created and sent a multicast LocationEvent message to a 0.9.1 Emane container. I can see the message arriving at the container using tcpdump, but it doesn't do anything.

It looks like we might have to encapsulate the LocationEvent into an Event message.
Is this correct?
And do you by any chance have a sample Java program that constructs and sends a Location Event?

Thanks.
Larry Bressler

@sgalgano
Copy link
Member

Yes, you have to add the serialized LocationEvent to an Event message. Then send the serialized Event message with the size of the serialized message (unsigned 16-bit integer in network byte order) preceding the serialized data.

I don't have an example java program available but there is an example C++ program that sends pathloss events: emane-example-cpp-events. Take a look starting at line 431 of example.cc

There was also a mailing list thread with some java code for sending commeffect events:
http://pf.itd.nrl.navy.mil/pipermail/emane-users/2014-June/000628.html

@lbressler
Copy link
Author

Thanks. This link was extremely helpful:
http://pf.itd.nrl.navy.mil/pipermail/emane-users/2014-June/000628.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants