|
|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (C) 2007-2017 Siemens AG
|
|
|
+ * Copyright (C) 2007-2018 Siemens AG
|
|
|
*
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU Lesser General Public License as published
|
|
|
@@ -18,7 +18,7 @@
|
|
|
/*******************************************************************
|
|
|
*
|
|
|
* @author Daniel.Peintner.EXT@siemens.com
|
|
|
- * @version 1.0.0alpha
|
|
|
+ * @version 0.9.4
|
|
|
* @contact Richard.Kuntschke@siemens.com
|
|
|
*
|
|
|
* <p>Code generated by EXIdizer</p>
|
|
|
@@ -41,11 +41,17 @@
|
|
|
#include <stdarg.h>
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
-/* schema-dependent */
|
|
|
-#include "iso2EXIDatatypes.h"
|
|
|
+/* schema-dependent */
|
|
|
+#include "iso1EXIDatatypes.h"
|
|
|
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
|
|
|
+#include "iso1EXIDatatypesEncoder.h"
|
|
|
+#include "iso1EXIDatatypesDecoder.h"
|
|
|
+#endif /* DEPLOY_ISO1_CODEC == SUPPORT_YES */
|
|
|
+#include "iso2EXIDatatypes.h"
|
|
|
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
|
|
|
#include "iso2EXIDatatypesEncoder.h"
|
|
|
#include "iso2EXIDatatypesDecoder.h"
|
|
|
-
|
|
|
+#endif /* DEPLOY_ISO2_CODEC == SUPPORT_YES */
|
|
|
|
|
|
#include "ByteStream.h"
|
|
|
|
|
|
@@ -65,8 +71,13 @@ uint8_t bufferOut[BUFFER_SIZE];
|
|
|
|
|
|
|
|
|
int main_databinder(int argc, char *argv[]) {
|
|
|
-
|
|
|
- struct iso2EXIDocument exiDoc;
|
|
|
+
|
|
|
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
|
|
|
+ struct iso1EXIDocument exi1Doc;
|
|
|
+#endif /* DEPLOY_ISO1_CODEC == SUPPORT_YES */
|
|
|
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
|
|
|
+ struct iso2EXIDocument exi2Doc;
|
|
|
+#endif /* DEPLOY_ISO2_CODEC == SUPPORT_YES */
|
|
|
int errn = 0;
|
|
|
|
|
|
bitstream_t iStream, oStream;
|
|
|
@@ -111,8 +122,13 @@ int main_databinder(int argc, char *argv[]) {
|
|
|
iStream.capacity = 0;
|
|
|
|
|
|
|
|
|
- printf("Start decoding EXI stream to databinding layer \n");
|
|
|
- errn = decode_iso2ExiDocument(&iStream, &exiDoc);
|
|
|
+ printf("Start decoding EXI stream to databinding layer \n");
|
|
|
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
|
|
|
+ errn = decode_iso1ExiDocument(&iStream, &exi1Doc);
|
|
|
+#endif /* DEPLOY_ISO1_CODEC == SUPPORT_YES */
|
|
|
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
|
|
|
+ errn = decode_iso2ExiDocument(&iStream, &exi2Doc);
|
|
|
+#endif /* DEPLOY_ISO2_CODEC == SUPPORT_YES */
|
|
|
if (errn != 0) {
|
|
|
printf("Problems while decoding EXI stream, err==%d\n", errn);
|
|
|
return errn;
|
|
|
@@ -129,8 +145,13 @@ int main_databinder(int argc, char *argv[]) {
|
|
|
oStream.buffer = 0;
|
|
|
oStream.capacity = 8;
|
|
|
|
|
|
- printf("Start encoding databinding layer to EXI \n");
|
|
|
- errn = encode_iso2ExiDocument(&oStream, &exiDoc);
|
|
|
+ printf("Start encoding databinding layer to EXI \n");
|
|
|
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
|
|
|
+ errn = encode_iso1ExiDocument(&oStream, &exi1Doc);
|
|
|
+#endif /* DEPLOY_ISO1_CODEC == SUPPORT_YES */
|
|
|
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
|
|
|
+ errn = encode_iso2ExiDocument(&oStream, &exi2Doc);
|
|
|
+#endif /* DEPLOY_ISO2_CODEC == SUPPORT_YES */
|
|
|
if (errn != 0) {
|
|
|
printf("Problems while encoding databinding layer, err==%d\n", errn);
|
|
|
return errn;
|