* split EXI Header in decoder and encoder part

* writing bits revised
This commit is contained in:
daniel_peintner 2010-09-29 11:08:45 +00:00
parent a42f6af267
commit 5de40bdd8e
17 changed files with 236 additions and 129 deletions

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<v2gci_d:V2G_Message xmlns:v2gci_d="urn:iso:15118:2:2010:MsgDef"
xmlns:v2gci_t="urn:iso:15118:2:2010:MsgDataTypes"
xmlns:ns0="urn:iso:15118:2:2010:MsgBody"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:iso:15118:2:2010:MsgDef V2G_CI_MsgDef.xsd">
<v2gci_d:Header>
<v2gci_d:SessionInformation>
<v2gci_t:SessionID>0Fb80Fb80Fb80Fb8</v2gci_t:SessionID>
<v2gci_t:ProtocolVersion>1</v2gci_t:ProtocolVersion>
</v2gci_d:SessionInformation>
</v2gci_d:Header>
<v2gci_d:Body>
<ns0:SessionSetupRes>
<ns0:ResponseCode>OK_SessionSetup</ns0:ResponseCode>
<ns0:EVSEID>54</ns0:EVSEID>
<ns0:EVSEStatus>
<v2gci_t:FatalError>0</v2gci_t:FatalError>
<v2gci_t:EVSEStandby>1</v2gci_t:EVSEStandby>
<v2gci_t:ConnectorLocked>1</v2gci_t:ConnectorLocked>
<v2gci_t:PowerSwitchClosed>0</v2gci_t:PowerSwitchClosed>
<v2gci_t:RCD>1</v2gci_t:RCD>
<v2gci_t:ShutDownTime>123456789</v2gci_t:ShutDownTime>
</ns0:EVSEStatus>
<ns0:TCurrent>123456789</ns0:TCurrent>
</ns0:SessionSetupRes>
</v2gci_d:Body>
</v2gci_d:V2G_Message>

View file

@ -0,0 +1 @@
<EFBFBD>˜@}À}À}À}Âc<>TjVk¼é+5Þt

View file

@ -49,12 +49,12 @@ int decodeBoolean(bitstream_t* stream, int* b) {
return errn; return errn;
} }
int decodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t* b) { int decodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t* uint8) {
if (nbits == 0) { if (nbits == 0) {
*b = 0; *uint8 = 0;
return 0; return 0;
} else { } else {
return readBits(stream, nbits, b); return readBits(stream, nbits, uint8);
} }
} }
@ -67,7 +67,7 @@ int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) {
do { do {
/* 1. Read the next octet */ /* 1. Read the next octet */
errno = decode(stream, &b); errn = decode(stream, &b);
/* 2. Multiply the value of the unsigned number represented by the 7 /* 2. Multiply the value of the unsigned number represented by the 7
* least significant * least significant
* bits of the octet by the current multiplier and add the result to * bits of the octet by the current multiplier and add the result to
@ -78,7 +78,7 @@ int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) {
/* 4. If the most significant bit of the octet was 1, go back to step 1 */ /* 4. If the most significant bit of the octet was 1, go back to step 1 */
} while (errn >= 0 && (b >> 7) == 1); } while (errn >= 0 && (b >> 7) == 1);
return errno; return errn;
} }
/** /**
@ -94,7 +94,7 @@ int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64) {
*uint64 = 0L; *uint64 = 0L;
do { do {
errno = decode(stream, &b); errn = decode(stream, &b);
*uint64 += ((uint64_t) (b & 127)) << mShift; *uint64 += ((uint64_t) (b & 127)) << mShift;
mShift += 7; mShift += 7;
} while (errn >= 0 && (b >> 7) == 1); } while (errn >= 0 && (b >> 7) == 1);

View file

@ -69,7 +69,7 @@ uint8_t numberOf7BitBlocksToRepresent(int n) {
int encode(bitstream_t* stream, uint8_t b) { int encode(bitstream_t* stream, uint8_t b) {
return writeBits(stream, b, 8); return writeBits(stream, 8, b);
} }
/** /**
@ -78,7 +78,7 @@ int encode(bitstream_t* stream, uint8_t b) {
*/ */
int encodeBoolean(bitstream_t* stream, int b) { int encodeBoolean(bitstream_t* stream, int b) {
uint8_t val = b ? 1 : 0; uint8_t val = b ? 1 : 0;
return writeBits(stream, val, 1); return writeBits(stream, 1, val);
} }
@ -86,8 +86,8 @@ int encodeBoolean(bitstream_t* stream, int b) {
* Encode n-bit unsigned integer. The n least significant bits of parameter * Encode n-bit unsigned integer. The n least significant bits of parameter
* b starting with the most significant, i.e. from left to right. * b starting with the most significant, i.e. from left to right.
*/ */
int encodeNBitUnsignedInteger(bitstream_t* stream, uint8_t val, size_t nbits) { int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t val) {
return writeBits(stream, val, nbits); return writeBits(stream, nbits, val);
} }

