* improves EXI codec footprint

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@15 d9f2db14-54d0-4bde-b00c-16405c910529
This commit is contained in:
daniel_peintner 2010-10-20 12:22:39 +00:00
parent a9e47e19ae
commit 69e25e0172
31 changed files with 766 additions and 1509 deletions

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* Bit decoding functionalities * Bit decoding functionalities

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>NOTE: Code generated by EXIdizer v0.1</p> * <p>NOTE: Code generated by EXIdizer v0.1</p>
@ -1613,398 +1613,150 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
eqname_t* ee) { eqname_t* ee) {
switch (state->grammarStack[state->stackIndex]) { switch (state->grammarStack[state->stackIndex]) {
case 3:
/* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */
/* no event code to write */
break;
case 26:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 29:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 31:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 32:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 35:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 37:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 46:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 48:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 49:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 50:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 51:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 58:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 60:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 61:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 70:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
case 68:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 66:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
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] */
encodeNBitUnsignedInteger(stream, 2, 3);
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, 3, 4); encodeNBitUnsignedInteger(stream, 3, 4);
break; break;
case 59: case 3:
/* 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] */ /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 3, 5); case 26:
break; /* Element[END_ELEMENT] */
case 29:
/* Element[END_ELEMENT] */
case 31:
/* Element[END_ELEMENT] */
case 32:
/* Element[END_ELEMENT] */
case 35:
/* Element[END_ELEMENT] */
case 37:
/* Element[END_ELEMENT] */
case 46:
/* Element[END_ELEMENT] */
case 48:
/* Element[END_ELEMENT] */
case 49:
/* Element[END_ELEMENT] */
case 50:
/* Element[END_ELEMENT] */
case 51:
/* Element[END_ELEMENT] */
case 58:
/* Element[END_ELEMENT] */
case 60:
/* Element[END_ELEMENT] */
case 61:
/* Element[END_ELEMENT] */
case 70:
/* Element[END_ELEMENT] */
case 71: case 71:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 72: case 72:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 76: case 76:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 78: case 78:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 79: case 79:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 80: case 80:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 81: case 81:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 83: case 83:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 9: case 9:
/* FirstStartTagStartTag[END_ELEMENT] */ /* FirstStartTagStartTag[END_ELEMENT] */
/* no event code to write */
break;
case 92: case 92:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 91:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 90:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 93: case 93:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 94: case 94:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 95: case 95:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 97: case 97:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 98: case 98:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 100: case 100:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 104: case 104:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 103:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 102:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 107: case 107:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 108: case 108:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 110: case 110:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 118: case 118:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 119: case 119:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 128: case 128:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 126:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 125:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 130: case 130:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 131: case 131:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 134:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 136: case 136:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 140: case 140:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 142: case 142:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 143:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 148: case 148:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 147:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 149: case 149:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 152: case 152:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 150:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 17:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 154: case 154:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 155: case 155:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 158: case 158:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 156:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 160: case 160:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 161:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 168: case 168:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 167:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 165:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 163:
/* 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), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 3);
break;
case 169: case 169:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 170: case 170:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 172: case 172:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 175: case 175:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 173:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 176: case 176:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 178: case 178:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 183: case 183:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 184: case 184:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 187: case 187:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 191: case 191:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 189:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 196: case 196:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 195:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 193:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 198: case 198:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 199: case 199:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 204: case 204:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 202:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 200:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 192:
/* 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, 2, 3);
break;
case 206: case 206:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 207: case 207:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 208: case 208:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 210: case 210:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */
break;
case 211: case 211:
/* Element[END_ELEMENT] */ /* Element[END_ELEMENT] */
/* no event code to write */ /* no event code to write */
@ -2013,6 +1765,68 @@ int exiEncodeEndElement(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] */
encodeNBitUnsignedInteger(stream, 5, 19); encodeNBitUnsignedInteger(stream, 5, 19);
break; break;
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] */
case 163:
/* 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), END_ELEMENT] */
case 192:
/* 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, 2, 3);
break;
case 68:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
case 91:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
case 103:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
case 126:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
case 134:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */
case 143:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */
case 147:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */
case 150:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
case 156:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
case 161:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
case 167:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
case 173:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
case 189:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
case 195:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
case 202:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
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] */
encodeNBitUnsignedInteger(stream, 3, 5);
break;
case 66:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
case 90:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
case 102:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
case 125:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
case 17:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
case 165:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
case 193:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
case 200:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
default: default:
return -1; return -1;

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

41
src/test/main.c Normal file
View file

@ -0,0 +1,41 @@
/*
* 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
* @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2
* @contact Joerg.Heuer@siemens.com
*
* <p>Switch for sample programs: EXI codec only or for entire service</p>
*
********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "main.h"
int main(int argc, char *argv[]) {
/* EXI codec only */
/* return main_codec(argc, argv);*/
/* Entire V2G service */
return main_service(argc, argv);
}

24
src/test/main.h Normal file
View file

@ -0,0 +1,24 @@
/*
* 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/>.
*/
#ifndef MAIN_H_
#define MAIN_H_
int main_codec(int argc, char *argv[]);
int main_service(int argc, char *argv[]);
#endif

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
* <p>Sample program to illustrate how to read an EXI stream and * <p>Sample program to illustrate how to read an EXI stream and

View file

@ -37,7 +37,7 @@
#define MAX_STRING_SIZE 256 #define MAX_STRING_SIZE 256
#define MAX_STREAM_SIZE 60 #define MAX_STREAM_SIZE 60
int main(int argc, char *argv[]) int main_service(int argc, char *argv[])
{ {
static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/ static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/