diff --git a/examples/user_types/Makefile b/examples/user_types/Makefile index 4af38f677bad712cd6a0701411555d2104d65229..76c10d84048efb29d4e05ae06396a9db4af679fe 100644 --- a/examples/user_types/Makefile +++ b/examples/user_types/Makefile @@ -122,7 +122,7 @@ runwcs: build ExampleEncoder.exe ExampleDecoder.exe @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_j LabComm2014 @echo "************ running C# decoder: *****************" - @LD_LIBRARY_PATH=${LCDIR}/lib/c/ ./ExampleDecoder.exe encoded_data_j + @LD_LIBRARY_PATH=${LCDIR}/lib/c/ mono ./ExampleDecoder.exe encoded_data_j @echo "************ running C encoder: *****************" @LD_LIBRARY_PATH=${LCDIR}/lib/c/ ./example_encoder encoded_data_c @@ -137,7 +137,7 @@ runwcs: build ExampleEncoder.exe ExampleDecoder.exe @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm2014 @echo "************ running C# decoder: *****************" - @./ExampleDecoder.exe encoded_data_c + @mono ./ExampleDecoder.exe encoded_data_c @echo "************ running python encoder: *****************" @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm2014 @@ -152,10 +152,10 @@ runwcs: build ExampleEncoder.exe ExampleDecoder.exe PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm2014 @echo "************ running C# decoder: *****************" - @./ExampleDecoder.exe encoded_data_p + @mono ./ExampleDecoder.exe encoded_data_p @echo "************ running C# encoder: *****************" - @./ExampleEncoder.exe encoded_data_cs + @mono ./ExampleEncoder.exe encoded_data_cs @echo "************ running Java decoder: *****************" @java -cp .:${LCDIR}/lib/java/labcomm2014.jar:${GENDIR} Decoder encoded_data_cs @@ -167,7 +167,7 @@ runwcs: build ExampleEncoder.exe ExampleDecoder.exe @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_cs LabComm2014 @echo "************ running C# decoder: *****************" - @./ExampleDecoder.exe encoded_data_cs + @mono ./ExampleDecoder.exe encoded_data_cs diff --git a/lib/c/2014/labcomm_encoder.c b/lib/c/2014/labcomm_encoder.c index 56af811048ce40e992176dc1ff326499abf10996..4f81294d03fef8694947d3525d1f05c36b7536cd 100644 --- a/lib/c/2014/labcomm_encoder.c +++ b/lib/c/2014/labcomm_encoder.c @@ -101,6 +101,8 @@ void labcomm_encoder_free(struct labcomm_encoder* e) labcomm_memory_free(memory, 0, e); } //================ +#undef WITHOUT_TYPE_DEFS +#ifndef WITHOUT_TYPE_DEFS static struct labcomm_encoder * wrapped_begin( struct labcomm_encoder *e) { struct labcomm_writer *dyn_writer = labcomm_dynamic_buffer_writer_new( @@ -308,19 +310,25 @@ out: labcomm_scheduler_writer_unlock(e->scheduler); return result; } +#endif //-------------- int labcomm_internal_encoder_type_register( struct labcomm_encoder *e, const struct labcomm_signature *signature) { +#ifndef WITHOUT_TYPE_DEFS struct labcomm_encoder *w = wrapped_begin(e); internal_reg_type(w, signature, FALSE); return wrapped_end(e, LABCOMM_TYPE_DEF, w); +#else + return 0; +#endif } int labcomm_internal_encoder_type_bind( struct labcomm_encoder *e, const struct labcomm_signature *signature) { +#ifndef WITHOUT_TYPE_DEFS int result = -EINVAL; int err; int sindex = labcomm_get_local_index(signature); @@ -343,6 +351,9 @@ int labcomm_internal_encoder_type_bind( out: labcomm_scheduler_writer_unlock(e->scheduler); return result; +#else + return 0; +#endif } int labcomm_internal_encoder_register( struct labcomm_encoder *e, diff --git a/lib/csharp/se/lth/control/labcomm/Constant.cs b/lib/csharp/se/lth/control/labcomm/Constant.cs index 5b247f677c6f5c79c5ce288d3a681f629eec5248..37615448d0cec858190bbb16dd9a465677a8ccbb 100644 --- a/lib/csharp/se/lth/control/labcomm/Constant.cs +++ b/lib/csharp/se/lth/control/labcomm/Constant.cs @@ -11,6 +11,7 @@ namespace se.lth.control.labcomm { public const int SAMPLE_DEF = 0x02; public const int SAMPLE_REF = 0x03; public const int TYPE_DEF = 0x04; + public const int TYPE_BINDING = 0x05; public const int PRAGMA = 0x3f; public const int FIRST_USER_INDEX = 0x40; /* ..0xffffffff */ diff --git a/lib/csharp/se/lth/control/labcomm/DecoderChannel.cs b/lib/csharp/se/lth/control/labcomm/DecoderChannel.cs index aa8662172f6cd4ed00cafaba7b44dcd5a6aa1287..99e17fbac0f6065f3364c72dddfe1bce78808cb9 100644 --- a/lib/csharp/se/lth/control/labcomm/DecoderChannel.cs +++ b/lib/csharp/se/lth/control/labcomm/DecoderChannel.cs @@ -45,6 +45,12 @@ namespace se.lth.control.labcomm { ReadBytes(signature, signature_length); ref_registry.add(index, name, signature); } break; + case Constant.TYPE_DEF: + case Constant.TYPE_BINDING: { + for(int i=0; i<length;i++){ + decodeByte(); + } + } break; default: { DecoderRegistry.Entry e = def_registry.get(tag); if (e == null) { diff --git a/lib/java/Makefile b/lib/java/Makefile index 060aeeba5ea2854ab8c8f2790325540854545366..1dd78eb293a4bd4da3b0814ac04a309e88acf558 100644 --- a/lib/java/Makefile +++ b/lib/java/Makefile @@ -39,3 +39,7 @@ gen/JAVAC: $(MODULES:%=se/lth/control/labcomm/%.java) $(MODULES:%=se/lth/control clean: rm -rf labcomm.jar labcomm2006.jar labcomm2014.jar gen + +.PHONY: distclean + +distclean: clean