View file

@ -45,7 +45,7 @@ int encodeBoolean(bitstream_t* stream, int b);
* Encode n-bit unsigned integer. The n least significant bits of parameter * Encode n-bit unsigned integer. The n least significant bits of parameter
* b starting with the most significant, i.e. from left to right. * b starting with the most significant, i.e. from left to right.
*/ */
int encodeNBitUnsignedInteger(bitstream_t* stream, uint8_t val, size_t nbits); int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t val);
/** /**

View file

@ -32,7 +32,7 @@
#define BIT_OUTPUT_STREAM_C #define BIT_OUTPUT_STREAM_C
/* NOTE: nbits <= 8 */ /* NOTE: nbits <= 8 */
int writeBits(bitstream_t* stream, uint8_t val, size_t nbits) { int writeBits(bitstream_t* stream, size_t nbits, uint8_t val) {
/* is there enough space in the buffer */ /* is there enough space in the buffer */
if (nbits <= stream->capacity) { if (nbits <= stream->capacity) {
/* all bits fit into the current buffer */ /* all bits fit into the current buffer */
@ -87,7 +87,7 @@ int flush(bitstream_t* stream) {
/* nothing to do, no bits in buffer */ /* nothing to do, no bits in buffer */
return 0; return 0;
} else { } else {
return writeBits(stream, 0, stream->capacity); return writeBits(stream, stream->capacity, 0);
} }
} }

View file

@ -34,7 +34,7 @@ extern "C" {
#ifndef BIT_OUTPUT_STREAM_H #ifndef BIT_OUTPUT_STREAM_H
#define BIT_OUTPUT_STREAM_H #define BIT_OUTPUT_STREAM_H
int writeBits(bitstream_t* stream, uint8_t bits, size_t nbits); int writeBits(bitstream_t* stream, size_t nbits, uint8_t bits);
/* flush output */ /* flush output */
int flush(bitstream_t* stream); int flush(bitstream_t* stream);

View file

@ -37,7 +37,6 @@
#include "assert.h" #include "assert.h"
#include "EXICoder.h" #include "EXICoder.h"
#include "EXIHeader.h"
/* /*
size_t exiGetCurrentState(struct exiState* state) { size_t exiGetCurrentState(struct exiState* state) {

View file

@ -37,7 +37,7 @@
#include "BitDecoderChannel.h" #include "BitDecoderChannel.h"
#include "EXICoder.h" #include "EXICoder.h"
#include "EXIHeader.h" #include "EXIHeaderDecoder.h"
#include "StringTable.h" #include "StringTable.h"

View file

@ -37,7 +37,7 @@
#include "BitEncoderChannel.h" #include "BitEncoderChannel.h"
#include "EXICoder.h" #include "EXICoder.h"
#include "EXIHeader.h" #include "EXIHeaderEncoder.h"
#include "StringTable.h" #include "StringTable.h"
/* ==================================== */ /* ==================================== */
@ -75,7 +75,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message), START_ELEMENT_GENERIC] */ /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message), START_ELEMENT_GENERIC] */
if ( se->localPart == 2 && se->namespaceURI == 6 ) { if ( se->localPart == 2 && se->namespaceURI == 6 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */
encodeNBitUnsignedInteger(stream, 0, 5); encodeNBitUnsignedInteger(stream, 5, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -83,7 +83,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 10 && se->namespaceURI == 4 ) { else if ( se->localPart == 10 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */
encodeNBitUnsignedInteger(stream, 1, 5); encodeNBitUnsignedInteger(stream, 5, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -91,7 +91,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 12 && se->namespaceURI == 4 ) { else if ( se->localPart == 12 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */
encodeNBitUnsignedInteger(stream, 2, 5); encodeNBitUnsignedInteger(stream, 5, 2);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -99,7 +99,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 16 && se->namespaceURI == 4 ) { else if ( se->localPart == 16 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */
encodeNBitUnsignedInteger(stream, 3, 5); encodeNBitUnsignedInteger(stream, 5, 3);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -107,7 +107,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 18 && se->namespaceURI == 4 ) { else if ( se->localPart == 18 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */
encodeNBitUnsignedInteger(stream, 4, 5); encodeNBitUnsignedInteger(stream, 5, 4);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -123,7 +123,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 22 && se->namespaceURI == 4 ) { else if ( se->localPart == 22 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */
encodeNBitUnsignedInteger(stream, 6, 5); encodeNBitUnsignedInteger(stream, 5, 6);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -131,7 +131,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 32 && se->namespaceURI == 4 ) { else if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */
encodeNBitUnsignedInteger(stream, 7, 5); encodeNBitUnsignedInteger(stream, 5, 7);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -139,7 +139,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 34 && se->namespaceURI == 4 ) { else if ( se->localPart == 34 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */
encodeNBitUnsignedInteger(stream, 8, 5); encodeNBitUnsignedInteger(stream, 5, 8);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -147,7 +147,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 36 && se->namespaceURI == 4 ) { else if ( se->localPart == 36 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */
encodeNBitUnsignedInteger(stream, 9, 5); encodeNBitUnsignedInteger(stream, 5, 9);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -155,7 +155,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 38 && se->namespaceURI == 4 ) { else if ( se->localPart == 38 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */
encodeNBitUnsignedInteger(stream, 10, 5); encodeNBitUnsignedInteger(stream, 5, 10);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -163,7 +163,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 40 && se->namespaceURI == 4 ) { else if ( se->localPart == 40 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 11, 5); encodeNBitUnsignedInteger(stream, 5, 11);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -171,7 +171,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 42 && se->namespaceURI == 4 ) { else if ( se->localPart == 42 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 12, 5); encodeNBitUnsignedInteger(stream, 5, 12);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -179,7 +179,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 47 && se->namespaceURI == 4 ) { else if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 13, 5); encodeNBitUnsignedInteger(stream, 5, 13);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -187,7 +187,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 49 && se->namespaceURI == 4 ) { else if ( se->localPart == 49 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 14, 5); encodeNBitUnsignedInteger(stream, 5, 14);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -195,7 +195,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 52 && se->namespaceURI == 4 ) { else if ( se->localPart == 52 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */
encodeNBitUnsignedInteger(stream, 15, 5); encodeNBitUnsignedInteger(stream, 5, 15);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -203,7 +203,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 54 && se->namespaceURI == 4 ) { else if ( se->localPart == 54 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */
encodeNBitUnsignedInteger(stream, 16, 5); encodeNBitUnsignedInteger(stream, 5, 16);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -211,7 +211,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 58 && se->namespaceURI == 4 ) { else if ( se->localPart == 58 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */
encodeNBitUnsignedInteger(stream, 17, 5); encodeNBitUnsignedInteger(stream, 5, 17);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -219,7 +219,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 60 && se->namespaceURI == 4 ) { else if ( se->localPart == 60 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */
encodeNBitUnsignedInteger(stream, 18, 5); encodeNBitUnsignedInteger(stream, 5, 18);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -227,7 +227,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 8 && se->namespaceURI == 6 ) { else if ( se->localPart == 8 && se->namespaceURI == 6 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message) */
encodeNBitUnsignedInteger(stream, 19, 5); encodeNBitUnsignedInteger(stream, 5, 19);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 2; state->grammarStack[state->stackIndex] = 2;
/* push element on stack */ /* push element on stack */
@ -258,7 +258,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
if ( se->localPart == 25 && se->namespaceURI == 4 ) { if ( se->localPart == 25 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 52; state->grammarStack[state->stackIndex] = 52;
/* push element on stack */ /* push element on stack */
@ -357,7 +357,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
if ( se->localPart == 57 && se->namespaceURI == 4 ) { if ( se->localPart == 57 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 126; state->grammarStack[state->stackIndex] = 126;
/* push element on stack */ /* push element on stack */
@ -365,7 +365,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 56 && se->namespaceURI == 4 ) { else if ( se->localPart == 56 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 128; state->grammarStack[state->stackIndex] = 128;
/* push element on stack */ /* push element on stack */
@ -406,7 +406,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
if ( se->localPart == 25 && se->namespaceURI == 4 ) { if ( se->localPart == 25 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 156; state->grammarStack[state->stackIndex] = 156;
/* push element on stack */ /* push element on stack */
@ -555,7 +555,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */
if ( se->localPart == 62 && se->namespaceURI == 4 ) { if ( se->localPart == 62 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 55; state->grammarStack[state->stackIndex] = 55;
/* push element on stack */ /* push element on stack */
@ -594,7 +594,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
if ( se->localPart == 16 && se->namespaceURI == 5 ) { if ( se->localPart == 16 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID) */
encodeNBitUnsignedInteger(stream, 0, 3); encodeNBitUnsignedInteger(stream, 3, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 62; state->grammarStack[state->stackIndex] = 62;
/* push element on stack */ /* push element on stack */
@ -602,7 +602,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 18 && se->namespaceURI == 5 ) { else if ( se->localPart == 18 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey) */
encodeNBitUnsignedInteger(stream, 1, 3); encodeNBitUnsignedInteger(stream, 3, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 64; state->grammarStack[state->stackIndex] = 64;
/* push element on stack */ /* push element on stack */
@ -610,7 +610,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 19 && se->namespaceURI == 5 ) { else if ( se->localPart == 19 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */
encodeNBitUnsignedInteger(stream, 2, 3); encodeNBitUnsignedInteger(stream, 3, 2);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 66; state->grammarStack[state->stackIndex] = 66;
/* push element on stack */ /* push element on stack */
@ -626,7 +626,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 39 && se->namespaceURI == 5 ) { else if ( se->localPart == 39 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 4, 3); encodeNBitUnsignedInteger(stream, 3, 4);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 70; state->grammarStack[state->stackIndex] = 70;
/* push element on stack */ /* push element on stack */
@ -637,7 +637,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
if ( se->localPart == 18 && se->namespaceURI == 5 ) { if ( se->localPart == 18 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey) */
encodeNBitUnsignedInteger(stream, 0, 3); encodeNBitUnsignedInteger(stream, 3, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 64; state->grammarStack[state->stackIndex] = 64;
/* push element on stack */ /* push element on stack */
@ -645,7 +645,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 19 && se->namespaceURI == 5 ) { else if ( se->localPart == 19 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */
encodeNBitUnsignedInteger(stream, 1, 3); encodeNBitUnsignedInteger(stream, 3, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 66; state->grammarStack[state->stackIndex] = 66;
/* push element on stack */ /* push element on stack */
@ -653,7 +653,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 20 && se->namespaceURI == 5 ) { else if ( se->localPart == 20 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */
encodeNBitUnsignedInteger(stream, 2, 3); encodeNBitUnsignedInteger(stream, 3, 2);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 68; state->grammarStack[state->stackIndex] = 68;
/* push element on stack */ /* push element on stack */
@ -672,7 +672,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
if ( se->localPart == 19 && se->namespaceURI == 5 ) { if ( se->localPart == 19 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 66; state->grammarStack[state->stackIndex] = 66;
/* push element on stack */ /* push element on stack */
@ -680,7 +680,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 20 && se->namespaceURI == 5 ) { else if ( se->localPart == 20 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 68; state->grammarStack[state->stackIndex] = 68;
/* push element on stack */ /* push element on stack */
@ -699,7 +699,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
if ( se->localPart == 20 && se->namespaceURI == 5 ) { if ( se->localPart == 20 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 68; state->grammarStack[state->stackIndex] = 68;
/* push element on stack */ /* push element on stack */
@ -707,7 +707,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 39 && se->namespaceURI == 5 ) { else if ( se->localPart == 39 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 70; state->grammarStack[state->stackIndex] = 70;
/* push element on stack */ /* push element on stack */
@ -728,7 +728,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
if ( se->localPart == 39 && se->namespaceURI == 5 ) { if ( se->localPart == 39 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 70; state->grammarStack[state->stackIndex] = 70;
/* push element on stack */ /* push element on stack */
@ -799,7 +799,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
if ( se->localPart == 24 && se->namespaceURI == 4 ) { if ( se->localPart == 24 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 91; state->grammarStack[state->stackIndex] = 91;
/* push element on stack */ /* push element on stack */
@ -807,7 +807,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 14 && se->namespaceURI == 4 ) { else if ( se->localPart == 14 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 92; state->grammarStack[state->stackIndex] = 92;
/* push element on stack */ /* push element on stack */
@ -818,7 +818,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
if ( se->localPart == 14 && se->namespaceURI == 4 ) { if ( se->localPart == 14 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 92; state->grammarStack[state->stackIndex] = 92;
/* push element on stack */ /* push element on stack */
@ -839,7 +839,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), END_ELEMENT] */
if ( se->localPart == 63 && se->namespaceURI == 4 ) { if ( se->localPart == 63 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 103; state->grammarStack[state->stackIndex] = 103;
/* push element on stack */ /* push element on stack */
@ -950,7 +950,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), END_ELEMENT] */
if ( se->localPart == 8 && se->namespaceURI == 4 ) { if ( se->localPart == 8 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 122; state->grammarStack[state->stackIndex] = 122;
/* push element on stack */ /* push element on stack */
@ -961,7 +961,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
if ( se->localPart == 56 && se->namespaceURI == 4 ) { if ( se->localPart == 56 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 128; state->grammarStack[state->stackIndex] = 128;
/* push element on stack */ /* push element on stack */
@ -972,7 +972,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
if ( se->localPart == 51 && se->namespaceURI == 4 ) { if ( se->localPart == 51 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 134; state->grammarStack[state->stackIndex] = 134;
/* push element on stack */ /* push element on stack */
@ -993,7 +993,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
if ( se->localPart == 27 && se->namespaceURI == 5 ) { if ( se->localPart == 27 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 137; state->grammarStack[state->stackIndex] = 137;
/* push element on stack */ /* push element on stack */
@ -1014,7 +1014,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
if ( se->localPart == 32 && se->namespaceURI == 5 ) { if ( se->localPart == 32 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName) */
encodeNBitUnsignedInteger(stream, 0, 3); encodeNBitUnsignedInteger(stream, 3, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 141; state->grammarStack[state->stackIndex] = 141;
/* push element on stack */ /* push element on stack */
@ -1022,7 +1022,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 35 && se->namespaceURI == 5 ) { else if ( se->localPart == 35 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */
encodeNBitUnsignedInteger(stream, 1, 3); encodeNBitUnsignedInteger(stream, 3, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 143; state->grammarStack[state->stackIndex] = 143;
/* push element on stack */ /* push element on stack */
@ -1030,7 +1030,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 33 && se->namespaceURI == 5 ) { else if ( se->localPart == 33 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
encodeNBitUnsignedInteger(stream, 2, 3); encodeNBitUnsignedInteger(stream, 3, 2);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 144; state->grammarStack[state->stackIndex] = 144;
/* push element on stack */ /* push element on stack */
@ -1049,7 +1049,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
if ( se->localPart == 35 && se->namespaceURI == 5 ) { if ( se->localPart == 35 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 143; state->grammarStack[state->stackIndex] = 143;
/* push element on stack */ /* push element on stack */
@ -1057,7 +1057,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 33 && se->namespaceURI == 5 ) { else if ( se->localPart == 33 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 144; state->grammarStack[state->stackIndex] = 144;
/* push element on stack */ /* push element on stack */
@ -1076,7 +1076,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
if ( se->localPart == 33 && se->namespaceURI == 5 ) { if ( se->localPart == 33 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 144; state->grammarStack[state->stackIndex] = 144;
/* push element on stack */ /* push element on stack */
@ -1084,7 +1084,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 29 && se->namespaceURI == 5 ) { else if ( se->localPart == 29 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 145; state->grammarStack[state->stackIndex] = 145;
/* push element on stack */ /* push element on stack */
@ -1095,7 +1095,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
if ( se->localPart == 29 && se->namespaceURI == 5 ) { if ( se->localPart == 29 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 145; state->grammarStack[state->stackIndex] = 145;
/* push element on stack */ /* push element on stack */
@ -1116,7 +1116,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
if ( se->localPart == 15 && se->namespaceURI == 4 ) { if ( se->localPart == 15 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 154; state->grammarStack[state->stackIndex] = 154;
/* push element on stack */ /* push element on stack */
@ -1187,7 +1187,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */
if ( se->localPart == 2 && se->namespaceURI == 6 ) { if ( se->localPart == 2 && se->namespaceURI == 6 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */
encodeNBitUnsignedInteger(stream, 0, 5); encodeNBitUnsignedInteger(stream, 5, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1195,7 +1195,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 10 && se->namespaceURI == 4 ) { else if ( se->localPart == 10 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */
encodeNBitUnsignedInteger(stream, 1, 5); encodeNBitUnsignedInteger(stream, 5, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1203,7 +1203,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 12 && se->namespaceURI == 4 ) { else if ( se->localPart == 12 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */
encodeNBitUnsignedInteger(stream, 2, 5); encodeNBitUnsignedInteger(stream, 5, 2);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1211,7 +1211,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 16 && se->namespaceURI == 4 ) { else if ( se->localPart == 16 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */
encodeNBitUnsignedInteger(stream, 3, 5); encodeNBitUnsignedInteger(stream, 5, 3);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1219,7 +1219,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 18 && se->namespaceURI == 4 ) { else if ( se->localPart == 18 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */
encodeNBitUnsignedInteger(stream, 4, 5); encodeNBitUnsignedInteger(stream, 5, 4);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1235,7 +1235,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 22 && se->namespaceURI == 4 ) { else if ( se->localPart == 22 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */
encodeNBitUnsignedInteger(stream, 6, 5); encodeNBitUnsignedInteger(stream, 5, 6);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1243,7 +1243,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 32 && se->namespaceURI == 4 ) { else if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */
encodeNBitUnsignedInteger(stream, 7, 5); encodeNBitUnsignedInteger(stream, 5, 7);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1251,7 +1251,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 34 && se->namespaceURI == 4 ) { else if ( se->localPart == 34 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */
encodeNBitUnsignedInteger(stream, 8, 5); encodeNBitUnsignedInteger(stream, 5, 8);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1259,7 +1259,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 36 && se->namespaceURI == 4 ) { else if ( se->localPart == 36 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */
encodeNBitUnsignedInteger(stream, 9, 5); encodeNBitUnsignedInteger(stream, 5, 9);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1267,7 +1267,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 38 && se->namespaceURI == 4 ) { else if ( se->localPart == 38 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */
encodeNBitUnsignedInteger(stream, 10, 5); encodeNBitUnsignedInteger(stream, 5, 10);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1275,7 +1275,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 40 && se->namespaceURI == 4 ) { else if ( se->localPart == 40 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 11, 5); encodeNBitUnsignedInteger(stream, 5, 11);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1283,7 +1283,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 42 && se->namespaceURI == 4 ) { else if ( se->localPart == 42 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 12, 5); encodeNBitUnsignedInteger(stream, 5, 12);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1291,7 +1291,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 47 && se->namespaceURI == 4 ) { else if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 13, 5); encodeNBitUnsignedInteger(stream, 5, 13);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1299,7 +1299,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 49 && se->namespaceURI == 4 ) { else if ( se->localPart == 49 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 14, 5); encodeNBitUnsignedInteger(stream, 5, 14);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1307,7 +1307,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 52 && se->namespaceURI == 4 ) { else if ( se->localPart == 52 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */
encodeNBitUnsignedInteger(stream, 15, 5); encodeNBitUnsignedInteger(stream, 5, 15);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1315,7 +1315,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 54 && se->namespaceURI == 4 ) { else if ( se->localPart == 54 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */
encodeNBitUnsignedInteger(stream, 16, 5); encodeNBitUnsignedInteger(stream, 5, 16);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1323,7 +1323,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 58 && se->namespaceURI == 4 ) { else if ( se->localPart == 58 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */
encodeNBitUnsignedInteger(stream, 17, 5); encodeNBitUnsignedInteger(stream, 5, 17);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1331,7 +1331,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 60 && se->namespaceURI == 4 ) { else if ( se->localPart == 60 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */
encodeNBitUnsignedInteger(stream, 18, 5); encodeNBitUnsignedInteger(stream, 5, 18);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 190; state->grammarStack[state->stackIndex] = 190;
/* push element on stack */ /* push element on stack */
@ -1342,7 +1342,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
if ( se->localPart == 6 && se->namespaceURI == 6 ) { if ( se->localPart == 6 && se->namespaceURI == 6 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 170; state->grammarStack[state->stackIndex] = 170;
/* push element on stack */ /* push element on stack */
@ -1363,7 +1363,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
if ( se->localPart == 13 && se->namespaceURI == 5 ) { if ( se->localPart == 13 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 179; state->grammarStack[state->stackIndex] = 179;
/* push element on stack */ /* push element on stack */
@ -1371,7 +1371,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 14 && se->namespaceURI == 5 ) { else if ( se->localPart == 14 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 181; state->grammarStack[state->stackIndex] = 181;
/* push element on stack */ /* push element on stack */
@ -1390,7 +1390,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
if ( se->localPart == 34 && se->namespaceURI == 5 ) { if ( se->localPart == 34 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 174; state->grammarStack[state->stackIndex] = 174;
/* push element on stack */ /* push element on stack */
@ -1398,7 +1398,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 25 && se->namespaceURI == 5 ) { else if ( se->localPart == 25 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 175; state->grammarStack[state->stackIndex] = 175;
/* push element on stack */ /* push element on stack */
@ -1409,7 +1409,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
if ( se->localPart == 25 && se->namespaceURI == 5 ) { if ( se->localPart == 25 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 175; state->grammarStack[state->stackIndex] = 175;
/* push element on stack */ /* push element on stack */
@ -1420,7 +1420,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
if ( se->localPart == 14 && se->namespaceURI == 5 ) { if ( se->localPart == 14 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */
encodeNBitUnsignedInteger(stream, 0, 2); encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 181; state->grammarStack[state->stackIndex] = 181;
/* push element on stack */ /* push element on stack */
@ -1428,7 +1428,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
} }
else if ( se->localPart == 10 && se->namespaceURI == 5 ) { else if ( se->localPart == 10 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */
encodeNBitUnsignedInteger(stream, 1, 2); encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 183; state->grammarStack[state->stackIndex] = 183;
/* push element on stack */ /* push element on stack */
@ -1439,7 +1439,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
if ( se->localPart == 10 && se->namespaceURI == 5 ) { if ( se->localPart == 10 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 183; state->grammarStack[state->stackIndex] = 183;
/* push element on stack */ /* push element on stack */
@ -1541,15 +1541,15 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
break; break;
case 64: case 64:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 3, 2); encodeNBitUnsignedInteger(stream, 2, 3);
break; break;
case 62: case 62:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 4, 3); encodeNBitUnsignedInteger(stream, 3, 4);
break; break;
case 59: case 59:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 5, 3); encodeNBitUnsignedInteger(stream, 3, 5);
break; break;
case 71: case 71:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
@ -1713,11 +1713,11 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
break; break;
case 141: case 141:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 3, 2); encodeNBitUnsignedInteger(stream, 2, 3);
break; break;
case 139: case 139:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 4, 3); encodeNBitUnsignedInteger(stream, 3, 4);
break; break;
case 147: case 147:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
@ -1805,7 +1805,7 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
break; break;
case 171: case 171:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 3, 2); encodeNBitUnsignedInteger(stream, 2, 3);
break; break;
case 185: case 185:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
@ -1829,7 +1829,7 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
break; break;
case 167: case 167:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 19, 5); encodeNBitUnsignedInteger(stream, 5, 19);
break; break;
default: default:
@ -1955,7 +1955,7 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state,
if (val->type == INTEGER_64) { if (val->type == INTEGER_64) {
/* CHARACTERS[INTEGER_64] */ /* CHARACTERS[INTEGER_64] */
/* xsi:type OR xsi:nil */ /* xsi:type OR xsi:nil */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
encodeInteger64(stream, val->int64); encodeInteger64(stream, val->int64);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 79; state->grammarStack[state->stackIndex] = 79;
@ -2146,7 +2146,7 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state,
if (val->type == STRING) { if (val->type == STRING) {
/* CHARACTERS[STRING] */ /* CHARACTERS[STRING] */
/* xsi:type OR xsi:nil */ /* xsi:type OR xsi:nil */
encodeNBitUnsignedInteger(stream, 0, 1); encodeNBitUnsignedInteger(stream, 1, 0);
encodeStringValue(stream, &val->string); encodeStringValue(stream, &val->string);
/* move on */ /* move on */
state->grammarStack[state->stackIndex] = 186; state->grammarStack[state->stackIndex] = 186;

View file

@ -26,14 +26,12 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "EXIHeader.h" #include "EXIHeaderDecoder.h"
#include "BitInputStream.h" #include "BitInputStream.h"
#include "BitOutputStream.h"
#include "BitDecoderChannel.h" #include "BitDecoderChannel.h"
#include "BitEncoderChannel.h"
#ifndef EXI_HEADER_C #ifndef EXI_HEADER_DECODER_C
#define EXI_HEADER_C #define EXI_HEADER_DECODER_C
int readEXIHeader(bitstream_t* stream) { int readEXIHeader(bitstream_t* stream) {
uint8_t header; uint8_t header;
@ -54,10 +52,6 @@ int readEXIHeader(bitstream_t* stream) {
return errn; return errn;
} }
int writeEXIHeader(bitstream_t* stream) {
return writeBits(stream, 144, 8);
}
#endif #endif

View file

@ -0,0 +1,44 @@
/*
* Copyright (C) 2007-2010 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
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*******************************************************************
*
* @author Daniel.Peintner.EXT@siemens.com
* @version 0.1
* @contact Joerg.Heuer@siemens.com
*
********************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include "EXITypes.h"
#ifndef EXI_HEADER_DECODER_H
#define EXI_HEADER_DECODER_H
int readEXIHeader(bitstream_t* stream);
#endif
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,43 @@
/*
* Copyright (C) 2007-2010 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
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*******************************************************************
*
* @author Daniel.Peintner.EXT@siemens.com
* @version 0.1
* @contact Joerg.Heuer@siemens.com
*
********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "EXIHeaderEncoder.h"
#include "BitOutputStream.h"
#include "BitEncoderChannel.h"
#ifndef EXI_HEADER_ENCODER_C
#define EXI_HEADER_ENCODER_C
int writeEXIHeader(bitstream_t* stream) {
return writeBits(stream, 8, 144);
}
#endif

View file

@ -31,10 +31,8 @@ extern "C" {
#include "EXITypes.h" #include "EXITypes.h"
#ifndef EXI_HEADER_H #ifndef EXI_HEADER_ENCODER_H
#define EXI_HEADER_H #define EXI_HEADER_ENCODER_H
int readEXIHeader(bitstream_t* stream);
int writeEXIHeader(bitstream_t* stream); int writeEXIHeader(bitstream_t* stream);

View file

@ -24,7 +24,7 @@
* <p>Sample program to illustrate how to read an EXI stream and * <p>Sample program to illustrate how to read an EXI stream and
* directly write it again to an output</p> * directly write it again to an output</p>
* *
* <p>e.g., data/test/sessionSetupReq.xml_SCHEMA.exi out/test/sessionSetupReq.xml_SCHEMA.exi</p> * <p>e.g., data/test/sessionSetupReq.xml.exi out/test/sessionSetupReq.xml.exi</p>
********************************************************************/ ********************************************************************/
#include <stdio.h> #include <stdio.h>
@ -104,13 +104,13 @@ int main(int argc, char *argv[]) {
do { do {
if (errn < 0) { if (errn < 0) {
printf("[Encode-ERROR] %d \n", errno); printf("[Encode-ERROR] %d \n", errn);
return errn; return errn;
} }
errn = exiDecodeNextEvent(&iStream, &stateDecode, &event); errn = exiDecodeNextEvent(&iStream, &stateDecode, &event);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
@ -119,7 +119,7 @@ int main(int argc, char *argv[]) {
/* decode */ /* decode */
errn = exiDecodeStartDocument(&iStream, &stateDecode); errn = exiDecodeStartDocument(&iStream, &stateDecode);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
printf(">> START_DOCUMENT \n"); printf(">> START_DOCUMENT \n");
@ -130,7 +130,7 @@ int main(int argc, char *argv[]) {
/* decode */ /* decode */
errn = exiDecodeEndDocument(&iStream, &stateDecode); errn = exiDecodeEndDocument(&iStream, &stateDecode);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
printf(">> END_DOCUMENT \n"); printf(">> END_DOCUMENT \n");
@ -143,7 +143,7 @@ int main(int argc, char *argv[]) {
/* decode */ /* decode */
errn = exiDecodeStartElement(&iStream, &stateDecode, &eqn); errn = exiDecodeStartElement(&iStream, &stateDecode, &eqn);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName); exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName);
@ -156,7 +156,7 @@ int main(int argc, char *argv[]) {
/* decode */ /* decode */
errn = exiDecodeEndElement(&iStream, &stateDecode, &eqn); errn = exiDecodeEndElement(&iStream, &stateDecode, &eqn);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName); exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName);
@ -169,7 +169,7 @@ int main(int argc, char *argv[]) {
/* decode */ /* decode */
errn = exiDecodeCharacters(&iStream, &stateDecode, &val); errn = exiDecodeCharacters(&iStream, &stateDecode, &val);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
if (val.type == INTEGER_BIG) { if (val.type == INTEGER_BIG) {
@ -198,7 +198,7 @@ int main(int argc, char *argv[]) {
/* decode */ /* decode */
errn = exiDecodeAttribute(&iStream, &stateDecode, &eqn, &val); errn = exiDecodeAttribute(&iStream, &stateDecode, &eqn, &val);
if (errn < 0) { if (errn < 0) {
printf("[Decode-ERROR] %d \n", errno); printf("[Decode-ERROR] %d \n", errn);
return errn; return errn;
} }
exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName); exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName);