Commit cd7ccf44 authored by Sven Robertz's avatar Sven Robertz
Browse files

small changes

parent c11dc39c
NB! Before trying to build and run this example, make sure you have built the LabComm compiler
by running "ant jar" in the main directory (../../ seen from here).
This is a very simple example with one labcomm file ( defining two samples.
Example source code: Encoders and decoders written in Java and C.
......@@ -18,10 +18,12 @@ int main(int argc, char *argv[]) {
simple_IntString is;
is.x = 24;
is.s = "Hello, LabComm!";
printf("Encoding IntString, x=%d, s=%s\n", is.x, is.s);
labcomm_encode_simple_IntString(encoder, &is);
simple_TwoInts ti;
ti.a = 13;
ti.b = 37;
printf("Encoding TwoInts, a=%d, b=%d\n", ti.a, ti.b);
labcomm_encode_simple_TwoInts(encoder, &ti);
java -cp .:../../lib/java:gen Encoder encoded_data
java -cp .:../../lib/java:gen Decoder encoded_data
./example_decoder encoded_data
./example_encoder encoded_data
java -cp .:../../lib/java:gen Decoder encoded_data
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment