From 3cdd9b11cb1083a089b1208a72b82555a341757f Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Tue, 21 May 2013 17:35:11 +0200
Subject: [PATCH] Added forgotten file.

---
 .bzrignore            |  1 +
 examples/Makefile     |  2 +-
 lib/c/labcomm_error.h | 31 +++++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 lib/c/labcomm_error.h

diff --git a/.bzrignore b/.bzrignore
index dc2d51e..2653f98 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -31,3 +31,4 @@ examples/simple/example_decoder
 examples/simple/example_encoder
 lib/c/test/test_labcomm_basic_type_encoding
 lib/c/test/test_labcomm_generated_encoding
+lib/java/se/lth/control/labcomm/WriterWrapper.class
diff --git a/examples/Makefile b/examples/Makefile
index f9a5511..c9531e8 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,6 +1,6 @@
 all:
 	echo To be done...
-
+	$(MAKE) -C twoway e 	
 test:
 	echo More to be done...
 	cd simple ; sh compile.sh && sh run.sh
diff --git a/lib/c/labcomm_error.h b/lib/c/labcomm_error.h
new file mode 100644
index 0000000..79f4647
--- /dev/null
+++ b/lib/c/labcomm_error.h
@@ -0,0 +1,31 @@
+#ifndef __LABCOMM_ERROR_H__
+#define __LABCOMM_ERROR_H__
+
+enum labcomm_error {
+#define LABCOMM_ERROR(name, description) name ,
+#include "labcomm_error.h"
+#undef LABCOMM_ERROR
+};
+
+#endif
+
+#ifdef LABCOMM_ERROR
+
+LABCOMM_ERROR(LABCOMM_ERROR_ENC_NO_REG_SIGNATURE, 
+	      "Encoder has no registration for this signature")
+LABCOMM_ERROR(LABCOMM_ERROR_ENC_BUF_FULL,
+	      "The labcomm buffer is full")
+LABCOMM_ERROR(LABCOMM_ERROR_DEC_UNKNOWN_DATATYPE,
+	      "Decoder: Unknown datatype")
+LABCOMM_ERROR(LABCOMM_ERROR_DEC_INDEX_MISMATCH, 
+	      "Decoder: index mismatch")
+LABCOMM_ERROR(LABCOMM_ERROR_DEC_TYPE_NOT_FOUND,
+	      "Decoder: type not found")
+LABCOMM_ERROR(LABCOMM_ERROR_UNIMPLEMENTED_FUNC,
+	      "This function is not yet implemented")
+LABCOMM_ERROR(LABCOMM_ERROR_MEMORY,
+	      "Could not allocate memory")
+LABCOMM_ERROR(LABCOMM_ERROR_USER_DEF,     
+	      "User defined error")
+
+#endif
-- 
GitLab