real-logic / simple-binary-encoding

Simple Binary Encoding (SBE) - High Performance Message Codec
Apache License 2.0
3.08k stars 519 forks source link

SbeOftDecoder #237

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello, I am trying to run the examples/cpp98/SbeOtfDecoder.cpp and examples/cpp98/SbeExample.cpp. I am able to compile SbeOtfDecoder but I am not able to generate a .sbeir file to pass to it. Which xml file in the repository is the "message-declarations-file.xml" for the example: $ java -Dsbe.ir.filename= -jar sbe.jar

As for the SbeExample.cpp. It includes baseline/MessageHeader.hpp and baseline/Car.hpp. Where is the baseline directory?

Let me know if additional information is needed. Thanks

SercanKaraoglu commented 9 years ago

You are gonna have it when you run code generator using SbeTool

ghost commented 9 years ago

Ok. I am not to familiar with java. I ran this: javac uk/co/real_logic/sbe/SbeTool.java Which generated all these .java and .class files in the sbe/ directory. Did I miss something?

SercanKaraoglu commented 9 years ago

I use sbe for java so I have maven plugin that does code generation, according to readme file, you can use ant build for cpp examples

tmontgomery commented 9 years ago

The paths and command lines are in the build.xml file. Check under the examples:java target to see what the steps are. You can run that from ant and it will do what you want. To run it by hand, just do the steps it is doing.

In short, the .sbeir file is generated from the schema via the SbeTool main at the same time as the codecs are generated. So, it is: (1) run SbeTool with appropriate paths and options, (2) compile example and OTF example, and (3) run examples.

ghost commented 9 years ago

Thanks fellas. I got side tracked with the documentation and got out of order. Let me give this a go and let you know if I have any more questions.

Thanks again. Greatly appreciate it.

tmontgomery commented 9 years ago

No worries. If this makes sense, feel free to close.

ghost commented 9 years ago

Thanks guys.