Skip to content
Snippets Groups Projects
Commit 9802290a authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

small fixes. tests still not working

parent 1bee4d4e
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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,
......
......@@ -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 */
......
......@@ -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) {
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment