* update EXI codec to latest given schema

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@42 d9f2db14-54d0-4bde-b00c-16405c910529
This commit is contained in:
daniel_peintner 2011-12-02 08:34:02 +00:00
parent 737e0a1141
commit 40a2516afe
34 changed files with 18790 additions and 10214 deletions

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>
@ -495,7 +495,7 @@ int decodeBinary(bitstream_t* stream, bytes_t* bytes) {
* Decode Date-Time as sequence of values representing the individual * Decode Date-Time as sequence of values representing the individual
* components of the Date-Time. * components of the Date-Time.
*/ */
int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* datetime){ int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, datetime_t* datetime){
int errn; int errn;
datetime->type = type; datetime->type = type;
@ -509,15 +509,15 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
datetime->timezone = 0; datetime->timezone = 0;
switch (type) { switch (type) {
case gYear: /* Year, [Time-Zone] */ case exiGYear: /* Year, [Time-Zone] */
errn = decodeInteger32(stream, &datetime->year); errn = decodeInteger32(stream, &datetime->year);
if (errn < 0) { if (errn < 0) {
return errn; return errn;
} }
datetime->year += DATETIME_YEAR_OFFSET; datetime->year += DATETIME_YEAR_OFFSET;
break; break;
case gYearMonth: /* Year, MonthDay, [TimeZone] */ case exiGYearMonth: /* Year, MonthDay, [TimeZone] */
case date: case exiDate:
errn = decodeInteger32(stream, &datetime->year); errn = decodeInteger32(stream, &datetime->year);
if (errn < 0) { if (errn < 0) {
return errn; return errn;
@ -525,7 +525,7 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
datetime->year += DATETIME_YEAR_OFFSET; datetime->year += DATETIME_YEAR_OFFSET;
errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay); errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay);
break; break;
case dateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */ case exiDateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
/* e.g. "0001-01-01T00:00:00.111+00:33" */ /* e.g. "0001-01-01T00:00:00.111+00:33" */
errn = decodeInteger32(stream, &datetime->year); errn = decodeInteger32(stream, &datetime->year);
if (errn < 0) { if (errn < 0) {
@ -537,7 +537,7 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
return errn; return errn;
} }
/* Note: *no* break */ /* Note: *no* break */
case time: /* Time, [FractionalSecs], [TimeZone] */ case exiTime: /* Time, [FractionalSecs], [TimeZone] */
/* e.g. "12:34:56.135" */ /* e.g. "12:34:56.135" */
errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, &datetime->time); errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, &datetime->time);
if (errn < 0) { if (errn < 0) {
@ -551,11 +551,11 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
errn = decodeUnsignedInteger32(stream, &datetime->fractionalSecs); errn = decodeUnsignedInteger32(stream, &datetime->fractionalSecs);
} }
break; break;
case gMonth: /* MonthDay, [TimeZone] */ case exiGMonth: /* MonthDay, [TimeZone] */
/* e.g. "--12" */ /* e.g. "--12" */
case gMonthDay: /* MonthDay, [TimeZone] */ case exiGMonthDay: /* MonthDay, [TimeZone] */
/* e.g. "--01-28" */ /* e.g. "--01-28" */
case gDay: /* MonthDay, [TimeZone] */ case exiGDay: /* MonthDay, [TimeZone] */
/* "---16" */ /* "---16" */
errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay ); errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay );
break; break;

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>
@ -370,18 +370,18 @@ int encodeBinary(bitstream_t* stream, bytes_t* bytes) {
int encodeDateTime(bitstream_t* stream, datetime_t* datetime) { int encodeDateTime(bitstream_t* stream, datetime_t* datetime) {
int errn = 0; int errn = 0;
switch (datetime->type) { switch (datetime->type) {
case gYear: /* Year, [Time-Zone] */ case exiGYear: /* Year, [Time-Zone] */
errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET); errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
break; break;
case gYearMonth: /* Year, MonthDay, [TimeZone] */ case exiGYearMonth: /* Year, MonthDay, [TimeZone] */
case date: /* Year, MonthDay, [TimeZone] */ case exiDate: /* Year, MonthDay, [TimeZone] */
errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET); errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
if (errn < 0) { if (errn < 0) {
return errn; return errn;
} }
errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay); errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
break; break;
case dateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */ case exiDateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET); errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
if (errn < 0) { if (errn < 0) {
return errn; return errn;
@ -391,7 +391,7 @@ int encodeDateTime(bitstream_t* stream, datetime_t* datetime) {
return errn; return errn;
} }
/* Note: *no* break */ /* Note: *no* break */
case time: /* Time, [FractionalSecs], [TimeZone] */ case exiTime: /* Time, [FractionalSecs], [TimeZone] */
errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, datetime->time); errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, datetime->time);
if (errn < 0) { if (errn < 0) {
return errn; return errn;
@ -406,9 +406,9 @@ int encodeDateTime(bitstream_t* stream, datetime_t* datetime) {
encodeBoolean(stream, 0); encodeBoolean(stream, 0);
} }
break; break;
case gMonth: /* MonthDay, [TimeZone] */ case exiGMonth: /* MonthDay, [TimeZone] */
case gMonthDay: /* MonthDay, [TimeZone] */ case exiGMonthDay: /* MonthDay, [TimeZone] */
case gDay: /* MonthDay, [TimeZone] */ case exiGDay: /* MonthDay, [TimeZone] */
errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay); errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
break; break;
default: default:

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>
@ -167,7 +167,7 @@ int decodeBinary(bitstream_t* stream, bytes_t* bytes);
* Decode Date-Time as sequence of values representing the individual * Decode Date-Time as sequence of values representing the individual
* components of the Date-Time. * components of the Date-Time.
*/ */
int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* datetime); int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, datetime_t* datetime);
#endif #endif

File diff suppressed because one or more lines are too long

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>
@ -36,12 +36,12 @@ extern "C" {
#include "EXITypes.h" #include "EXITypes.h"
#define IS_STRICT 1 #define IS_STRICT 0
#define DOCUMENT 0 #define DOCUMENT 0
#define DOC_CONTENT 1 #define DOC_CONTENT 1
#define DOC_END 2 #define DOC_END 2
#define UR_TYPE_GRAMMAR_0 71 #define UR_TYPE_GRAMMAR_0 97
#define UR_TYPE_GRAMMAR_1 654 #define UR_TYPE_GRAMMAR_1 809

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>
@ -148,8 +148,8 @@ typedef enum {
/* differ datetime types */ /* differ datetime types */
typedef enum { typedef enum {
gYear, gYearMonth, date, dateTime, gMonth, gMonthDay, gDay, time exiGYear, exiGYearMonth, exiDate, exiDateTime, exiGMonth, exiGMonthDay, exiGDay, exiTime
} datetime_type_t; } exi_datetime_type_t;
typedef struct { typedef struct {
@ -223,7 +223,7 @@ typedef struct {
typedef struct { typedef struct {
/* datetime type */ /* datetime type */
datetime_type_t type; exi_datetime_type_t type;
/* values */ /* values */
int32_t year; int32_t year;
uint32_t monthDay; uint32_t monthDay;

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.5 * @version 2011-12-02
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Code generated by EXIdizer</p> * <p>Code generated by EXIdizer</p>