mirror of
https://github.com/Martin-P/OpenV2G.git
synced 2024-11-18 12:53:58 +00:00
* 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:
parent
737e0a1141
commit
40a2516afe
34 changed files with 18790 additions and 10214 deletions
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <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
|
||||
* 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;
|
||||
|
||||
datetime->type = type;
|
||||
|
@ -509,15 +509,15 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
|
|||
datetime->timezone = 0;
|
||||
|
||||
switch (type) {
|
||||
case gYear: /* Year, [Time-Zone] */
|
||||
case exiGYear: /* Year, [Time-Zone] */
|
||||
errn = decodeInteger32(stream, &datetime->year);
|
||||
if (errn < 0) {
|
||||
return errn;
|
||||
}
|
||||
datetime->year += DATETIME_YEAR_OFFSET;
|
||||
break;
|
||||
case gYearMonth: /* Year, MonthDay, [TimeZone] */
|
||||
case date:
|
||||
case exiGYearMonth: /* Year, MonthDay, [TimeZone] */
|
||||
case exiDate:
|
||||
errn = decodeInteger32(stream, &datetime->year);
|
||||
if (errn < 0) {
|
||||
return errn;
|
||||
|
@ -525,7 +525,7 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
|
|||
datetime->year += DATETIME_YEAR_OFFSET;
|
||||
errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay);
|
||||
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" */
|
||||
errn = decodeInteger32(stream, &datetime->year);
|
||||
if (errn < 0) {
|
||||
|
@ -537,7 +537,7 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
|
|||
return errn;
|
||||
}
|
||||
/* Note: *no* break */
|
||||
case time: /* Time, [FractionalSecs], [TimeZone] */
|
||||
case exiTime: /* Time, [FractionalSecs], [TimeZone] */
|
||||
/* e.g. "12:34:56.135" */
|
||||
errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, &datetime->time);
|
||||
if (errn < 0) {
|
||||
|
@ -551,11 +551,11 @@ int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* dateti
|
|||
errn = decodeUnsignedInteger32(stream, &datetime->fractionalSecs);
|
||||
}
|
||||
break;
|
||||
case gMonth: /* MonthDay, [TimeZone] */
|
||||
case exiGMonth: /* MonthDay, [TimeZone] */
|
||||
/* e.g. "--12" */
|
||||
case gMonthDay: /* MonthDay, [TimeZone] */
|
||||
case exiGMonthDay: /* MonthDay, [TimeZone] */
|
||||
/* e.g. "--01-28" */
|
||||
case gDay: /* MonthDay, [TimeZone] */
|
||||
case exiGDay: /* MonthDay, [TimeZone] */
|
||||
/* "---16" */
|
||||
errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay );
|
||||
break;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <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 errn = 0;
|
||||
switch (datetime->type) {
|
||||
case gYear: /* Year, [Time-Zone] */
|
||||
case exiGYear: /* Year, [Time-Zone] */
|
||||
errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
|
||||
break;
|
||||
case gYearMonth: /* Year, MonthDay, [TimeZone] */
|
||||
case date: /* Year, MonthDay, [TimeZone] */
|
||||
case exiGYearMonth: /* Year, MonthDay, [TimeZone] */
|
||||
case exiDate: /* Year, MonthDay, [TimeZone] */
|
||||
errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
|
||||
if (errn < 0) {
|
||||
return errn;
|
||||
}
|
||||
errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
|
||||
break;
|
||||
case dateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
|
||||
case exiDateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
|
||||
errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
|
||||
if (errn < 0) {
|
||||
return errn;
|
||||
|
@ -391,7 +391,7 @@ int encodeDateTime(bitstream_t* stream, datetime_t* datetime) {
|
|||
return errn;
|
||||
}
|
||||
/* Note: *no* break */
|
||||
case time: /* Time, [FractionalSecs], [TimeZone] */
|
||||
case exiTime: /* Time, [FractionalSecs], [TimeZone] */
|
||||
errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, datetime->time);
|
||||
if (errn < 0) {
|
||||
return errn;
|
||||
|
@ -406,9 +406,9 @@ int encodeDateTime(bitstream_t* stream, datetime_t* datetime) {
|
|||
encodeBoolean(stream, 0);
|
||||
}
|
||||
break;
|
||||
case gMonth: /* MonthDay, [TimeZone] */
|
||||
case gMonthDay: /* MonthDay, [TimeZone] */
|
||||
case gDay: /* MonthDay, [TimeZone] */
|
||||
case exiGMonth: /* MonthDay, [TimeZone] */
|
||||
case exiGMonthDay: /* MonthDay, [TimeZone] */
|
||||
case exiGDay: /* MonthDay, [TimeZone] */
|
||||
errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <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
|
||||
* 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
|
||||
|
||||
|
|
2609
src/codec/EXICoder.c
2609
src/codec/EXICoder.c
File diff suppressed because one or more lines are too long
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
@ -36,12 +36,12 @@ extern "C" {
|
|||
|
||||
#include "EXITypes.h"
|
||||
|
||||
#define IS_STRICT 1
|
||||
#define IS_STRICT 0
|
||||
#define DOCUMENT 0
|
||||
#define DOC_CONTENT 1
|
||||
#define DOC_END 2
|
||||
#define UR_TYPE_GRAMMAR_0 71
|
||||
#define UR_TYPE_GRAMMAR_1 654
|
||||
#define UR_TYPE_GRAMMAR_0 97
|
||||
#define UR_TYPE_GRAMMAR_1 809
|
||||
|
||||
|
||||
|
||||
|
|
13538
src/codec/EXIDecoder.c
13538
src/codec/EXIDecoder.c
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
12743
src/codec/EXIEncoder.c
12743
src/codec/EXIEncoder.c
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
#define BYTE_ARRAY 1
|
||||
#define FILE_STREAM 2
|
||||
#define EXI_STREAM BYTE_ARRAY
|
||||
/*#define EXI_STREAM FILE_STREAM*/
|
||||
/* #define EXI_STREAM FILE_STREAM */
|
||||
|
||||
#define EXI_ELEMENT_STACK_SIZE 16
|
||||
|
||||
|
@ -148,8 +148,8 @@ typedef enum {
|
|||
|
||||
/* differ datetime types */
|
||||
typedef enum {
|
||||
gYear, gYearMonth, date, dateTime, gMonth, gMonthDay, gDay, time
|
||||
} datetime_type_t;
|
||||
exiGYear, exiGYearMonth, exiDate, exiDateTime, exiGMonth, exiGMonthDay, exiGDay, exiTime
|
||||
} exi_datetime_type_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
@ -223,7 +223,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* datetime type */
|
||||
datetime_type_t type;
|
||||
exi_datetime_type_t type;
|
||||
/* values */
|
||||
int32_t year;
|
||||
uint32_t monthDay;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.5
|
||||
* @version 2011-12-02
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
|
|
Loading…
Reference in a new issue