- version 0.2.3 or 0.3?

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@18 d9f2db14-54d0-4bde-b00c-16405c910529
This commit is contained in:
sebastiankb 2010-10-22 12:14:29 +00:00
parent 331e3ecbb1
commit 32f7bfd532
17 changed files with 1157 additions and 3010 deletions

View file

@ -38,6 +38,12 @@
<option id="gnu.c.compiler.option.warnings.pedantic.1676854851" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/> <option id="gnu.c.compiler.option.warnings.pedantic.1676854851" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.misc.ansi.722225100" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/> <option id="gnu.c.compiler.option.misc.ansi.722225100" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.optimization.flags.1389725002" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="" valueType="string"/> <option id="gnu.c.compiler.option.optimization.flags.1389725002" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="" valueType="string"/>
<option id="gnu.c.compiler.option.warnings.pedantic.error.149509232" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.misc.verbose.538510822" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose" value="false" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.toerrors.333094291" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors" value="false" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.nowarn.1833719087" name="Inhibit all warnings (-w)" superClass="gnu.c.compiler.option.warnings.nowarn" value="false" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.syntax.1603120263" name="Check syntax only (-fsyntax-only)" superClass="gnu.c.compiler.option.warnings.syntax" value="false" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.allwarn.1391825268" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.67299528" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.67299528" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.867726048" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"> <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.867726048" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
@ -50,9 +56,7 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/codec"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/test"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/service"/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -20,7 +20,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -22,7 +22,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -148,7 +148,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type,
} }
static int serialize_EventListType(struct EventListType* type, struct v2gService* service) static int serialize_EventListType(struct v2gService* service)
{ {
/* element ID assignment of Event*/ /* element ID assignment of Event*/
@ -272,7 +272,7 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS
} }
/* encode children of EventList */ /* encode children of EventList */
if(serialize_EventListType(&(type->EventList),service)<0) if(serialize_EventListType(service)<0)
{ {
return -1; return -1;
} }
@ -360,7 +360,7 @@ static int serialize_HeaderType(struct HeaderType* type, struct v2gService* serv
} }
static int serialize_PEVStatusType(struct PEVStatusType* type, struct v2gService* service) static int serialize_PEVStatusType(struct v2gService* service)
{ {
/* element ID assignment of ConnectorLocked*/ /* element ID assignment of ConnectorLocked*/
@ -479,7 +479,7 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc
} }
/* encode children of PEVStatus */ /* encode children of PEVStatus */
if(serialize_PEVStatusType(&(type->PEVStatus),service)<0) if(serialize_PEVStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -500,7 +500,7 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc
} }
static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct v2gService* service) static int serialize_EVSEStatusType(struct v2gService* service)
{ {
/* element ID assignment of FatalError*/ /* element ID assignment of FatalError*/
@ -771,7 +771,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc
} }
/* encode children of EVSEStatus */ /* encode children of EVSEStatus */
if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0) if(serialize_EVSEStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -1048,7 +1048,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type,
static int serialize_ServiceListType(struct ServiceListType* type, struct v2gService* service) static int serialize_ServiceListType(struct ServiceListType* type, struct v2gService* service)
{ {
int i_loop; size_t i_loop;
/* element ID assignment of Service*/ /* element ID assignment of Service*/
@ -1338,7 +1338,7 @@ static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, s
} }
static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, struct v2gService* service) static int serialize_PaymentDetailsResType(struct v2gService* service)
{ {
/* element ID assignment of ResponseCode*/ /* element ID assignment of ResponseCode*/
@ -1376,7 +1376,7 @@ static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, s
} }
static int serialize_FloatingValueType(struct FloatingValueType* type, struct v2gService* service) static int serialize_FloatingValueType(struct v2gService* service)
{ {
/* element ID assignment of Multiplier*/ /* element ID assignment of Multiplier*/
@ -1490,7 +1490,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s
} }
/* encode children of PEVStatus */ /* encode children of PEVStatus */
if(serialize_PEVStatusType(&(type->PEVStatus),service)<0) if(serialize_PEVStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -1549,7 +1549,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s
} }
/* encode children of EAmount */ /* encode children of EAmount */
if(serialize_FloatingValueType(&(type->EAmount),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -1577,7 +1577,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s
} }
/* encode children of PEVMaxPower */ /* encode children of PEVMaxPower */
if(serialize_FloatingValueType(&(type->PEVMaxPower),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -1636,7 +1636,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s
} }
/* encode children of PEVMaxVoltage */ /* encode children of PEVMaxVoltage */
if(serialize_FloatingValueType(&(type->PEVMaxVoltage),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -1664,7 +1664,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s
} }
/* encode children of PEVMinVoltage */ /* encode children of PEVMinVoltage */
if(serialize_FloatingValueType(&(type->PEVMinVoltage),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -1730,7 +1730,7 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer
} }
/* encode children of TariffPMax */ /* encode children of TariffPMax */
if(serialize_FloatingValueType(&(type->TariffPMax),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -1760,7 +1760,7 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer
} }
/* encode children of EPrice */ /* encode children of EPrice */
if(serialize_FloatingValueType(&(type->EPrice),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -1784,7 +1784,7 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer
static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2gService* service) static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2gService* service)
{ {
int i_loop; size_t i_loop;
/* element ID assignment of TariffEntry*/ /* element ID assignment of TariffEntry*/
@ -1927,7 +1927,7 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer
static int serialize_TariffTableType(struct TariffTableType* type, struct v2gService* service) static int serialize_TariffTableType(struct TariffTableType* type, struct v2gService* service)
{ {
int i_loop; size_t i_loop;
/* element ID assignment of Currency*/ /* element ID assignment of Currency*/
@ -2044,7 +2044,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s
} }
/* encode children of EVSEStatus */ /* encode children of EVSEStatus */
if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0) if(serialize_EVSEStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -2072,7 +2072,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s
} }
/* encode children of EVSEVoltage */ /* encode children of EVSEVoltage */
if(serialize_FloatingValueType(&(type->EVSEVoltage),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -2100,7 +2100,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s
} }
/* encode children of EVSEIMax */ /* encode children of EVSEIMax */
if(serialize_FloatingValueType(&(type->EVSEIMax),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -2233,7 +2233,7 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gSer
} }
/* encode children of PEVStatus */ /* encode children of PEVStatus */
if(serialize_PEVStatusType(&(type->PEVStatus),service)<0) if(serialize_PEVStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -2330,7 +2330,7 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct v2gSer
} }
/* encode children of EVSEStatus */ /* encode children of EVSEStatus */
if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0) if(serialize_EVSEStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -2396,7 +2396,7 @@ static int serialize_ChargingProfileType(struct ChargingProfileType* type, struc
} }
/* encode children of ChargingProfileEntryMaxPower */ /* encode children of ChargingProfileEntryMaxPower */
if(serialize_FloatingValueType(&(type->ChargingProfileEntryMaxPower),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -2431,7 +2431,7 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str
} }
/* encode children of PEVStatus */ /* encode children of PEVStatus */
if(serialize_PEVStatusType(&(type->PEVStatus),service)<0) if(serialize_PEVStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -2548,7 +2548,7 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str
} }
static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, struct v2gService* service) static int serialize_PowerDeliveryResType(struct v2gService* service)
{ {
/* element ID assignment of ResponseCode*/ /* element ID assignment of ResponseCode*/
@ -2586,7 +2586,7 @@ static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, str
} }
static int serialize_MeteringStatusReqType(struct MeteringStatusReqType* type, struct v2gService* service) static int serialize_MeteringStatusReqType(struct v2gService* service)
{ {
return 0; return 0;
@ -2681,7 +2681,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService
} }
/* encode children of MeterReading */ /* encode children of MeterReading */
if(serialize_FloatingValueType(&(type->MeterReading),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -2849,7 +2849,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s
} }
/* encode children of EVSEStatus */ /* encode children of EVSEStatus */
if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0) if(serialize_EVSEStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -2908,7 +2908,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s
} }
/* encode children of EVSEMaxPower */ /* encode children of EVSEMaxPower */
if(serialize_FloatingValueType(&(type->EVSEMaxPower),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -2938,7 +2938,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s
} }
/* encode children of PCurrent */ /* encode children of PCurrent */
if(serialize_FloatingValueType(&(type->PCurrent),service)<0) if(serialize_FloatingValueType(service)<0)
{ {
return -1; return -1;
} }
@ -3041,7 +3041,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type,
} }
/* encode children of PEVStatus */ /* encode children of PEVStatus */
if(serialize_PEVStatusType(&(type->PEVStatus),service)<0) if(serialize_PEVStatusType(service)<0)
{ {
return -1; return -1;
} }
@ -3155,7 +3155,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type,
} }
static int serialize_MeteringReceiptResType(struct MeteringReceiptResType* type, struct v2gService* service) static int serialize_MeteringReceiptResType(struct v2gService* service)
{ {
/* element ID assignment of ResponseCode*/ /* element ID assignment of ResponseCode*/
@ -3426,7 +3426,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service)
} }
/* encode children of PaymentDetailsRes */ /* encode children of PaymentDetailsRes */
if(serialize_PaymentDetailsResType(&(type->PaymentDetailsRes),service)<0) if(serialize_PaymentDetailsResType(service)<0)
{ {
return -1; return -1;
} }
@ -3612,7 +3612,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service)
} }
/* encode children of PowerDeliveryRes */ /* encode children of PowerDeliveryRes */
if(serialize_PowerDeliveryResType(&(type->PowerDeliveryRes),service)<0) if(serialize_PowerDeliveryResType(service)<0)
{ {
return -1; return -1;
} }
@ -3643,7 +3643,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service)
} }
/* encode children of MeteringStatusReq */ /* encode children of MeteringStatusReq */
if(serialize_MeteringStatusReqType(&(type->MeteringStatusReq),service)<0) if(serialize_MeteringStatusReqType(service)<0)
{ {
return -1; return -1;
} }
@ -3736,7 +3736,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service)
} }
/* encode children of MeteringReceiptRes */ /* encode children of MeteringReceiptRes */
if(serialize_MeteringReceiptResType(&(type->MeteringReceiptRes),service)<0) if(serialize_MeteringReceiptResType(service)<0)
{ {
return -1; return -1;
} }

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -21,7 +21,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -22,11 +22,12 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -38,7 +39,6 @@ extern "C" {
#include "EXITypes.h" #include "EXITypes.h"
/* This service methods has to be implemented by the EVSE server */ /* This service methods has to be implemented by the EVSE server */
int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result); int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result);
int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result); int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result);

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Daniel.Peintner.EXT@siemens.com * @author Daniel.Peintner.EXT@siemens.com
* @version 0.2.2 * @version 0.1
* @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
@ -34,22 +34,27 @@
#include "StringTable.h" #include "StringTable.h"
#include "EXIEncoder.h" #include "EXIEncoder.h"
#include "EXITypes.h" #include "EXITypes.h"
#include "Bitstream.h" #include "ByteStream.h"
#define BUFFER_SIZE 100
#define ARRAY_SIZE_BYTES 50 #define ARRAY_SIZE_BYTES 50
#define ARRAY_SIZE_STRINGS 50 #define ARRAY_SIZE_STRINGS 50
/* avoids warning: initializer element is not computable at load time */ /* avoids warning: initializer element is not computable at load time */
uint8_t bufferIn[BUFFER_SIZE];
uint8_t bufferOut[BUFFER_SIZE];
uint8_t data[ARRAY_SIZE_BYTES]; uint8_t data[ARRAY_SIZE_BYTES];
uint32_t codepoints[ARRAY_SIZE_STRINGS]; uint32_t codepoints[ARRAY_SIZE_STRINGS];
int main_codec(int argc, char *argv[]) { int mainX(int argc, char *argv[]) {
int errn = 0; int errn = 0;
unsigned int i; unsigned int i;
bitstream_t iStream, oStream; bitstream_t iStream, oStream;
size_t posDecode, posEncode; size_t posDecode;
size_t posEncode;
/* EXI set-up */ /* EXI set-up */
exi_state_t stateDecode; exi_state_t stateDecode;
@ -74,19 +79,23 @@ int main_codec(int argc, char *argv[]) {
return -1; return -1;
} }
/* parse EXI stream to internal byte structures */ /* input pos */
toBitstream(argv[1], &iStream);
/* input */
posDecode = 0; posDecode = 0;
/* parse EXI stream to internal byte structures */
readBytesFromFile(argv[1], bufferIn, BUFFER_SIZE, posDecode);
/* setup input stream */
iStream.size = BUFFER_SIZE;
iStream.data = bufferIn;
iStream.pos = &posDecode; iStream.pos = &posDecode;
iStream.buffer = 0; iStream.buffer = 0;
iStream.capacity = 0; iStream.capacity = 0;
/* output */ /* setup output stream */
posEncode = 0; posEncode = 0;
oStream.data = malloc(sizeof(uint8_t)*iStream.size); oStream.size = BUFFER_SIZE;
oStream.size = iStream.size; oStream.data = bufferOut;
oStream.pos = &posEncode; oStream.pos = &posEncode;
oStream.buffer = 0; oStream.buffer = 0;
oStream.capacity = 8; oStream.capacity = 8;

View file

@ -29,9 +29,8 @@
#include "v2g_serviceDataTypes.h" #include "v2g_serviceDataTypes.h"
#include "v2g_serviceClientStubs.h" #include "v2g_serviceClientStubs.h"
#include "EXITypes.h" #include "EXITypes.h"
#include "BitStream.h"
#include <stdlib.h> #include <stdio.h>
#define MAX_BYTE_SIZE 128 #define MAX_BYTE_SIZE 128
#define MAX_STRING_SIZE 256 #define MAX_STRING_SIZE 256

View file

@ -18,14 +18,14 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.2 * @version 0.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
#include "v2g_serviceClientDataTransmitter.h" #include "v2g_serviceClientDataTransmitter.h"
#include "v2g_server.h" #include "v2g_server.h"
#include "Bitstream.h"
/* This method has to be implemented! /* This method has to be implemented!
* Send EXI stream (outStream) to EVSE and receive response stream (inStream)*/ * Send EXI stream (outStream) to EVSE and receive response stream (inStream)*/