diff --git a/.gitignore b/.gitignore index 002536b55491e783ffb65cd79f9a9922c96cf0e9..19ab6d0f43e5be031d8830f125d79f27abd644c3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,9 @@ lib/c/liblabcomm.so.1 lib/c/liblabcomm2006.so.1 lib/c/liblabcomm2006.so lib/c/liblabcomm2006.a -lib/c/liblabcomm20141009.so.1 -lib/c/liblabcomm20141009.so -lib/c/liblabcomm20141009.a +lib/c/liblabcomm2014.so.1 +lib/c/liblabcomm2014.so +lib/c/liblabcomm2014.a lib/c/test/test_labcomm lib/c/test/test_labcomm_basic_type_encoding lib/c/test/test_labcomm_copy @@ -16,7 +16,7 @@ lib/c/test/test_labcomm_generated_encoding lib/c/test/test_labcomm_pthread_scheduler lib/c/test/test_signature_numbers compiler/AST/ -compiler/labComm.jar +compiler/labcomm_compiler.jar encoded_data encoded_data06 gen diff --git a/compiler/build.xml b/compiler/build.xml index 402790ce82c5d938925c83b681ea60fa49d0ba27..b7e303599c60ffa3993180e0eb47a43578d37081 100644 --- a/compiler/build.xml +++ b/compiler/build.xml @@ -77,7 +77,7 @@ classpath="tools/jastadd2.jar"/> <!-- delete all .class files recursively --> <delete> <fileset dir="." includes="**/*.class"/> - <fileset dir="." includes="labComm.jar"/> + <fileset dir="." includes="labcomm_compiler.jar"/> </delete> </target> diff --git a/examples/dynamic/dynamic.sh b/examples/dynamic/dynamic.sh index 77fb6bcd1779a75a4cee43b106cfdb51c54b8053..8700a19b401df66f4c7ec12f009335eee73c8ecc 100644 --- a/examples/dynamic/dynamic.sh +++ b/examples/dynamic/dynamic.sh @@ -1,6 +1,6 @@ #dummy script to test the on-the-fly compilation -java -jar ../../compiler/labComm.jar --java=gen --javapackage=gen simple.lc +java -jar ../../compiler/labcomm_compiler.jar --java=gen --javapackage=gen simple.lc javac -cp .:gen:../../lib/java/labcomm.jar gen/*.java @@ -9,7 +9,7 @@ javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java javac -cp .:gen:../../lib/java/labcomm.jar test/StaticDecoder.java # compile dynamic part -javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java +javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java javac test/HandlerContext.java @@ -17,7 +17,7 @@ javac test/HandlerContext.java java -cp .:gen:../../lib/java//labcomm.jar test.StaticEncoder encoded_data # run dynamic part -java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple.lc handlers2.txt encoded_data dynamic_out +java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple.lc handlers2.txt encoded_data dynamic_out # run static decoder diff --git a/examples/dynamic/dynamic_type.sh b/examples/dynamic/dynamic_type.sh index 8059a968d048e6959704896ec7c7c570a336b028..0f7fcc1a7d7663cd409083eed425df541d433374 100644 --- a/examples/dynamic/dynamic_type.sh +++ b/examples/dynamic/dynamic_type.sh @@ -1,6 +1,6 @@ #dummy script to test the on-the-fly compilation -java -jar ../../compiler/labComm.jar --java=gen --javapackage=gen simple.lc +java -jar ../../compiler/labcomm_compiler.jar --java=gen --javapackage=gen simple.lc javac -cp .:gen:../../lib/java/labcomm.jar gen/*.java @@ -9,7 +9,7 @@ javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java javac -cp .:gen:../../lib/java/labcomm.jar test/StaticDecoder.java # compile dynamic part -javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java +javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java javac test/HandlerContext.java @@ -17,7 +17,7 @@ javac test/HandlerContext.java java -cp .:gen:../../lib/java//labcomm.jar test.StaticEncoder encoded_data # run dynamic part -java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple_type.lc handlers_type.txt encoded_data dynamic_out +java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple_type.lc handlers_type.txt encoded_data dynamic_out # run static decoder diff --git a/examples/dynamic/static.sh b/examples/dynamic/static.sh index ff1b8362de6978ad252cdf047d69fcdfb4d47f15..361e5fe4f4f0694c5c0fdda15c87934ace1850db 100644 --- a/examples/dynamic/static.sh +++ b/examples/dynamic/static.sh @@ -2,7 +2,7 @@ # run labcomm compilation -java -jar ../../compiler/labComm.jar --java=gen --javapackage=gen simple.lc +java -jar ../../compiler/labcomm_compiler.jar --java=gen --javapackage=gen simple.lc # compile example programs javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java diff --git a/examples/dynamic/test.sh b/examples/dynamic/test.sh index 78907161c3f99d7e0f4b1eeaddf63cf5d21577f2..f98bc3717fad2955c68bba46958745d7deb529e8 100644 --- a/examples/dynamic/test.sh +++ b/examples/dynamic/test.sh @@ -1,7 +1,7 @@ #dummy script to test the on-the-fly compilation -javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java +javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java javac test/HandlerContext.java -java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple.lc handlers2.txt encoded_data +java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple.lc handlers2.txt encoded_data diff --git a/examples/dynamic/test_type.sh b/examples/dynamic/test_type.sh index 3463d1a6a93da52025ff4217bb65078935fa2e5b..99b60eadc23732a9a0d59ea0ed80965ad6d36cab 100644 --- a/examples/dynamic/test_type.sh +++ b/examples/dynamic/test_type.sh @@ -1,7 +1,7 @@ #dummy script to test the on-the-fly compilation -javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java +javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java javac test/HandlerContext.java -java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple_type.lc handlers_type.txt encoded_data +java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple_type.lc handlers_type.txt encoded_data diff --git a/examples/jgrafchart/Makefile b/examples/jgrafchart/Makefile index 2fbc37af107950d839e93cbe7207e1fc2ce05f73..38da6a22cd3c2bff9a9534f3372d64fe3878ed74 100644 --- a/examples/jgrafchart/Makefile +++ b/examples/jgrafchart/Makefile @@ -1,5 +1,6 @@ LCDIR=../.. -LCC=java -jar ${LCDIR}/compiler/labcomm_compiler.jar +LABCOMM_JAR=../../compiler/labcomm_compiler.jar +LABCOMM=java -jar $(LABCOMM_JAR) CLASSPATH=.:${LCDIR}/lib/java/labcomm.jar JAVA_PKG=labcommTCPtest SAMPLENAME=foo @@ -11,7 +12,7 @@ TLCFILE=turtle1 TAUX=turtle_enc.c turtle_dec.c ${JAVA_PKG}/gen/foo.java: ${LCFILE}.lc - ${LCC} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $< + ${LABCOMM} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $< ${JAVA_PKG}/gen/${SAMPLENAME}.class: ${JAVA_PKG}/gen/${SAMPLENAME}.java javac -cp ${CLASSPATH} $< @@ -37,14 +38,14 @@ client: client.c ${LCFILE}.c ${AUX} ${AUX:.c=.h} testserver: testserver.c ${LCFILE}.c ${AUX} ${AUX:.c=.h} ${CC} -o $@ testserver.c ${AUX} ${LCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm - + turtleclient: turtleclient.c ${TLCFILE}.c ${TAUX} ${TAUX:.c=.h} ${CC} -o $@ turtleclient.c ${TAUX} ${TLCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm ${LCFILE}.c : ${LCFILE}.lc - ${LCC} -C ${LCFILE}.lc + ${LABCOMM} -C ${LCFILE}.lc ${TLCFILE}.c : ${TLCFILE}.lc - ${LCC} -C ${TLCFILE}.lc + ${LABCOMM} -C ${TLCFILE}.lc all: client testserver ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/client/TestClient.class turtleclient diff --git a/examples/simple/compile.sh b/examples/simple/compile.sh index aee346fc6a014440643db876e2c6b704646ce16f..61c171dd9e492836bc5f0bdd2298a9056982628c 100644 --- a/examples/simple/compile.sh +++ b/examples/simple/compile.sh @@ -7,15 +7,15 @@ mkdir -p gen java -jar ../../compiler/labcomm_compiler.jar --java=gen --c=gen/simple.c --h=gen/simple.h --python=gen/simple.py simple.lc -javac -cp ../../lib/java/labcomm20141009.jar:. gen/*.java Encoder.java Decoder.java +javac -cp ../../lib/java/labcomm2014.jar:. gen/*.java Encoder.java Decoder.java gcc -Wall -Werror -Wno-unused-function \ -I. -I../../lib/c -L../../lib/c \ -o example_encoder example_encoder.c gen/simple.c \ - -llabcomm20141009 -Tlabcomm.linkscript + -llabcomm2014 -Tlabcomm.linkscript gcc -Wall -Werror -I . -I ../../lib/c -L../../lib/c \ -o example_decoder example_decoder.c gen/simple.c \ - -llabcomm20141009 -Tlabcomm.linkscript + -llabcomm2014 -Tlabcomm.linkscript # For version 2006 diff --git a/examples/simple/example_encoder.py b/examples/simple/example_encoder.py index fea1dbcf9209b21e0bde16891234b4a2e1468c94..c89f1348841dafb81e0eb2ba5e20c53c5606b79b 100755 --- a/examples/simple/example_encoder.py +++ b/examples/simple/example_encoder.py @@ -5,7 +5,7 @@ import sys import simple if __name__ == '__main__': - version = sys.argv[2] if len(sys.argv) == 3 else "LabComm20141009" + version = sys.argv[2] if len(sys.argv) == 3 else "LabComm2014" encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')), version) encoder.add_decl(simple.theTwoInts.signature) encoder.add_decl(simple.IntString.signature) diff --git a/examples/simple/run.sh b/examples/simple/run.sh index bc9a10a7ddddf939350ea9b1f78c556d0872a5eb..750d122cc2cf8215b8bf6e8942bf7fa3e3d7bbd9 100644 --- a/examples/simple/run.sh +++ b/examples/simple/run.sh @@ -5,17 +5,17 @@ echo "*** Running example for version 2013 ***" echo "********************************************" echo -java -cp .:../../lib/java/labcomm20141009.jar:gen Encoder encoded_data +java -cp .:../../lib/java/labcomm2014.jar:gen Encoder encoded_data ./example_decoder encoded_data PYTHONPATH=../../lib/python:gen ./example_encoder.py encoded_data -java -cp .:../../lib/java/labcomm20141009.jar:gen Decoder encoded_data +java -cp .:../../lib/java/labcomm2014.jar:gen Decoder encoded_data ./example_encoder encoded_data -java -cp .:../../lib/java/labcomm20141009.jar:gen Decoder encoded_data +java -cp .:../../lib/java/labcomm2014.jar:gen Decoder encoded_data echo "running python decoder (from wiki_example):" -PYTHONPATH=../../lib/python ../wiki_example/example_decoder.py encoded_data LabComm20141009 +PYTHONPATH=../../lib/python ../wiki_example/example_decoder.py encoded_data LabComm2014 echo echo "*******************************************************" diff --git a/examples/tcp/Makefile b/examples/tcp/Makefile index 18fedc5ef9ab867993683a7855f5ee15d4ea11d1..ae9a5c4ce042a9cf5ae864853de95f8d540b4d95 100644 --- a/examples/tcp/Makefile +++ b/examples/tcp/Makefile @@ -1,5 +1,6 @@ LCDIR=../.. -LCCJAR=${LCDIR}/compiler/labcomm_compiler.jar # the LabComm compiler +LABCOMM_JAR=../../compiler/labcomm_compiler.jar +LABCOMM=java -jar $(LABCOMM_JAR) LCLJAR=${LCDIR}/lib/java/labcomm.jar # the LabComm library JAVA_PKG=labcommTCPtest @@ -14,17 +15,16 @@ run : ${JAVA_PKG}/Example.class ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/ ### dependencies and parts #################### ############################################### -LCC=java -jar ${LCCJAR} CLASSPATH=.:${LCLJAR} -${LCCJAR} : +${LABCOMM_JAR} : cd ${LCDIR} && make make-compiler ${LCLJAR} : cd ${LCDIR}/lib/java && make labcomm.jar ${JAVA_PKG}/gen/FooSample.java: test.lc ${LCCJAR} - ${LCC} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $< + ${LABCOMM} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $< ${JAVA_PKG}/gen/FooSample.class: ${JAVA_PKG}/gen/FooSample.java test.lc ${LCLJAR} javac -cp ${CLASSPATH} $< diff --git a/examples/user_types/Makefile b/examples/user_types/Makefile index d1f74b23e5473de49b9f857bff0331469987d4b5..e1ecb379bf28079e9d9d358cf33e5462fa01afc0 100644 --- a/examples/user_types/Makefile +++ b/examples/user_types/Makefile @@ -49,11 +49,11 @@ build : ${CC} ${CFLAGS} ${LDFLAGS} -Wall -Werror -Wno-unused-function \ -I. -I${LCDIR}/lib/c -L${LCDIR}/lib/c \ -o example_encoder example_encoder.c ${GENDIR}/test.c \ - -llabcomm20141009 + -llabcomm2014 ${CC} ${CFLAGS} ${LDFLAGS} -Wall -Werror -I . -I ${LCDIR}/lib/c -L${LCDIR}/lib/c \ -o example_decoder example_decoder.c ${GENDIR}/test.c \ - -llabcomm20141009 + -llabcomm2014 buildcs: Encoder.exe Decoder.exe @@ -74,7 +74,7 @@ run: @./example_decoder encoded_data_j @echo "************ running python decoder (from wiki_example):" - @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_j LabComm20141009 + @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_j LabComm2014 @echo "************ running C encoder: *****************" @./example_encoder encoded_data_c @@ -86,10 +86,10 @@ run: @./example_decoder encoded_data_c @echo "************ running python decoder (from wiki_example):" - @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm20141009 + @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm2014 @echo "************ running python encoder: *****************" - @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm20141009 + @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm2014 @echo "************ running Java decoder: *****************" @java -cp .:${LCDIR}/lib/java/labcomm.jar:${GENDIR} Decoder encoded_data_p @@ -98,7 +98,7 @@ run: @./example_decoder encoded_data_p @echo "************ running python decoder (from wiki_example):" - PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm20141009 + PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm2014 runwcs: Encoder.exe Decoder.exe export LD_LIBRARY_PATH=${LCDIR}/lib/c/ @@ -132,13 +132,13 @@ runwcs: Encoder.exe Decoder.exe @./example_decoder encoded_data_c @echo "************ running python decoder (from wiki_example):" - @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm20141009 + @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm2014 @echo "************ running C# decoder: *****************" @./Decoder.exe encoded_data_c @echo "************ running python encoder: *****************" - @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm20141009 + @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm2014 @echo "************ running Java decoder: *****************" @java -cp .:${LCDIR}/lib/java/labcomm.jar:${GENDIR} Decoder encoded_data_p @@ -147,7 +147,7 @@ runwcs: Encoder.exe Decoder.exe @./example_decoder encoded_data_p @echo "************ running python decoder (from wiki_example):" - PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm20141009 + PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm2014 @echo "************ running C# decoder: *****************" @./Decoder.exe encoded_data_p @@ -162,7 +162,7 @@ runwcs: Encoder.exe Decoder.exe @./example_decoder encoded_data_cs @echo "************ running python decoder (from wiki_example):" - @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_cs LabComm20141009 + @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_cs LabComm2014 @echo "************ running C# decoder: *****************" @./Decoder.exe encoded_data_cs diff --git a/examples/user_types/example_encoder.py b/examples/user_types/example_encoder.py index 3da1fbcb2284de29abb3fa11d0f52629808ccfba..cdd2135ef8d971fd36e9cbee282871f0474672ca 100755 --- a/examples/user_types/example_encoder.py +++ b/examples/user_types/example_encoder.py @@ -5,7 +5,7 @@ import sys import test if __name__ == '__main__': - version = sys.argv[2] if len(sys.argv) == 3 else "LabComm20141009" + version = sys.argv[2] if len(sys.argv) == 3 else "LabComm2014" encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')), version) encoder.add_decl(test.twoLines.signature) tl = dict( diff --git a/examples/wiki_example/example_decoder.py b/examples/wiki_example/example_decoder.py index 6f5813e375a1fb8071f8cef24a224d7155ce5a8e..03b01c7955e8205c50159bd2587bc53e9893fd67 100755 --- a/examples/wiki_example/example_decoder.py +++ b/examples/wiki_example/example_decoder.py @@ -4,7 +4,7 @@ import labcomm import sys if __name__ == "__main__": - version = sys.argv[2] if len(sys.argv) == 3 else "LabComm20141009" + version = sys.argv[2] if len(sys.argv) == 3 else "LabComm2014" d = labcomm.Decoder(labcomm.StreamReader(open(sys.argv[1])), version) while True: diff --git a/examples/wiki_example/run b/examples/wiki_example/run index c2f3bd5d0c0a91665395beffbe0c1cf692fb53bf..baaf2a929e8683e1f003034c87d80292ad8badb0 100755 --- a/examples/wiki_example/run +++ b/examples/wiki_example/run @@ -1,7 +1,7 @@ #!/bin/sh # Auto generate code from .lc file -java -jar ../../compiler/labComm.jar \ +java -jar ../../compiler/labcomm_compiler.jar \ --c=example.c --h=example.h \ --java=. \ --cs=example.cs \ diff --git a/lib/RAPID/README b/lib/RAPID/README index 0e45345ca329482257fdef1d75d46c5f49026776..e59711f6ff138ff8aa123ebb1bafdc1d4f6cf1cc 100644 --- a/lib/RAPID/README +++ b/lib/RAPID/README @@ -34,7 +34,7 @@ or $ VAR Encoder e; $ Init_Encoder e, st; This will read/write the version of LabComm to ensure compatibility, current -version is "LabComm20141009". +version is "LabComm2014". # Initiate the labcomm samples: LabComm trusts the application to manage each sample. It requests the samples, diff --git a/lib/c/Makefile b/lib/c/Makefile index a3a495be81ef3c8af6e0443c6c8b577ce430bb27..1f3a59a8e5989503552177f49b222124cf17c870 100644 --- a/lib/c/Makefile +++ b/lib/c/Makefile @@ -1,7 +1,7 @@ ## Macros include os_compat.mk -ALL_DEPS=liblabcomm.a liblabcomm.so.1 liblabcomm2006.a liblabcomm2006.so.1 liblabcomm20141009.a liblabcomm20141009.so.1 +ALL_DEPS=liblabcomm.a liblabcomm.so.1 liblabcomm2006.a liblabcomm2006.so.1 liblabcomm2014.a liblabcomm2014.so.1 # TODO: Support for Codesourcery ARM toolchain. @@ -66,10 +66,10 @@ liblabcomm.a: $(OBJS) $(OBJS2006) liblabcomm.so.1: $(OBJS:%.o=%.pic.o) $(OBJS2006:%.o=%.pic.o) $(call MAKESHARED,$@,$@,$^) -liblabcomm20141009.a: $(OBJS) +liblabcomm2014.a: $(OBJS) ar -r $@ $^ -liblabcomm20141009.so.1: $(OBJS:%.o=%.pic.o) +liblabcomm2014.so.1: $(OBJS:%.o=%.pic.o) $(call MAKESHARED,$@,$@,$^) liblabcomm2006.a: $(OBJS2006) @@ -149,8 +149,8 @@ distclean: clean $(RM) liblabcomm.a $(RM) liblabcomm2006.so.1 $(RM) liblabcomm2006.a - $(RM) liblabcomm20141009.so.1 - $(RM) liblabcomm20141009.a + $(RM) liblabcomm2014.so.1 + $(RM) liblabcomm2014.a # Extra dependencies $(TEST_DIR)/test_labcomm_basic_type_encoding.o: labcomm_private.h diff --git a/lib/c/labcomm.c b/lib/c/labcomm.c index 8b9ade29aed4e3bbaec648b649c964be79b922b8..416574fbb46280474412f848209649f476226ebb 100644 --- a/lib/c/labcomm.c +++ b/lib/c/labcomm.c @@ -37,7 +37,7 @@ #include "labcomm_ioctl.h" #include "labcomm_dynamic_buffer_writer.h" -#define CURRENT_VERSION "LabComm20141009" +#define CURRENT_VERSION "LabComm2014" /* Unwrapping reader/writer functions */ #define UNWRAP_ac(rw, ac, ...) ac diff --git a/lib/c/labcomm_decoder.c b/lib/c/labcomm_decoder.c index 9d760e8e0a58bb4a41f507f8b13a52a7f4a2a54a..b2a7da38e1c3450f102722f3effc6792ab7f8875 100644 --- a/lib/c/labcomm_decoder.c +++ b/lib/c/labcomm_decoder.c @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define CURRENT_VERSION "LabComm20141009" +#define CURRENT_VERSION "LabComm2014" #include <errno.h> #include "labcomm.h" diff --git a/lib/c/labcomm_encoder.c b/lib/c/labcomm_encoder.c index f9125055274fed7fa03e37ac553cc470608117e7..17cce0073fc4f51a83509bf3ada29d9c324619df 100644 --- a/lib/c/labcomm_encoder.c +++ b/lib/c/labcomm_encoder.c @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define CURRENT_VERSION "LabComm20141009" +#define CURRENT_VERSION "LabComm2014" #include <errno.h> #include "labcomm.h" diff --git a/lib/csharp/se/lth/control/labcomm/Constant.cs b/lib/csharp/se/lth/control/labcomm/Constant.cs index 1b5a44c7dfe0f0a08dc3b77a59efe40b8040482c..170cb55055244cf0ccc53bc3daca5a0ecc7260cf 100644 --- a/lib/csharp/se/lth/control/labcomm/Constant.cs +++ b/lib/csharp/se/lth/control/labcomm/Constant.cs @@ -2,7 +2,7 @@ namespace se.lth.control.labcomm { public class Constant { - public const string CURRENT_VERSION = "LabComm20141009"; + public const string CURRENT_VERSION = "LabComm2014"; /* * Allowed packet tags diff --git a/lib/java/Makefile b/lib/java/Makefile index 68e4cae41ae50aaeb742075aba7dc3f5004a7fa0..0816199091587880bbd97a51df70721a6b1d49f4 100644 --- a/lib/java/Makefile +++ b/lib/java/Makefile @@ -14,13 +14,13 @@ MODULES=Constant \ Writer \ WriterWrapper -all: labcomm.jar labcomm20141009.jar labcomm2006.jar +all: labcomm.jar labcomm2014.jar labcomm2006.jar labcomm.jar: gen/JAVAC echo $@ cd gen ; jar cf ../$@ se/lth/control/labcomm/*.class se/lth/control/labcomm2006/*.class -labcomm20141009.jar: gen/JAVAC +labcomm2014.jar: gen/JAVAC echo $@ cd gen ; jar cf ../$@ se/lth/control/labcomm/*.class @@ -39,5 +39,5 @@ gen/JAVAC: $(MODULES:%=se/lth/control/labcomm/%.java) $(MODULES:%=se/lth/control .PHONY: clean clean: - rm -rf labcomm.jar labcomm2006.jar labcomm20141009.jar gen + rm -rf labcomm.jar labcomm2006.jar labcomm2014.jar gen diff --git a/lib/java/se/lth/control/labcomm/Constant.java b/lib/java/se/lth/control/labcomm/Constant.java index 3d6d53a649d75fbb3820470402a1eef7a48f4636..c5a580a401993d3386721394b5870d8cc7825936 100644 --- a/lib/java/se/lth/control/labcomm/Constant.java +++ b/lib/java/se/lth/control/labcomm/Constant.java @@ -2,7 +2,7 @@ package se.lth.control.labcomm; public class Constant { - public static final String CURRENT_VERSION = "LabComm20141009"; + public static final String CURRENT_VERSION = "LabComm2014"; /* * Allowed packet tags diff --git a/lib/java/se/lth/control/labcomm2006/DecoderChannel.java b/lib/java/se/lth/control/labcomm2006/DecoderChannel.java index 95f237ee2bbceed75949ac33f8ad1907649c2018..34acf506ffc7e6597a0bb12f1b3bb4c79874d8c4 100644 --- a/lib/java/se/lth/control/labcomm2006/DecoderChannel.java +++ b/lib/java/se/lth/control/labcomm2006/DecoderChannel.java @@ -134,7 +134,7 @@ public class DecoderChannel implements Decoder { } /** - method for API harmonization with labcomm20141009. + method for API harmonization with labcomm2014. Labcomm2006 encodes lengths etc as 32 bit ints. */ public int decodePacked32() throws IOException { diff --git a/lib/java/se/lth/control/labcomm2006/EncoderChannel.java b/lib/java/se/lth/control/labcomm2006/EncoderChannel.java index 18fbc33e234aac24f8ed9d01c7ab6bec1961f943..b164754c5e76fbf40e530dcc2e0817b767327776 100644 --- a/lib/java/se/lth/control/labcomm2006/EncoderChannel.java +++ b/lib/java/se/lth/control/labcomm2006/EncoderChannel.java @@ -81,7 +81,7 @@ public class EncoderChannel implements Encoder { } /** - method for API harmonization with labcomm20141009. + method for API harmonization with labcomm2014. Labcomm2006 encodes lengths etc as 32 bit ints. */ public void encodePacked32(long value) throws IOException { diff --git a/lib/python/labcomm/LabComm.py b/lib/python/labcomm/LabComm.py index 019559c01ed1ffadc6392628c7eea6461b513d8b..cb65c2b89ad25c4171030e59251e6f54d52721aa 100644 --- a/lib/python/labcomm/LabComm.py +++ b/lib/python/labcomm/LabComm.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# LabComm20141009 packet has the following layout +# LabComm2014 packet has the following layout # # +----+----+----+----+ # | id (packed32) @@ -11,7 +11,7 @@ # | ... # +----+-- # -# LabComm220141009 SAMPLE_DEF: +# LabComm2014 SAMPLE: # # +----+----+----+----+ # | id = 0x02 (packed32) @@ -29,7 +29,7 @@ # | ... # +----+-- # -# LabComm220141009 TYPE_DEF: (as SAMPLE_DEF, but signatures are hierarchical, +# LabComm2014 TYPE_DEF: (as SAMPLE_DEF, but signatures are hierarchical, # i.e., may contain references to other types # # +----+----+----+----+ @@ -48,7 +48,7 @@ # | ... # +----+-- # -# LabComm220141009 TYPE_BINDING +# LabComm2014 TYPE_BINDING # # +----+----+----+----+ # | id = 0x04 (packed32) @@ -60,7 +60,7 @@ # | type number (packed32) # +----+----+----+----+ # -# LabComm20141009 User data: +# LabComm2014 User data: # # +----+----+----+----+ # | id >= 0x00000040 (packed32) @@ -151,7 +151,7 @@ import types import struct as packer -DEFAULT_VERSION = "LabComm20141009" +DEFAULT_VERSION = "LabComm2014" # Allowed packet tags i_VERSION = 0x01 @@ -177,7 +177,7 @@ i_STRING = 0x27 # Version testing def usePacketLength(version): - return version in [ None, "LabComm20141009" ] + return version in [ None, "LabComm2014" ] class length_encoder: def __init__(self, encoder): @@ -619,7 +619,7 @@ class Encoder(Codec): super(Encoder, self).__init__() self.writer = writer self.version = version - if self.version in [ "LabComm20141009" ]: + if self.version in [ "LabComm2014" ]: self.encode_type(i_VERSION) with length_encoder(self) as e: e.encode_string(version) @@ -654,7 +654,7 @@ class Encoder(Codec): decl.encode_decl(self) def encode_packed32(self, v): - if self.version in [ None, "LabComm20141009" ]: + if self.version in [ None, "LabComm2014" ]: v = v & 0xffffffff tmp = [ v & 0x7f ] v = v >> 7 @@ -771,7 +771,7 @@ class Decoder(Codec): return result def decode_packed32(self): - if self.version in [ "LabComm2013", "LabComm20141009" ] : + if self.version in [ "LabComm2013", "LabComm2014" ] : result = 0 while True: tmp = self.decode_byte()