define.h 282 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928
  1. #ifndef DEFINE_H_
  2. #define DEFINE_H_
  3. /**************************************************************************************/
  4. /*********************************NAND Flash mapping *****************************/
  5. /**************************************************************************************/
  6. /*
  7. sector size 512 KiB
  8. Page size 4096 b
  9. OOB size 224 b
  10. Erase size 524288 b
  11. -------------------------------------------------------------------------------------------------------------------------------
  12. Segment Physical address Size
  13. -------------------------------------------------------------------------------------------------------------------------------
  14. MLO 0x00000000-0x0007FFFF 512 KB
  15. Primary u-boot 0x00080000-0x0017FFFF 1 MB
  16. Environment 0x00180000-0x001FFFFF 512 KB
  17. Secondary u-boot 0x00200000-0x002FFFFF 1 MB
  18. Primary dtb 0x00300000-0x0037FFFF 512 KB
  19. Secondary dtb 0x00380000-0x003FFFFF 512 KB
  20. Primary kernel 0x00400000-0x00DFFFFF 10 MB
  21. Secondary Kernel 0x00E00000-0x017FFFFF 10 MB
  22. Primary root file system 0x03000000-0x05FFFFFF 48 MB
  23. Secondary root file system 0x06000000-0x08FFFFFF 48 MB
  24. Primary user configuration 0x09000000-0x095FFFFF 6 MB
  25. Secondary user configuration 0x09600000-0x09BFFFFF 6 MB
  26. Factory default configuration 0x09C00000-0x0A1FFFFF 6 MB
  27. Storage 0x0A200000-0x7FFFFFFF 1886 MB
  28. */
  29. /**************************************************************************************/
  30. /*********************************System Limitation**********************************/
  31. /**************************************************************************************/
  32. /*Rating outout power and current*/
  33. #define RATED_POWER 25 //kW
  34. #define RATED_CURRENT 350 //Amp, it depend on the capacity of charging connector
  35. /*relevant to Quantity */
  36. #ifdef AWRegular
  37. #define MAX_PSU_QUANTITY 62
  38. #define CHAdeMO_QUANTITY 1
  39. #define CCS_QUANTITY 1
  40. #define GB_QUANTITY 0
  41. #define AC_QUANTITY 1
  42. #define GENERAL_GUN_QUANTITY 0
  43. #define PSU_QUANTITY 0
  44. #define ONE_CONNECTOR_USE 0
  45. #elif defined AWChargeLab
  46. #define MAX_PSU_QUANTITY 62
  47. #define CHAdeMO_QUANTITY 1
  48. #define CCS_QUANTITY 1
  49. #define GB_QUANTITY 0
  50. #define AC_QUANTITY 1
  51. #define GENERAL_GUN_QUANTITY 0
  52. #define PSU_QUANTITY 0
  53. #define ONE_CONNECTOR_USE 0
  54. #elif defined AWCCS
  55. #define MAX_PSU_QUANTITY 62
  56. #define CHAdeMO_QUANTITY 1
  57. #define CCS_QUANTITY 1
  58. #define GB_QUANTITY 0
  59. #define AC_QUANTITY 1
  60. #define GENERAL_GUN_QUANTITY 0
  61. #define PSU_QUANTITY 0
  62. #define ONE_CONNECTOR_USE 0
  63. #elif defined DW30
  64. #define MAX_PSU_QUANTITY 62
  65. #define CHAdeMO_QUANTITY 0
  66. #define CCS_QUANTITY 1
  67. #define GB_QUANTITY 0
  68. #define AC_QUANTITY 0
  69. #define GENERAL_GUN_QUANTITY 0
  70. #define PSU_QUANTITY 2
  71. #define ONE_CONNECTOR_USE 0
  72. #elif defined DM30
  73. #define MAX_PSU_QUANTITY 62
  74. #define CHAdeMO_QUANTITY 0
  75. #define CCS_QUANTITY 1
  76. #define GB_QUANTITY 0
  77. #define AC_QUANTITY 0
  78. #define GENERAL_GUN_QUANTITY 0
  79. #define PSU_QUANTITY 2
  80. #define ONE_CONNECTOR_USE 0
  81. #elif defined DS60120
  82. #define MAX_PSU_QUANTITY 62
  83. #define CHAdeMO_QUANTITY 2
  84. #define CCS_QUANTITY 2
  85. #define GB_QUANTITY 2
  86. #define AC_QUANTITY 1
  87. #define GENERAL_GUN_QUANTITY 0
  88. #define PSU_QUANTITY 2
  89. #define ONE_CONNECTOR_USE 0
  90. #elif defined DS60210
  91. #define MAX_PSU_QUANTITY 62
  92. #define CHAdeMO_QUANTITY 1
  93. #define CCS_QUANTITY 1
  94. #define GB_QUANTITY 0
  95. #define AC_QUANTITY 0
  96. #define GENERAL_GUN_QUANTITY 0
  97. #define PSU_QUANTITY 2
  98. #define ONE_CONNECTOR_USE 0
  99. #elif defined PlugIt360
  100. #define MAX_PSU_QUANTITY 62
  101. #define CHAdeMO_QUANTITY 0
  102. #define CCS_QUANTITY 1
  103. #define GB_QUANTITY 0
  104. #define AC_QUANTITY 0
  105. #define GENERAL_GUN_QUANTITY 0
  106. #define PSU_QUANTITY 2
  107. #define ONE_CONNECTOR_USE 0
  108. #elif defined DD360
  109. #define MAX_PSU_QUANTITY 62
  110. #define CHAdeMO_QUANTITY 2
  111. #define CCS_QUANTITY 2
  112. #define GB_QUANTITY 2
  113. #define AC_QUANTITY 0
  114. #define GENERAL_GUN_QUANTITY 0
  115. #define PSU_QUANTITY 2
  116. #define ONE_CONNECTOR_USE 0
  117. #elif defined DD360Audi
  118. #define MAX_PSU_QUANTITY 62
  119. #define CHAdeMO_QUANTITY 2
  120. #define CCS_QUANTITY 2
  121. #define GB_QUANTITY 2
  122. #define AC_QUANTITY 0
  123. #define GENERAL_GUN_QUANTITY 0
  124. #define PSU_QUANTITY 2
  125. #define ONE_CONNECTOR_USE 0
  126. #elif defined DO360
  127. #define MAX_PSU_QUANTITY 62
  128. #define CHAdeMO_QUANTITY 0
  129. #define CCS_QUANTITY 0
  130. #define GB_QUANTITY 0
  131. #define AC_QUANTITY 0
  132. #define GENERAL_GUN_QUANTITY 4
  133. #define PSU_QUANTITY 6
  134. #define ONE_CONNECTOR_USE 0
  135. #elif defined ATE
  136. #define MAX_PSU_QUANTITY 62
  137. #define CHAdeMO_QUANTITY 0
  138. #define CCS_QUANTITY 1
  139. #define GB_QUANTITY 0
  140. #define AC_QUANTITY 0
  141. #define GENERAL_GUN_QUANTITY 0
  142. #define PSU_QUANTITY 2
  143. #define ONE_CONNECTOR_USE 0
  144. #else
  145. #define MAX_PSU_QUANTITY 62
  146. #define CHAdeMO_QUANTITY 2
  147. #define CCS_QUANTITY 2
  148. #define GB_QUANTITY 2
  149. #define AC_QUANTITY 1
  150. #define GENERAL_GUN_QUANTITY 0
  151. #define PSU_QUANTITY 2
  152. #define ONE_CONNECTOR_USE 0
  153. #endif
  154. #define CONNECTOR_QUANTITY (CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY + GENERAL_GUN_QUANTITY)
  155. /*SystemLog message*/
  156. #define SystemLogMessage //for debug info save to log file
  157. //#define ConsloePrintLog //for debug info print to console
  158. /**************************************************************************************/
  159. /*****************************share memory key information*****************************/
  160. /**************************************************************************************/
  161. #define ShmSysConfigAndInfoKey 1001
  162. #define ShmPsuKey 1002
  163. #define ShmCHAdeMOCommKey 1003
  164. #define ShmCcsCommKey 1004
  165. #define ShmStatusCodeKey 1005
  166. #define ShmPrimaryMcuKey 1006
  167. #define ShmFanBdKey 1007
  168. #define ShmRelayBdKey 1008
  169. #define ShmOcppModuleKey 1009
  170. #define ShmGBTCommKey 1010
  171. #define ShmLedBdKey 1011
  172. #define ShmOcpp20ModuleKey 1012
  173. #define ShmRelay2BdKey 1013
  174. #define FaultCodeLength 5
  175. #define AlarmCodeLength 16
  176. #define InfoCodeLength 41
  177. /**************************************************************************************/
  178. /****************** Share memory configuration value constant define ******************/
  179. /**************************************************************************************/
  180. enum SYSTEM_STATUS
  181. {
  182. SYS_MODE_BOOTING = 0,
  183. SYS_MODE_IDLE = 1,
  184. SYS_MODE_AUTHORIZING = 2,
  185. SYS_MODE_MODE_REASSIGN_CHECK = 3,
  186. SYS_MODE_REASSIGN = 4,
  187. SYS_MODE_PREPARING = 5,
  188. SYS_MODE_PREPARE_FOR_EV = 6,
  189. SYS_MODE_PREPARE_FOR_EVSE = 7,
  190. SYS_MODE_CHARGING = 8,
  191. SYS_MODE_TERMINATING = 9,
  192. SYS_MODE_COMPLETE = 10,
  193. SYS_MODE_ALARM = 11,
  194. SYS_MODE_FAULT = 12,
  195. SYS_MODE_RESERVATION = 13,
  196. SYS_MODE_BOOKING = 14,
  197. SYS_MODE_MAINTAIN = 15,
  198. SYS_MODE_DEBUG = 16,
  199. SYS_MODE_CCS_PRECHARGE_STEP0 = 17,
  200. SYS_MODE_CCS_PRECHARGE_STEP1 = 18,
  201. SYS_MODE_UPDATE = 19
  202. };
  203. enum AUTHORIZATION_MODE
  204. {
  205. AUTH_MODE_ENABLE = 0,
  206. AUTH_MODE_DISABLE = 1
  207. };
  208. enum LCD_LANGUAGE
  209. {
  210. LCD_LANG_ENGLISH = 0,
  211. LCD_LANG_CHT = 1,
  212. LCD_LANG_CHS = 2,
  213. LCD_LANG_JAPANESE = 3,
  214. LCD_LANG_FRENCH = 4,
  215. LCD_LANG_ITALIAN = 5,
  216. LCD_LANG_SPANISH = 6,
  217. LCD_LANG_GERMAN = 7,
  218. LCD_LANG_DUTCH = 8,
  219. LCD_LANG_NORWEGIAN = 9,
  220. LCD_LANG_FINNISH = 10,
  221. LCD_LANG_SWEDISH = 11,
  222. LCD_LANG_SLOVENIAN = 12,
  223. LCD_LANG_THAI = 13,
  224. };
  225. enum RFID_ENDIAN
  226. {
  227. RFID_ENDIAN_LITTLE = 0,
  228. RFID_ENDIAN_BIG = 1
  229. };
  230. enum PHASE_LOSS_POLICY
  231. {
  232. LOSS_POLICY_CHARGING = 0,
  233. LOSS_POLICY_STOP = 1
  234. };
  235. enum CCS_AUTHPRIZATION_MODE
  236. {
  237. CCS_AUTH_MODE_EIM = 0,
  238. CCS_AUTH_MODE_MIXED = 1
  239. };
  240. enum OFF_LINE_POLICY
  241. {
  242. OFF_POLICY_LOCALLIST = 0,
  243. OFF_POLICY_PH_RFID = 1,
  244. OFF_POLICY_FREE = 2,
  245. OFF_POLICY_NOCHARGE = 3
  246. };
  247. /*Configuration enum*/
  248. enum CoreProfile {
  249. AllowOfflineTxForUnknownId=0,
  250. AuthorizationCacheEnabled,
  251. AuthorizeRemoteTxRequests,
  252. BlinkRepeat,
  253. ClockAlignedDataInterval,
  254. ConnectionTimeOut,
  255. GetConfigurationMaxKeys,
  256. HeartbeatInterval,
  257. LightIntensity,
  258. LocalAuthorizeOffline,
  259. LocalPreAuthorize,
  260. MaxEnergyOnInvalidId,
  261. MeterValuesAlignedData,
  262. MeterValuesAlignedDataMaxLength,
  263. MeterValuesSampledData,
  264. MeterValuesSampledDataMaxLength,
  265. MeterValueSampleInterval,
  266. MinimumStatusDuration,
  267. NumberOfConnectors,
  268. ResetRetries,
  269. ConnectorPhaseRotation,
  270. ConnectorPhaseRotationMaxLength,
  271. StopTransactionOnEVSideDisconnect,
  272. StopTransactionOnInvalidId,
  273. StopTxnAlignedData,
  274. StopTxnAlignedDataMaxLength,
  275. StopTxnSampledData,
  276. StopTxnSampledDataMaxLength,
  277. SupportedFeatureProfiles,
  278. SupportedFeatureProfilesMaxLength,
  279. TransactionMessageAttempts,
  280. TransactionMessageRetryInterval,
  281. UnlockConnectorOnEVSideDisconnect,
  282. WebSocketPingInterval,
  283. QueueOffLineStartTransactionMessage,
  284. AuthorizationKey,
  285. SecurityProfile,
  286. DefaultPrice,
  287. CustomDisplayCostAndPrice,
  288. CustomIdleFeeAfterStop,
  289. ConfigurationVersion,
  290. _CoreProfile_CNT
  291. };
  292. enum OCPP_RUNNING_VERSION {
  293. OCPP_RUNNING_VERSION_16=0,
  294. OCPP_RUNNING_VERSION_20
  295. };
  296. /**************************************************************************************/
  297. /****structure SysConfigData => shall store the data to NAND flash****************/
  298. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  299. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  300. /**************************************************************************************/
  301. struct NoneUse
  302. {
  303. unsigned char unknown; // None use struct
  304. };
  305. struct EthConfigData
  306. {
  307. unsigned char EthDhcpClient; //0: enable,1: disable
  308. unsigned char EthMacAddress[18]; //default: Null
  309. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  310. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  311. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  312. };
  313. struct WifiConfigData
  314. {
  315. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  316. unsigned char WifiSsid[256]; //default: Null
  317. unsigned char WifiPassword[256]; //default: Null
  318. int WifiRssi; //dbm
  319. unsigned char WifiDhcpServer; //0: enable, 1: disable
  320. unsigned char WifiDhcpClient; //0: enable, 1: disable
  321. unsigned char WifiMacAddress[18]; //default: Null
  322. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  323. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  324. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  325. unsigned char WifiNetworkConn; //0: disconnected, 1: connected
  326. };
  327. struct TeleConfigData
  328. {
  329. unsigned char TelcomModelName[64]; //default: Null
  330. unsigned char TelcomSoftwareVer[64]; //default: Null
  331. unsigned char TelcomApn[256]; //default: Null
  332. int TelcomRssi; //dbm
  333. unsigned char TelcomChapPapId[256]; //default: Null
  334. unsigned char TelcomChapPapPwd[256]; //default: Null
  335. unsigned char TelcomModemImei[16]; //default: Null
  336. unsigned char TelcomSimImsi[16]; //default: Null
  337. unsigned char TelcomSimIccid[22]; //default: Null
  338. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  339. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA, 6: HSPA, 7: LTE 9: Unknown
  340. unsigned char TelcomIpAddress[16]; //default: Null
  341. unsigned char TelcomNetworkConn; //0: disconnected, 1: connected
  342. unsigned char TelcomEnabled; //0: disable, 1: enable
  343. };
  344. struct BtConfigData
  345. {
  346. unsigned char LoginCentralID[64]; //default: Null
  347. unsigned char isLogin; //0: Central device non-login 1: Central device login
  348. unsigned char isRequestStart; //0: no action 1: request start charging
  349. unsigned char isRequestStop; //0: no action 1: request stop charging
  350. };
  351. struct BillingConfigData
  352. {
  353. unsigned char isBilling; //0:not for business 1:for business
  354. unsigned char Currency; //
  355. float Fee[24]; //fee for 24 hours
  356. float Cur_fee; // display current fee
  357. };
  358. struct LED
  359. {
  360. unsigned char Intensity; // LED bar intensity 0: Darkest 1: Medium 2: Brightest
  361. unsigned char Red[3]; // Red color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  362. unsigned char Green[3]; // Green color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  363. unsigned char Blue[3]; // Blue color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  364. };
  365. struct Schedule
  366. {
  367. unsigned char isEnable; // 0: disable schedule function 1: enable schedule function
  368. unsigned char scheduleType; // 0: Once 1: Daily
  369. unsigned char scheduleMethod; // 0: Continuous 1: Specificate end time
  370. unsigned char startTimeHour; // Schedule start trigger time hour
  371. unsigned char startTimeMinute; // Schedule start trigger time minute
  372. unsigned char stopTimeHour; // Schedule stop trigger time hour
  373. unsigned char stopTimeMinute; // Schedule stop trigger time minute
  374. unsigned char isTriggerStart; // 0: disable; 1: enable
  375. unsigned char isTriggerStop; // 0: disable; 1: enable
  376. };
  377. struct LocalSharingInfo
  378. {
  379. unsigned short AvailableShargingCurrent; // 0 ~ rating value amp, Synchronize from local sharing server
  380. unsigned char isConnectedSharingServer:1; // 0: Disconnected, 1: Connected
  381. };
  382. typedef union
  383. {
  384. unsigned int ChargingStopValue;
  385. struct
  386. {
  387. unsigned int NormalStop:1; // 0: no effect, 1: normal stop
  388. unsigned int AlarmStop:1; // 0: no effect, 1: alarm stop
  389. unsigned int BackendStop:1; // 0: no effect, 1: backend stop
  390. unsigned int ManualStop:1; // 0: no effect, 1: manual stop
  391. unsigned int res:28;
  392. }bits;
  393. }ChargingStop;
  394. typedef struct
  395. {
  396. unsigned char DispenserSequence; // dispenser sequence
  397. unsigned char MaxConnectorQuantity; // max connector quantity
  398. unsigned char WiringSetting[8]; // record connector quantity of dispenser
  399. unsigned char PowerCabinetReserved[32];
  400. }WiringInfoData;
  401. struct SysConfigData
  402. {
  403. /**************System***************/
  404. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  405. unsigned char ModelName[64]; //charger model name
  406. unsigned char AcModelName[64]; //for third gun (DC + AC)
  407. unsigned char SerialNumber[64]; //charger system serial number
  408. unsigned char SystemId[128]; //charger system ID
  409. unsigned char SystemDateTime[32]; //charger system date and time
  410. unsigned char AcPhaseCount; //AC EVSE power phase quantity, 1: One phase 3: Three phase
  411. unsigned char AuthorisationMode; //0: enable, 1: disable
  412. unsigned char DefaultLanguage; //
  413. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  414. unsigned short AcPlugInTimes; //0~65535
  415. unsigned short GbPlugInTimes; //0~65535
  416. unsigned short Ccs1PlugInTime; //0~65535
  417. unsigned short Ccs2PlugInTimes; //0~65535
  418. unsigned short ChademoPlugInTimes; //0~65535
  419. unsigned char PsuAcInputType; //0: 220, 1: 277
  420. unsigned short RatingCurrent; //0: Depend on Model name, 1 ~ rating value amp
  421. unsigned short AcRatingCurrent; //for third gun; 0: Depend on Model name, 1 ~ rating value amp
  422. unsigned char isAPP; //for AuthorisationMode=0; 0:false, 1:true
  423. unsigned char isQRCode; //for AuthorisationMode=0; 0:false, 1:true
  424. unsigned char isRFID; //for AuthorisationMode=0; 0:false, 1:true
  425. unsigned char QRCodeMadeMode; //for isQRCode=1 ; 0: default 1:customized
  426. unsigned char QRCodeContent[128]; //for QRCodeMadeMode=1
  427. unsigned char TotalConnectorCount; //Connector count
  428. unsigned char AcConnectorCount; // For DC type
  429. unsigned char SwitchDebugFlag; // Console Debug
  430. unsigned char AlwaysGfdFlag;
  431. /**************Charging***************/
  432. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  433. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW
  434. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp
  435. unsigned short AcMaxChargingCurrent; //for third gun; 0: rating value, 1 ~ RATING_CURRENT amp
  436. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  437. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  438. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  439. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  440. struct BillingConfigData BillingData;
  441. /**************Network***************/
  442. unsigned char FtpServer[256]; //the ftp server for Phihong server to do data transimission
  443. struct EthConfigData Eth0Interface;
  444. struct EthConfigData Eth1Interface;
  445. struct WifiConfigData AthInterface;
  446. struct TeleConfigData TelecomInterface;
  447. struct BtConfigData Bluetooth;
  448. /**************Backend***************/
  449. unsigned int BackendConnTimeout; //default : 300s
  450. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  451. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  452. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  453. unsigned char OcppServerURL[512]; //http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
  454. unsigned char ChargeBoxId[128];
  455. unsigned char chargePointVendor[20]; //the Vendor of the ChargePoint
  456. unsigned int Checksum; //4 bytes checksum
  457. struct LED LedInfo; // LED configuration info
  458. unsigned char ShowInformation;
  459. unsigned char isReqFirstUpgrade; //EVSE is request first upgrade from PH server
  460. unsigned char isEnableLocalPowerSharging; //0: Disable power sharing 1: Enable power sharing
  461. unsigned char StopChargingByButton; //0: Disable 1: Enable
  462. /************PowerCabinet************/
  463. WiringInfoData WiringInfo;
  464. };
  465. struct ChargingInfoData
  466. {
  467. unsigned char Index;
  468. unsigned char slotsIndex;
  469. unsigned char Type; // 0 : Chademo, 1 : CCS, 2: GB
  470. unsigned char type_index;
  471. unsigned char Evboard_id; // for EV board
  472. unsigned char StopChargeFlag; // for EV board
  473. unsigned char SystemStatus; //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  474. unsigned char PreviousSystemStatus; // 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  475. int ReservationId;
  476. unsigned char IsAvailable;
  477. float MaximumChargingVoltage; // unit 0.1V
  478. float AvailableChargingCurrent; // unit 0.1A
  479. float AvailableChargingPower; // unit .01kW
  480. float DividChargingCurrent; //0~6553.5 amp
  481. float DeratingChargingCurrent; //0~6553.5 amp
  482. float DeratingChargingPower; //0~6553.5 kW
  483. float FuseChargingVoltage; //0~6553.5 volt
  484. float FireChargingVoltage; //0~6553.5 volt
  485. float PresentChargingVoltage; //0~6553.5 volt
  486. float PresentChargingCurrent; //0~6553.5 amp
  487. float PresentChargingPower; //0~6553.5 kW
  488. float PresentChargedEnergy; //0~6553.5 kWh
  489. int PresentChargedDuration; // second
  490. int RemainChargingDuration; // second
  491. float EvBatteryMaxVoltage; // 0~6553.5 volt
  492. float EvBatterytargetVoltage; // 0~6553.5 volt
  493. float EvBatterytargetCurrent; //102.3 0~200(A) (unit:1A)
  494. int EvBatterySoc; // 0~100%
  495. unsigned char ConnectorPlugIn; //0: unplug, 1: Plug-in
  496. unsigned char GunLocked; //0: unlocked 1: locked
  497. float PilotVoltage;
  498. unsigned char PilotState;//1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
  499. unsigned char PilotDuty; // 0~100%
  500. unsigned char StartUserId[32]; // This ID is trigger start charging event user by RFID, back-end, BLE.
  501. unsigned char StartDateTime[32]; // Charging cycle start date time
  502. unsigned char StopDateTime[32]; // Charging cycle stop date time
  503. unsigned char StartMethod;
  504. float ChargingFee;
  505. // Connector Temp
  506. unsigned char ConnectorTemp; //0x00: -60¢XC ~ 0xFE: 194
  507. // Charging Status
  508. unsigned char GroundFaultStatus; // for GFD result => 0x00 : None, 0x01 : Can Start Charging, 0x02 : Stop Charging
  509. unsigned short RealRatingPower;
  510. unsigned char RelayWeldingCheck; // 0 : No Comp., 1 : Comp.
  511. unsigned char PrechargeStatus; // for ccs precharge => 0x00 : None defined, 0x01 : Accepted
  512. float PowerConsumption; // This contains the meter value (Power Consumption) kWh
  513. unsigned char RelayK1K2Status; // 0x00 : open, 0x01 : close
  514. unsigned char RelayKPK2Status; // 0x00 : open, 0x01 : close
  515. unsigned char TimeoutFlag; // 0 : none,
  516. struct timeval TimeoutTimer;
  517. unsigned char MaxChargeEnable;
  518. unsigned char IsReadyToCharging;
  519. unsigned char CcsAuthentication; // 0:EIM, 1:EIM & PnC mixed
  520. unsigned char AcCcsChargingMode; // 0:BC (PWM) only, 1:BC & PLC mixed
  521. unsigned short SampleChargingCur[10];
  522. /**************Alston for AC***************/
  523. unsigned char SelfTest_Comp;
  524. unsigned char version[16];
  525. unsigned char IsModeChagned;
  526. unsigned char IsCharging;
  527. unsigned char IsErrorOccur;
  528. float RealMaxVoltage;
  529. float RealMaxCurrent;
  530. float RealMaxPower;
  531. unsigned char ConnectorWarningCode[7];
  532. unsigned char ConnectorAlarmCode[7];
  533. unsigned char EvConnAlarmCode[7];
  534. float ChargingProfileCurrent; //0~6553.5 amp
  535. float ChargingProfilePower; //0~6553.5 kW
  536. float PresentChargingVoltageL2; //0~6553.5 volt
  537. float PresentChargingVoltageL3; //0~6553.5 volt
  538. float PresentChargingCurrentL2; //0~6553.5 amp
  539. float PresentChargingCurrentL3; //0~6553.5 amp
  540. char RemoteStartFlag;
  541. unsigned char MaxChargingToAverPassFlag;
  542. unsigned char EVCCID[18]; //the MAC address of the EVCC in Hex
  543. unsigned char isRemoteStart;
  544. struct Schedule schedule; // Schedule
  545. int EvBatteryStartSoc; // 0~100%
  546. unsigned char NormalStopChargeFlag; // for EV board
  547. ChargingStop ChargingStopFlag;
  548. };
  549. typedef union
  550. {
  551. unsigned int SettingValue;
  552. struct
  553. {
  554. unsigned int DuplicateIp:1;
  555. unsigned int DuplicateIpConfirm:1;
  556. unsigned int DispenserConfigSync:1; // 0: not synced, 1: synced
  557. unsigned int MiscNeedAnnouncement:1; // 0: no need, 1: need send misc command
  558. unsigned int NeedDispenserVerInfo:1; // 0: no need, 1: need dispenser to report it's version info
  559. unsigned int EnableAutoGunSelection:1; // 0: disable, 1: enable auto gun selection
  560. unsigned int AuthorizeRequest:1; // 0: idle, 1: requesting ( dispenser -> cabinet)
  561. unsigned int ConnectorTimeoutConfigRequest:1; // 0: no request, 1: connector timeout setting ( ocpp -> cabinet -> dispenser)
  562. unsigned int DefaultPriceConfigRequest:1; // 0: no request, 1: default price setting ( ocpp -> cabinet -> dispenser)
  563. unsigned int CurrencyConfigRequest:1; // 0: no request, 1: currency setting ( ocpp -> cabinet -> dispenser)
  564. unsigned int HardwareRebootRequest:1; // 0: no request, 1: hardware reboot request ( ocpp -> cabinet -> dispenser)
  565. unsigned int HardwareRebootConfirm:1; // 0: no effect, 1: dispenser confirmed
  566. unsigned int SoftwareResetRequest:1; // 0: no request, 1: software reset request ( ocpp -> cabinet -> dispenser)
  567. unsigned int SoftwareResetConfirm:1; // 0: no effect, 1: dispenser confirmed
  568. unsigned int FirmwareUpdateRequest:1; // firmware update request
  569. unsigned int FirmwareUpdateConfirm:1; // firmware update start
  570. unsigned int FirmwareUpdateCompleted:1; // firmware update completed
  571. unsigned int BackendStatusRequest:1; // 0: no request, 1: backend connection status has changed ( cabinet -> dispenser)
  572. unsigned int EthernetStatusRequest:1; // 0: no request, 1: ethernet connection status has changed ( cabinet -> dispenser)
  573. unsigned int WiFiStatusRequest:1; // 0: no request, 1: wifi connection status has changed ( cabinet -> dispenser)
  574. unsigned int TelcomModemStatusRequest:1; // 0: no request, 1: 4g connection status has changed ( cabinet -> dispenser)
  575. unsigned int BillingStatusRequest:1; // 0: no request, 1: billing status has changed ( cabinet -> dispenser)
  576. unsigned int StopButtonStatusRequest:1; // 0: no request, 1: stop charging button status has changed ( cabinet -> dispenser)
  577. unsigned int res:9;
  578. }bits;
  579. }DispenserSettingFlag;
  580. struct DispenserModule
  581. {
  582. unsigned char LocalStatus; // 0: None, 1: Identification, 2: Idle, 3: Alarm, 4: Charging, 5: _DS_Timeout
  583. unsigned char ConnectorQuantity; //Connector count
  584. unsigned char ConnectorID[2]; //Available Connector ID: 1 ~ 4
  585. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  586. unsigned char ModelName[64]; //charger model name
  587. unsigned char SerialNumber[64]; //charger system serial number
  588. unsigned char SystemId[128]; //charger system ID
  589. unsigned char AuthorisationMode; //0: enable, 1: disable
  590. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  591. unsigned char isAPP; //for AuthorisationMode=0; 0:false, 1:true
  592. unsigned char isQRCode; //for AuthorisationMode=0; 0:false, 1:true
  593. unsigned char isRFID; //for AuthorisationMode=0; 0:false, 1:true
  594. unsigned char QRCodeMadeMode; //for isQRCode=1 ; 0: default 1:customized
  595. unsigned char QRCodeContent[128]; //for QRCodeMadeMode=1
  596. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  597. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  598. unsigned char CsuKernelFwRev[32]; //CSU board OS kernel firmware version
  599. unsigned char CsuRootFsFwRev[32]; //CSU board root file system firmware version
  600. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  601. unsigned char LcmFwRev[32]; //LCM module firmware version
  602. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  603. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  604. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  605. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  606. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  607. unsigned char LedModuleFwRev[32]; //LED control module firmware version
  608. unsigned char Connector1FwRev[32]; //Connector1 module firmware version
  609. unsigned char Connector2FwRev[32]; //Connector2 module firmware version
  610. struct LED LedInfo; // LED configuration info
  611. // 0: Authorize idle, 1: Authorize wait, 2: Authorizing
  612. unsigned char AuthStatus; // 3: Authorize done, 4: Authorize end
  613. unsigned char AuthTarget; // Authorize Target Connector ID: 1 ~ 4, AutoSelection: 0xFF
  614. unsigned char AuthType; // 0: _AuthType_None, 1: _AuthType_RFID, 2: _AuthType_RemoteStart
  615. unsigned char AuthResult; // 0: _AuthResult_None, 1: _AuthResult_Valid, 2: _AuthResult_Invalid
  616. DispenserSettingFlag Setting;
  617. char FwFileName[128];
  618. unsigned char ConnectionChannel;
  619. };
  620. struct ConnectionInfoData
  621. {
  622. unsigned char Status; // 0: free, 1: WaitModelName, 2: DispenserMatched
  623. unsigned char DispenserIndex;
  624. unsigned int IpAddress;
  625. };
  626. struct DispenserInfoData
  627. {
  628. unsigned char DispenserQuantity; // record max dispenser quantity
  629. unsigned char TotalConnectorQuantity; // record max connector quantity
  630. struct DispenserModule Dispenser[GENERAL_GUN_QUANTITY];
  631. unsigned char PresentDispenserQuantity;
  632. unsigned char PresentConnectorQuantity;
  633. union
  634. {
  635. unsigned char Status;
  636. struct
  637. {
  638. unsigned char Dispenser1:1; // 1: ever checkin, 0: never checkin
  639. unsigned char Dispenser2:1; // 1: ever checkin, 0: never checkin
  640. unsigned char Dispenser3:1; // 1: ever checkin, 0: never checkin
  641. unsigned char Dispenser4:1; // 1: ever checkin, 0: never checkin
  642. unsigned char Dispenser5:1; // 1: ever checkin, 0: never checkin
  643. unsigned char Dispenser6:1; // 1: ever checkin, 0: never checkin
  644. unsigned char Dispenser7:1; // 1: ever checkin, 0: never checkin
  645. unsigned char Dispenser8:1; // 1: ever checkin, 0: never checkin
  646. }Flag;
  647. }CheckInLog; // record dispenser checkin status
  648. unsigned char ConnectorLog[GENERAL_GUN_QUANTITY]; // record connector quantity of dispenser
  649. struct ConnectionInfoData ConnectionInfo[GENERAL_GUN_QUANTITY];
  650. unsigned short ConnectorTimeout; // connector plug in timeout, unit 1s
  651. unsigned int DefaultPrice; // dispenser default price, unit: 0.01 (dollar/kWh)
  652. unsigned char Currency; // dispenser currency index
  653. };
  654. struct WARNING_CODE_INFO
  655. {
  656. unsigned char WarningCount;
  657. unsigned char PageIndex;
  658. unsigned char WarningCode[10][7];
  659. unsigned char Level;
  660. unsigned char ExtraErrProcess; // 0 : none, 1 : input uvp..
  661. };
  662. typedef union
  663. {
  664. unsigned int Value;
  665. struct
  666. {
  667. unsigned int PermissionRequest:1; // 0: no request, 1: dispenser request to charging ( dispenser -> cabinet)
  668. unsigned int RemoteStartRequest:1; // 0: no request, 1: remote start ( ocpp -> cabinet -> dispenser)
  669. unsigned int RemoteStartConfirm:1;
  670. unsigned int RemoteStopRequest:1; // 0: no request, 1: remote stop ( ocpp -> cabinet -> dispenser)
  671. unsigned int RemoteStopConfirm:1;
  672. unsigned int UnlockStopRequest:1; // 0: no request, 1: Unlock stop ( ocpp -> cabinet -> dispenser)
  673. unsigned int UnlockStopConfirm:1;
  674. unsigned int TimeoutStopRequest:1; // 0: no request, 1: ethernet timeout stop ( dispenser -> cabinet)
  675. unsigned int PsuReleasable:1;
  676. unsigned int AvailabilityRequest:1; // 0: no request, 1: change availability ( ocpp -> cabinet -> dispenser)
  677. unsigned int AccountBalanceRequest:1; // 0: no request, 1: set account balance ( ocpp -> cabinet -> dispenser)
  678. unsigned int AnnounceBalance:1; //
  679. unsigned int StartWaitPlug:1; //
  680. unsigned int NeedCleanAuthorizeInfo:1; //
  681. unsigned int SwipeRfidConfirm:1;
  682. unsigned int OutputLimitEnable:1; // 0: disable, 1: enable
  683. unsigned int ChargingPermission:2; // 0: not allowed, 1: allowed, 2: wait
  684. unsigned int NormalStopRequest:1; // 0: no effect, 1: connector normal stop request ( dispenser -> cabinet)
  685. unsigned int AlarmStopRequest:1; // 0: no effect, 1: connector alarm stop request ( dispenser -> cabinet)
  686. unsigned int FaultStatusRequest:1;
  687. unsigned int Disconnection:1;
  688. unsigned int res:10;
  689. }bits;
  690. }ConnectorParameter;
  691. struct ConnectorInfoData
  692. {
  693. unsigned char RemoteStatus; // 0: Idle, 1: Preparing, 2: Charging, 3: Terminating, 4: Alarm
  694. unsigned char Enable; // 0: Disable, 1: Enable
  695. unsigned char ReadyToCharge; // 0: Not Ready, 1: Ready to Charge (no use)
  696. unsigned char ParentDispensetIndex; // Parent Dispenser Index: 0 ~ 3
  697. ConnectorParameter Parameter;
  698. unsigned char AuthorizingType;
  699. unsigned char AuthorizingResult; // 0: _AuthResult_None, 1: _AuthResult_Valid, 2: _AuthResult_Invalid
  700. struct ChargingInfoData GeneralChargingData;
  701. struct WARNING_CODE_INFO WarningInfo;
  702. unsigned char RemotenAlarmCode[7];
  703. unsigned short RemoteChargingVoltage; // charging voltage from connector, unit: 0.1V
  704. unsigned short RemoteChargingCurrent; // charging current from connector, unit: 0.1A
  705. unsigned int RemoteRemainChargingDuration; // remain charging duration from connector, unit: 1s
  706. unsigned char RemoteSoc; // ev battery soc from connector, unit: 1%
  707. unsigned short RemoteMaxPhysicalVoltage; // max physical voltage from connector, unit: 0.1V
  708. unsigned short RemoteMaxPhysicalCurrent; // max physical current from connector, unit: 0.1A
  709. unsigned short RemoteTargetVoltage; // target voltage from connector, unit: 0.1V
  710. unsigned short RemoteTargetCurrent; // target current from connector, unit: 0.1A
  711. unsigned short RemoteLimitVoltage; // limit voltage to psu voltage command, unit: 0.1V
  712. unsigned short RemoteLimitCurrent; // limit current to psu current command, unit: 0.1A
  713. unsigned short MaxTotalChargingCurrent; // max total output current, unit: 0.1A
  714. unsigned short MaxTotalChargingPower; // max total output power, unit: 0.1kw
  715. unsigned short MaxOutputEnergy; //0: no limit, 1 ~ 65535 kWh
  716. unsigned short MaxOutputDuration; //0: no limit, 1 ~ 65535 minutes
  717. unsigned int UserPrice; // connector user's user price, unit: 0.01 (dollar / kWh)
  718. unsigned int TotalCost; // connector user's total cost, unit: 0.01 dollar
  719. int AccountBalance; // connector user's account balance, unit: 0.01 dollar
  720. };
  721. typedef union
  722. {
  723. unsigned int SettingValue;
  724. struct
  725. {
  726. unsigned int StartAuthorize:1; // 0: idle, 1: authorizing
  727. unsigned int AuthorizingCompleted:1; // 0: not yet, 1: authorizing completed
  728. unsigned int DispenserDisconnection:1; // 0: no connection, 1: dispenser connected
  729. unsigned int BackendAuthorized:1; // 0: local authorized, 1: backend authorized
  730. unsigned int WiringInfoChanged:1; // 0: no effect, 1: wiring info has changed
  731. unsigned int EnableWriteWiringInfo:1; // 0: no effect, 1: enable write wiring info after timeout
  732. unsigned int CleanWiringInfo:1; // 0: no effect, 1: clean wiring info
  733. unsigned int res:25;
  734. }bits;
  735. }CabinetSettingFlag;
  736. typedef struct
  737. {
  738. unsigned int ConnectionTimeout; // unit: 1s
  739. unsigned int DefaultPrice; // unit: 0.01dollar
  740. unsigned int Currency; // currency index
  741. unsigned int BackendStatus; // 0: disable, 1: connected, 2: disconnected
  742. unsigned int EthernetStatus; // 0: disable, 1: connected, 2: disconnected
  743. unsigned int WiFiStatus; // 0: disable, 1: connected, 2: disconnected
  744. unsigned int TelcomModemStatus; // 0: disable, 1: connected, 2: disconnected
  745. unsigned int BillingStatus; // 0: disable, 1: enable
  746. unsigned int StopChargingButton; // 0: disable, 1: enable
  747. unsigned int HardwareReboot; // 1: HardwareReboot, Other value: no effect
  748. unsigned int SoftwareRestart; // 1: SoftwareRestart, Other value: no effect
  749. }CabinetMiscCommand;
  750. struct SysInfoData
  751. {
  752. /**************System***************/
  753. unsigned char OcppRunningVer; // 0: 1.6J 1:2.0
  754. unsigned char BootingStatus; // 0 : booting, 1 : Initializing Complete.
  755. unsigned char AuthorizeFlag; // 0 : None, 1 : Authorizing
  756. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  757. float InputVoltageR; //0~655.35 volt
  758. float InputVoltageS; //0~655.35 volt
  759. float InputVoltageT; //0~655.35 volt
  760. unsigned int SystemFanRotaSpeed; //0 ~ 65535 RPM
  761. unsigned int PsuFanRotaSpeed; //0 ~ 65535 RPM
  762. unsigned char AuxPower5V; //0 ~ 255 volt
  763. unsigned char AuxPower12V; //0 ~ 255 volt
  764. unsigned char AuxPower24V; //0 ~ 255 volt
  765. unsigned char AuxPower48V; //0 ~ 255 volt
  766. unsigned char CsuHwRev[32]; //CSU board hardware version
  767. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  768. unsigned char CsuKernelFwRev[32];//CSU board OS kernel firmware version
  769. unsigned char CsuRootFsFwRev[32];//CSU board root file system firmware version
  770. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  771. unsigned char LcmHwRev[32]; //LCM module hardware version
  772. unsigned char LcmFwRev[32]; //LCM module firmware version
  773. unsigned char PsuHwRev[32]; //PSU hardware version
  774. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  775. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  776. unsigned char AuxPwrHwRev[32]; //Aux. power module hardware version
  777. unsigned char AuxPwrFwRev[32]; //Aux. power module firmware version
  778. unsigned char FanModuleHwRev[32]; //Fan module hardware version
  779. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  780. unsigned char RelayModuleHwRev[32]; //Relay control module hardware version
  781. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  782. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  783. unsigned char LedModuleFwRev[32]; //LED control module firmware version
  784. unsigned char Connector1FwRev[32]; //Connector1 module firmware version
  785. unsigned char Connector2FwRev[32]; //Connector2 module firmware version
  786. int SystemAmbientTemp; // -40 ~ 215 degree C
  787. int SystemCriticalTemp; // -40 ~ 215 degree C
  788. int CcsConnectorTemp; // -40 ~ 215 degree C
  789. int PsuAmbientTemp; // -40 ~ 215 degree C
  790. /**************Charging***************/
  791. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  792. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  793. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  794. struct ChargingInfoData AcChargingData[AC_QUANTITY];
  795. unsigned char CurGunSelected;
  796. unsigned char CurGunSelectedByAc;
  797. /**************Network***************/
  798. unsigned char InternetConn; //0: disconnected, 1: connected
  799. /**************Backend***************/
  800. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  801. char OrderCharging;
  802. /**************Alston***************/
  803. unsigned char WaitForPlugit; //0: none scan, 1: scanning
  804. unsigned char PageIndex; //0 : Initialize
  805. //1 : idle
  806. //4 : Authorizing
  807. //5 : Authorizing complete
  808. //6 : Authorizing fail
  809. //7 : Wait for Plug
  810. //8 : Pre-charge
  811. //9 : Charging
  812. unsigned char SelfTestSeq; //
  813. unsigned char ReAssignedFlag; //
  814. unsigned char CanAverageCharging;
  815. unsigned char MainChargingMode; // 0 : Max, 1 : Average
  816. unsigned char BridgeRelayStatus;
  817. unsigned char FirmwareUpdate; // 0 : none, 1 : update.
  818. unsigned char AcContactorStatus; // 0: disconnected, 1: connected
  819. unsigned char SystemTimeoutFlag; // 0 : none, 1 : self test
  820. struct timeval SystemTimeoutTimer;
  821. unsigned char SystemPage;
  822. unsigned char ConnectorPage;
  823. unsigned char IsAlternatvieConf; // 0 : normal, 1 : alternative
  824. unsigned char StartToChargingFlag; // 0 : Stop, 1 : Start for modbus
  825. unsigned char ChargerType; // 0 : IEC, 1 : UL
  826. unsigned char ethInternetConn; // 0 : disconnected, 1: connected
  827. // DO360
  828. unsigned char Relay2ModuleHwRev[32]; //Relay control module hardware version
  829. unsigned char Relay2ModuleFwRev[32]; //Relay control module firmware version
  830. struct DispenserInfoData DispenserInfo;
  831. struct ConnectorInfoData ConnectorInfo[GENERAL_GUN_QUANTITY];
  832. unsigned char AuthorizedDispenser; // record authorized dispenser index
  833. unsigned char AuthorizedTarget; // record authorized target: 1 ~ 4, 0xFF
  834. unsigned char AuthorizedType; // record authorized type
  835. unsigned char AuthorizedStatus; // cabinet authorized status
  836. CabinetSettingFlag CabinetSetting;
  837. CabinetMiscCommand CabinetMicsStatus;
  838. struct LocalSharingInfo localSharingInfo; // Local power sharing info structure
  839. };
  840. struct SysConfigAndInfo
  841. {
  842. struct SysConfigData SysConfig;
  843. struct SysInfoData SysInfo;
  844. struct WARNING_CODE_INFO SysWarningInfo;
  845. };
  846. char Currency[54][3]=
  847. {
  848. "AED", // - Emirati Dirham
  849. "ARS", // - Argentine Peso
  850. "AUD", // - Australian Dollar
  851. "BGN", // - Bulgarian Lev
  852. "BHD", // - Bahraini Dinar
  853. "BND", // - Bruneian Dollar
  854. "BRL", // - Brazilian Real
  855. "BWP", // - Botswana Pula
  856. "CAD", // - Canadian Dollar
  857. "CHF", // - Swiss Franc
  858. "CLP", // - Chilean Peso
  859. "CNY", // - Chinese Yuan Renminbi
  860. "COP", // - Colombian Peso
  861. "CZK", // - Czech Koruna
  862. "DKK", // - Danish Krone
  863. "EUR", // - Euro
  864. "GBP", // - British Pound
  865. "HKD", // - Hong Kong Dollar
  866. "HRK", // - Croatian Kuna
  867. "HUF", // - Hungarian Forint
  868. "IDR", // - Indonesian Rupiah
  869. "ILS", // - Israeli Shekel
  870. "INR", // - Indian Rupee
  871. "IRR", // - Iranian Rial
  872. "ISK", // - Icelandic Krona
  873. "JPY", // - Japanese Yen
  874. "KRW", // - South Korean Won
  875. "KWD", // - Kuwaiti Dinar
  876. "KZT", // - Kazakhstani Tenge
  877. "LKR", // - Sri Lankan Rupee
  878. "LYD", // - Libyan Dinar
  879. "MUR", // - Mauritian Rupee
  880. "MXN", // - Mexican Peso
  881. "MYR", // - Malaysian Ringgit
  882. "NOK", // - Norwegian Krone
  883. "NPR", // - Nepalese Rupee
  884. "NZD", // - New Zealand Dollar
  885. "OMR", // - Omani Rial
  886. "PHP", // - Philippine Peso
  887. "PKR", // - Pakistani Rupee
  888. "PLN", // - Polish Zloty
  889. "QAR", // - Qatari Riyal
  890. "RON", // - Romanian New Leu
  891. "RUB", // - Russian Ruble
  892. "SAR", // - Saudi Arabian Riyal
  893. "SEK", // - Swedish Krona
  894. "SGD", // - Singapore Dollar
  895. "THB", // - Thai Baht
  896. "TRY", // - Turkish Lira
  897. "TTD", // - Trinidadian Dollar
  898. "TWD", // - Taiwan New Dollar
  899. "USD", // - US Dollar
  900. "VEF", // - Venezuelan Bolivar
  901. "ZAR" // - South African Rand
  902. };
  903. /**************************************************************************************/
  904. /**************************Alarm Share memory**************************************/
  905. /***************************************************************************************
  906. Status Code A B C D E F
  907. 0: Issue 1: From EVSE 1: Fault (unrecoverable) 001 ~ 999 serial number
  908. e.g., hardware broken, system latch
  909. 1: Recovered 2: From EV 2: Alarm (recoverable)
  910. e.g., OTP, OVP
  911. 3: From Backend 3: Information
  912. e.g., swipe card to stop charging
  913. according to XXX.Revxx
  914. ***************************************************************************************/
  915. /**************************************************************************************/
  916. char FaultStatusCode[40][6]=
  917. {
  918. "011001", //CHAdeMO output fuse blew
  919. "011002", //CCS output fuse blew
  920. "011003", //GB output fuse blew
  921. "011004", //RCD/CCID self-test fail
  922. "011005", //AC input contactor 1 welding
  923. "011006", //AC input contactor 1 driving fault
  924. "011007", //AC input contactor 2 welding
  925. "011008", //AC input contactor 2 driving fault
  926. "011009", //AC output relay welding
  927. "011010", //AC output relay driving fault
  928. "011011", //CHAdeMO output relay welding
  929. "011012", //CHAdeMO output relay driving fault
  930. "011013", //CCS output relay welding
  931. "011014", //CCS output relay driving fault
  932. "011015", //GB output relay welding
  933. "011016", //GB output relay driving fault
  934. "011017", //AC connector temperature sensor broken
  935. "011018", //CHAdeMO connector temperature sensor broken
  936. "011019", //CCS connector temperature sensor broken
  937. "011020", //GB connector temperature sensor broken
  938. "011021", //WiFi module broken
  939. "011022", //3G/4G module broken
  940. "011023", //Aux. power module broken
  941. "011024", //Relay control module /smart box broken
  942. "011025", //CHAdeMO connector lock fail
  943. "011026", //GB connector lock fail
  944. "011027", //AC connector lock fail
  945. "011028", //CHAdeMO module broken
  946. "011029", //CCS module broken
  947. "011030", //GBT module broken
  948. "011031", //PSU module broken
  949. "011032", //RCD/CCID module broken
  950. "011033", //Maximum Output Current setup error
  951. "011034", //Shutter fault
  952. "011035", //Ble module broken
  953. "011036", //Rotary switch fault
  954. "011037", //CCS liquid chiller water level fault
  955. "011038", //Reserved
  956. "011039", //Reserved
  957. "011040" //Reserved
  958. };
  959. struct FaultCodeData
  960. {
  961. unsigned char PreviousFaultVal[FaultCodeLength];
  962. union
  963. {
  964. unsigned char FaultVal[FaultCodeLength];
  965. struct
  966. {
  967. //FaultVal[0]
  968. unsigned char ChademoOutputFuseBlew:1; //bit 0
  969. unsigned char CcsOutputFuseBlew:1; //bit 1
  970. unsigned char GbOutputFuseBlew:1; //bit 2
  971. unsigned char RcdSelfTestFail:1; //bit 3
  972. unsigned char AcInputContactor1Welding:1; //bit 4
  973. unsigned char AcInputContactor1DrivingFault:1; //bit 5
  974. unsigned char AcInputContactor2Welding:1; //bit 6
  975. unsigned char AcInputContactor2DrivingFault:1; //bit 7
  976. //FaultVal[1]
  977. unsigned char AcOutputRelayWelding:1; //bit 0
  978. unsigned char AcOutputRelayDrivingFault:1; //bit 1
  979. unsigned char ChademoOutputRelayWelding:1; //bit 2
  980. unsigned char ChademoOutputRelayDrivingFault:1; //bit 3
  981. unsigned char CcsOutputRelayWelding:1; //bit 4
  982. unsigned char CcsOutputRelayDrivingFault:1; //bit 5
  983. unsigned char GbOutputRelayWelding:1; //bit 6
  984. unsigned char GbOutputRelayDrivingFault:1; //bit 7
  985. //FaultVal[2]
  986. unsigned char AcConnectorTempSensorBroken:1; //bit 0
  987. unsigned char ChademoConnectorTempSensorBroken:1; //bit 1
  988. unsigned char CcsConnectorTempSensorBroken:1; //bit 2
  989. unsigned char GbConnectorTempSensorBroken:1; //bit 3
  990. unsigned char WiFiModuleBroken:1; //bit 4
  991. unsigned char Telecom4GModuleBroken:1; //bit 5
  992. unsigned char AuxPowerModuleBroken:1; //bit 6
  993. unsigned char RelayControlModuleBroken :1; //bit 7
  994. //FaultVal[3]
  995. unsigned char ChademoConnectorLockFail:1; //bit 0
  996. unsigned char GbConnectorLockFail:1; //bit 1
  997. unsigned char AcConnectorLockFail:1; //bit 2
  998. unsigned char ChademoModuleBroken:1; //bit 3
  999. unsigned char CcsModuleBroken:1; //bit 4
  1000. unsigned char GbModuleBroken:1; //bit 5
  1001. unsigned char PsuModuleBroken:1; //bit 6
  1002. unsigned char RcdCcidModuleBroken:1; //bit 7
  1003. //FaultVal[4]
  1004. unsigned char MaximumOutputCurrentSetupError:1; //bit 0
  1005. unsigned char ShutterFault:1; //bit 1
  1006. unsigned char BleModuleBroken:1; //bit 2
  1007. unsigned char RotarySwitchFault:1; //bit 3
  1008. unsigned char CcsLiquidChillerWaterLevelFault:1; //bit 4
  1009. unsigned char :3; //bit 5 ~ 7 reserved
  1010. }bits;
  1011. }FaultEvents;
  1012. };
  1013. char AlarmStatusCode[128][6]=
  1014. {
  1015. "012200", //System L1 input OVP
  1016. "012201", //System L2 input OVP
  1017. "012202", //System L3 input OVP
  1018. "012203", //System L1 input UVP
  1019. "012204", //System L2 input UVP
  1020. "012205", //System L3 input UVP
  1021. "012206", //PSU L1 input OVP
  1022. "012207", //PSU L2 input OVP
  1023. "012208", //PSU L3 input OVP
  1024. "012209", //PSU L1 input UVP
  1025. "012210", //PSU L2 input UVP
  1026. "012211", //PSU L3 input UVP
  1027. "012212", //System L1 input drop
  1028. "012213", //System L2 input drop
  1029. "012214", //System L3 input drop
  1030. "012215", //System AC output OVP
  1031. "012216", //System AC output OCP L1
  1032. "012217", //System CHAdeMO output OVP
  1033. "012218", //System CHAdeMO output OCP
  1034. "012219", //System CCS output OVP
  1035. "012220", //System CCS output OCP
  1036. "012221", //System GB output OVP
  1037. "012222", //System GB output OCP
  1038. "012223", //System ambient/inlet OTP
  1039. "012224", //System critical point OTP
  1040. "012225", //PSU ambient/inlet OTP
  1041. "012226", //PSU critical point OTP
  1042. "012227", //Aux. power module OTP
  1043. "012228", //Relay board/smart box OTP
  1044. "012229", //CHAdeMO connector OTP
  1045. "012230", //CCS connector OTP
  1046. "012231", //GB connector OTP
  1047. "012232", //AC connector OTP
  1048. "012233", //RCD/CCID trip
  1049. "012234", //CHAdeMO GFD trip
  1050. "012235", //CCS GFD trip
  1051. "012236", //GB GFD trip
  1052. "012237", //SPD trip
  1053. "012238", //Main power breaker trip
  1054. "012239", //Aux. power breaker trip
  1055. "012240", //PSU communication fail
  1056. "012241", //WiFi module communication fail
  1057. "012242", //3G/4G module communication fail
  1058. "012243", //RFID module communication fail
  1059. "012244", //Bluetooth module communication fail
  1060. "012245", //LCM module communication fail
  1061. "012246", //Aux. power module communication fail
  1062. "012247", //Relay control boaed/smart box communication fail
  1063. "012248", //CCS module communication fail
  1064. "012249", //CHAdeMO module communication fail
  1065. "012250", //GBT module communication fail
  1066. "012251", //Emergency stop
  1067. "012252", //Door open
  1068. "012253", //System fan decay
  1069. "012254", //Fail to create share memory
  1070. "012255", //CSU initialization failed
  1071. "012256", //AC Ground Fault
  1072. "012257", //MCU self-test Fault
  1073. "012258", //Relay self-test Fault
  1074. "012259", //CHAdeMO groundfault detection timeout (GFD)
  1075. "012260", //CCS groundfault detection timeout (GFD)
  1076. "012261", //GB groundfault detection timeout (GFD)
  1077. "012262", //Circuit Short L1
  1078. "012263", // PSU Duplicate ID
  1079. "012264", // PSU Output Short Circuit
  1080. "012265", // PSU Discharge Abnormal
  1081. "012266", // PSU Dc Side ShutDown
  1082. "012267", // PSU Failure Alarm
  1083. "012268", // PSU Protection Alarm
  1084. "012269", // PSU FanFailure Alarm
  1085. "012270", // PSU Input UVP
  1086. "012271", // PSU Input OVP
  1087. "012272", // PSU WalkIn State
  1088. "012273", // PSU Power Limited State
  1089. "012274", // PSU Id Repeat
  1090. "012275", // PSU Severe Uneven Current
  1091. "012276", // PSU Three Phase Input Inadequate
  1092. "012277", // PSU Three Phase Onput Imbalance
  1093. "012278", // PSU Ffc Side ShutDown
  1094. "012279", // NO PSU Resource
  1095. "012280", // Self test Failed due to communication of Relayboard failure
  1096. "012281", // Self test Failed due to communication of Fanboard failure
  1097. "012282", // Self test Failed due to communication of Primary failure
  1098. "012283", // Self test Failed due to communication of Chademoboard failure
  1099. "012284", // Self test Failed due to communication of CCSboard failure
  1100. "012285", // Self test Failed due to AC Contact failure
  1101. "012286", // Self test Failed due to communication of PSU failure
  1102. "012287", // Self test Failed due to Model name is none match
  1103. "012288", // CCS output UVP
  1104. "012289", // Chademo output UVP
  1105. "012290", // GBT output UVP
  1106. "012291", // Self test Failed due to communication of GBTboard failure
  1107. "012292", // Self test Failed due to communication of AC failure
  1108. "012293", // Self test Failed due to communication of Ledboard failure
  1109. "012294", // Ac input OVP
  1110. "012295", // Ac input UVP
  1111. "012296", // CHAdeMO groundfault detection - warning
  1112. "012297", // CCS groundfault detection - warning
  1113. "012298", // GB groundfault detection - warning
  1114. "012299", // System AC output OCP L2
  1115. "012300", // System AC output OCP L3
  1116. "012301", // Circuit Short L2
  1117. "012302", // Circuit Short L3
  1118. "012303", // CCS liquid chiller water level warning
  1119. "012304", // connection disconnected from power cabinet
  1120. "012305", // Meter communication timeout
  1121. "012306", // The dip switch of the PSU may be incorrect
  1122. "012307", // Psu Fuse Burn-Out
  1123. "012308", // Psu Pfc And Dcdc Communication Fault
  1124. "012309", // Psu Bus Voltage Unbalance
  1125. "012310", // Psu Bus Over Voltage
  1126. "012311", // Psu Bus Voltage Abnormal
  1127. "012312", // Psu Bus Under Voltage
  1128. "012313", // Psu Input Phase Loss
  1129. "012314", // Psu Fan Full Speed
  1130. "012315", // Psu Temperature Power Limit
  1131. "012316", // Psu Ac Power Limit
  1132. "012317", // Psu Dcdc Eeprom Fault
  1133. "012318", // Psu Pfc Eeprom Fault
  1134. "012319", // Psu Dcdc Over Voltage
  1135. "012320", // reserved
  1136. "012321", // reserved
  1137. "012322", // reserved
  1138. "012323", // reserved
  1139. "012324", // reserved
  1140. "012325", // reserved
  1141. "012326", // reserved
  1142. "012327", // reserved
  1143. };
  1144. struct AlarmCodeData
  1145. {
  1146. unsigned char PreviousAlarmVal[AlarmCodeLength];
  1147. union
  1148. {
  1149. unsigned char AlarmVal[AlarmCodeLength];
  1150. struct
  1151. {
  1152. //AlarmVal[0]
  1153. unsigned char SystemL1InputOVP:1; //bit 0
  1154. unsigned char SystemL2InputOVP:1; //bit 1
  1155. unsigned char SystemL3InputOVP:1; //bit 2
  1156. unsigned char SystemL1InputUVP:1; //bit 3
  1157. unsigned char SystemL2InputUVP:1; //bit 4
  1158. unsigned char SystemL3InputUVP:1; //bit 5
  1159. unsigned char PsuL1InputOVP:1; //bit 6
  1160. unsigned char PsuL2InputOVP:1; //bit 7
  1161. //AlarmVal[1]
  1162. unsigned char PsuL3InputOVP:1; //bit 0
  1163. unsigned char PsuL1InputUVP:1; //bit 1
  1164. unsigned char PsuL2InputUVP:1; //bit 2
  1165. unsigned char PsuL3InputUVP :1; //bit 3
  1166. unsigned char SystemL1InputDrop:1; //bit 4
  1167. unsigned char SystemL2InputDrop:1; //bit 5
  1168. unsigned char SystemL3InputDrop:1; //bit 6
  1169. unsigned char SystemAcOutputOVP:1; //bit 7
  1170. //AlarmVal[2]
  1171. unsigned char SystemAcOutputOCP:1; //bit 0
  1172. unsigned char SystemChademoOutputOVP:1; //bit 1
  1173. unsigned char SystemChademoOutputOCP:1; //bit 2
  1174. unsigned char SystemCcsOutputOVP:1; //bit 3
  1175. unsigned char SystemCcsOutputOCP:1; //bit 4
  1176. unsigned char SystemGbOutputOVP:1; //bit 5
  1177. unsigned char SystemGbOutputOCP:1; //bit 6
  1178. unsigned char SystemAmbientOTP :1; //bit 7
  1179. //AlarmVal[3]
  1180. unsigned char SystemCriticalPointOTP:1; //bit 0
  1181. unsigned char PsuAmbientOTP:1; //bit 1
  1182. unsigned char PsuCriticalPointOTP:1; //bit 2
  1183. unsigned char AuxPowerModuleOTP:1; //bit 3
  1184. unsigned char RelayBoardOTP:1; //bit 4
  1185. unsigned char ChademoConnectorOTP:1; //bit 5
  1186. unsigned char CcsConnectorOTP:1; //bit 6
  1187. unsigned char GbConnectorOTP:1; //bit 7
  1188. //AlarmVal[4]
  1189. unsigned char AcConnectorOTP:1; //bit 0
  1190. unsigned char RcdTrip:1; //bit 1
  1191. unsigned char ChademoGfdTrip:1; //bit 2
  1192. unsigned char CcsGfdTrip:1; //bit 3
  1193. unsigned char GbGfdTrip:1; //bit 4
  1194. unsigned char SpdTrip:1; //bit 5
  1195. unsigned char MainPowerBreakerTrip:1; //bit 6
  1196. unsigned char AuxPowerBreakerTrip:1; //bit 7
  1197. //AlarmVal[5]
  1198. unsigned char PsuCommunicationFail:1; //bit 0
  1199. unsigned char WiFiModuleCommFail:1; //bit 1
  1200. unsigned char Telecom4GModuleCommFail:1; //bit 2
  1201. unsigned char RfidModuleCommFail:1; //bit 3
  1202. unsigned char BluetoothModuleCommFail:1; //bit 4
  1203. unsigned char LcmModuleCommFail:1; //bit 5
  1204. unsigned char AuxPowerModuleCommFail:1; //bit 6
  1205. unsigned char RelayBoardCommFail:1; //bit 7
  1206. //AlarmVal[6]
  1207. unsigned char CcsModuleCommFail:1; //bit 0
  1208. unsigned char ChademoModuleCommFail:1; //bit 1
  1209. unsigned char GbModuleCommFail:1; //bit 2
  1210. unsigned char EmergencyStopTrip:1; //bit 3
  1211. unsigned char DoorOpen:1; //bit 4
  1212. unsigned char SystemFanDecay:1; //bit 5
  1213. unsigned char FailToCreateShareMemory:1; //bit 6
  1214. unsigned char CsuInitFailed:1; //bit 7
  1215. //AlarmVal[7]
  1216. unsigned char AcGroundfaultFail:1; //bit 0
  1217. unsigned char McuSelftestFail:1; //bit 1
  1218. unsigned char RelaySelftestFail:1; //bit 2
  1219. unsigned char ChademoGroundfaultTimeout:1; //bit 3
  1220. unsigned char CcsGroundfaultTimeout:1; //bit 4
  1221. unsigned char GbGroundfaultTimeout:1; //bit 5
  1222. unsigned char CircuitShort:1; //bit 6
  1223. unsigned char PsuDuplicateID:1; //bit 7
  1224. //AlarmVal[8]
  1225. unsigned char PsuOutputShortCircuit :1; //bit 0
  1226. unsigned char PsuDischargeAbnormal :1; //bit 1
  1227. unsigned char PsuDcSideShutDown :1; //bit 2
  1228. unsigned char PsuFailureAlarm :1; //bit 3
  1229. unsigned char PsuProtectionAlarm :1; //bit 4
  1230. unsigned char PsuFanFailureAlarm :1; //bit 5
  1231. unsigned char PsuInputUVP:1; //bit 6
  1232. unsigned char PsuInputOVP:1; //bit 7
  1233. //AlarmVal[9]
  1234. unsigned char PsuWalkInState :1; //bit 0
  1235. unsigned char PsuPowerLimitedState :1; //bit 1
  1236. unsigned char PsuIdRepeat :1; //bit 2
  1237. unsigned char PsuSevereUnevenCurrent :1; //bit 3
  1238. unsigned char PsuThreePhaseInputInadequate :1; //bit 4
  1239. unsigned char PsuThreePhaseOnputImbalance :1; //bit 5
  1240. unsigned char PsuFfcSideShutDown :1; //bit 6
  1241. unsigned char PsuNoResource:1; //bit 7
  1242. //AlarmVal[10]
  1243. unsigned char RelayboardStestFail :1; //bit 0
  1244. unsigned char FanboardStestFail :1; //bit 1
  1245. unsigned char PrimaryStestFail :1; //bit 2
  1246. unsigned char ChademoboardStestFail :1; //bit 3
  1247. unsigned char CCSboardStestFail :1; //bit 4
  1248. unsigned char AcContactStestFail :1; //bit 5
  1249. unsigned char PsuModuleStestFail :1; //bit 6
  1250. unsigned char ModelNameNoneMatchStestFail:1; //bit 7
  1251. //AlarmVal[11]
  1252. unsigned char CcsOutputUVPFail :1; //bit 0
  1253. unsigned char ChademoOutputUVPFail :1; //bit 1
  1254. unsigned char GbtOutputUVPFail :1; //bit 2
  1255. unsigned char GbtboardStestFail :1; //bit 3
  1256. unsigned char AcConnectorStestFail:1; //bit 4
  1257. unsigned char LedboardStestFail:1; //bit 5
  1258. unsigned char AcSystemInputOVP:1; //bit 6
  1259. unsigned char AcSystemInputUVP:1; //bit 7
  1260. //AlarmVal[12]
  1261. unsigned char ChademoGroundWarning :1; //bit 0
  1262. unsigned char CcsGroundfaultWarning :1; //bit 1
  1263. unsigned char GbGroundfaultWarning :1; //bit 2
  1264. unsigned char SystemAcOutputOCPL2:1; //bit 3
  1265. unsigned char SystemAcOutputOCPL3:1; //bit 4
  1266. unsigned char CircuitShortL2:1; //bit 5
  1267. unsigned char CircuitShortL3:1; //bit 6
  1268. unsigned char CcsLiquidChillerWaterLevelWarning:1; //bit 7
  1269. //AlarmVal[13]
  1270. unsigned char DisconnectedFromDo:1; //bit 0
  1271. unsigned char MeterCommTimeout:1; //bit 1
  1272. unsigned char PsuDipSwitchStestFail:1; //bit 2
  1273. unsigned char PsuFuseBurnOut:1; //bit 3
  1274. unsigned char PsuPfcAndDcdcCommFault:1; //bit 4
  1275. unsigned char PsuBusVoltageUnbalance:1; //bit 5
  1276. unsigned char PsuBusOverVoltage:1; //bit 6
  1277. unsigned char PsuBusVoltageAbnormal:1; //bit 7
  1278. //AlarmVal[14]
  1279. unsigned char PsuBusUnderVoltage:1; //bit 0
  1280. unsigned char PsuInputPhaseLoss:1; //bit 1
  1281. unsigned char PsuFanFullSpeed:1; //bit 2
  1282. unsigned char PsuTemperaturePowerLimit:1; //bit 3
  1283. unsigned char PsuAcPowerLimit:1; //bit 4
  1284. unsigned char PsuDcdcEepromFault:1; //bit 5
  1285. unsigned char PsuPfcEepromFault:1; //bit 6
  1286. unsigned char PsuDcdcOverVoltage:1; //bit 7
  1287. //AlarmVal[15]
  1288. unsigned char Reserved:8; //bit 0~7
  1289. }bits;
  1290. }AlarmEvents;
  1291. };
  1292. char InfoStatusCode[384][6]=
  1293. {
  1294. //Information comes from EVSE
  1295. "013600", //Normal stop charging by user
  1296. "013601", //Charging Time's up
  1297. "013602", //Replace system air filter
  1298. "013603", //Reach to CHAdeMO max. plugging times.
  1299. "013604", //Reach to CCS max. plugging times.
  1300. "013605", //Reach to GB max. plugging times.
  1301. "013606", //Reach to AC max. plugging times.
  1302. "013607", //CSU fimrware update fail
  1303. "013608", //CHAdeMO Module fimrware update fail
  1304. "013609", //CCS Module fimrware update fail
  1305. "013610", //GB Module fimrware update fail
  1306. "013611", //Aux. power module fimrware update fail
  1307. "013612", //Relay control module fimrware update fail
  1308. "013613", //LCM module fimrware update fail
  1309. "013614", //Bluetooth module fimrware update fail
  1310. "013615", //WiFi module fimrware update fail
  1311. "013616", //3G/4G module fimrware update fail
  1312. "013617", //SMR fimrware update fail
  1313. "013618", //RFID module fimrware update fail
  1314. "013619", //configured by USB flash drive
  1315. "013620", //configured by backend
  1316. "013621", //configured by webpage
  1317. "013622", //disconnected from Internet through Ethernet
  1318. "013623", //disconnected from Internet through WiFi
  1319. "013624", //disconnected from Internet through 3G/4G
  1320. "013625", //disconnected from AP through WiFi
  1321. "013626", //disconnected from APN through 3G/4G
  1322. "013627", //WiFi disabled (separated charger only)
  1323. "013628", //4G disabled (separated charger only)
  1324. "013629", //Reserved
  1325. "013630", //Reserved
  1326. "013631", //Reserved
  1327. //Information comes from EV
  1328. "023700", //CHAdeMO EV communication Fail
  1329. "023701", //CCS EV communication Fail
  1330. "023702", //GB EV communication Fail
  1331. "023703", //AC: pilot fault
  1332. "023704", //CHAdeMO: battery malfunction
  1333. "023705", //CHAdeMO: no charging permission
  1334. "023706", //CHAdeMO: battery incompatibility
  1335. "023707", //CHAdeMO: battery OVP
  1336. "023708", //CHAdeMO: battery UVP
  1337. "023709", //CHAdeMO: battery OTP
  1338. "023710", //CHAdeMO: battery current difference
  1339. "023711", //CHAdeMO: battery voltage difference
  1340. "023712", //CHAdeMO: shift position
  1341. "023713", //CHAdeMO: battery other fault
  1342. "023714", //CHAdeMO: charging system error
  1343. "023715", //CHAdeMO: EV normal stop
  1344. "023716", //CHAdeMO: connector temperature sensor broken
  1345. "023717", //CHAdeMO: connector lock fail
  1346. "023718", //CHAdeMO: D1 ON No Receive
  1347. "023719", //CHAdeMO: BMS K to J Timeout
  1348. "023720", //CHAdeMO: BMS Charge Allow Timeout
  1349. "023721", //CHAdeMO: Wait GroundFault Timeout
  1350. "023722", //CHAdeMO: BMS EV Relay Timeout
  1351. "023723", //CHAdeMO: BMS Request Current Timeout
  1352. "023724", //CHAdeMO: BMS K to J OFF Timeout
  1353. "023725", //CHAdeMO: BMS EV Relay OFF Timeout
  1354. "023726", //CHAdeMO: ADC More Than 10V
  1355. "023727", //CHAdeMO: ADC More Than 20V
  1356. "023728", //CHAdeMO: BMS Charge Before Stop
  1357. "023729", //CHAdeMO: Charger Get Normal Stop
  1358. "023730", //CHAdeMO: Charger Get Emergency Stop
  1359. "023731", //CHAdeMO: Isolation Result Fail
  1360. "023732", //CHAdeMO: Miss Link With MotherBoard
  1361. "023733", //CHAdeMO: Output Voltage More Than Limit
  1362. "023734", //CHAdeMO: Request Current More Than Limit
  1363. "023735", //CHAdeMO: Re Cap BMS Eqr Current Exceed
  1364. "023736", //CHAdeMO: Charge Remain Count Down
  1365. "023737", //CCS:CCS_EVCC_EVErrorCode_FAILED_RESSTemperatureInhibit
  1366. "023738", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVShiftPosition
  1367. "023739", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargerConnectorLockFault
  1368. "023740", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVRESSMalfunction
  1369. "023741", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingCurrentdifferential
  1370. "023742", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingVoltageOutOfRange
  1371. "023743", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingSystemIncompatibility
  1372. "023744", //CCS:CCS_EVCC_EVErrorCode_FAILED_EmergencyEvent
  1373. "023745", //CCS:CCS_EVCC_EVErrorCode_FAILED_Breaker
  1374. "023746", //CCS:CCS_EVCC_EVErrorCode_FAILED_NoData
  1375. "023747", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_A
  1376. "023748", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_B
  1377. "023749", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_C
  1378. "023750", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_1
  1379. "023751", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_2
  1380. "023752", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_3
  1381. "023753", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_1
  1382. "023754", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_2
  1383. "023755", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_3
  1384. "023756", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_4
  1385. "023757", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_5
  1386. "023758", //CCS:CCS_SECC_ResponseCode_FAILED_SequenceError
  1387. "023759", //CCS:CCS_SECC_ResponseCode_FAILED_SignatureError
  1388. "023760", //CCS:CCS_SECC_ResponseCode_FAILED_UnknownSession
  1389. "023761", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceIDInvalid
  1390. "023762", //CCS:CCS_SECC_ResponseCode_FAILED_Payment SelectionInvalid
  1391. "023763", //CCS:CCS_SECC_ResponseCode_FAILED_IdentificationSelectionInvalid
  1392. "023764", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceSelectionInvalid
  1393. "023765", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateExpired
  1394. "023766", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotYetValid
  1395. "023767", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateRevoked
  1396. "023768", //CCS:CCS_SECC_ResponseCode_FAILED_NoCertificateAvailable
  1397. "023769", //CCS:CCS_SECC_ResponseCode_FAILED_CertChainError
  1398. "023770", //CCS:CCS_SECC_ResponseCode_FAILED_CertValidationError
  1399. "023771", //CCS:CCS_SECC_ResponseCode_FAILED_CertVerificationError
  1400. "023772", //CCS:CCS_SECC_ResponseCode_FAILED_ContractCanceled
  1401. "023773", //CCS:CCS_SECC_ResponseCode_FAILED_ChallengeInvalid
  1402. "023774", //CCS:CCS_SECC_ResponseCode_FAILED_WrongEnergyTransferMode
  1403. "023775", //CCS:CCS_SECC_ResponseCode_FAILED_WrongChargeParameter
  1404. "023776", //CCS:CCS_SECC_ResponseCode_FAILED_ChargingProfileInvalid
  1405. "023777", //CCS:CCS_SECC_ResponseCode_FAILED_TariffSelectionInvalid
  1406. "023778", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEPresentVoltageToLow
  1407. "023779", //CCS:CCS_SECC_ResponseCode_FAILED_PowerDeliveryNotApplied
  1408. "023780", //CCS:CCS_SECC_ResponseCode_FAILED_MeteringSignatureNotValid
  1409. "023781", //CCS:CCS_SECC_ResponseCode_FAILED_NoChargeServiceSelected
  1410. "023782", //CCS:CCS_SECC_ResponseCode_FAILED_ContactorError
  1411. "023783", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotAllowedAtThisEVSE
  1412. "023784", //CCS:CCS_SECC_ResponseCode_FAILED_GAChargeStop
  1413. "023785", //CCS:CCS_SECC_ResponseCode_FAILED_AlignmentError
  1414. "023786", //CCS:CCS_SECC_ResponseCode_FAILED_ACDError
  1415. "023787", //CCS:CCS_SECC_ResponseCode_FAILED_AssociationError
  1416. "023788", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEChargeAbort
  1417. "023789", //CCS:CCS_SECC_ResponseCode_FAILED_NoSupportedApp-Protocol-Protocol
  1418. "023790", //CCS:CCS_SECC_ResponseCode_FAILED_ContractNotAccepted
  1419. "023791", //CCS:CCS_SECC_ResponseCode_FAILED_MOUnknown
  1420. "023792", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_Prov_CertificateRevoke
  1421. "023793", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA1_CertificateRevoked
  1422. "023794", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA2_CertificateRevoked
  1423. "023795", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_RootCA_CertificateRevoked
  1424. "023796", //CCS:CCS_SECC_ResponseCode_FAILED_MO_Prov_CertificateRevoked
  1425. "023797", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA1_CertificateRevoked
  1426. "023798", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA2_CertificateRevoked
  1427. "023799", //CCS:CCS_SECC_ResponseCode_FAILED_MO_RootCA_CertificateRevoked
  1428. "023800", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_Prov_CertificateRevoked
  1429. "023801", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA1_CertificateRevoked
  1430. "023802", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA2_CertificateRevoked
  1431. "023803", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_RootCA_CertificateRevoked
  1432. "023804", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_1
  1433. "023805", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_2
  1434. "023806", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_3
  1435. "023807", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_4
  1436. "023808", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_5
  1437. "023809", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_SLAC_init
  1438. "023810", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_match_response
  1439. "023811", //CCS:CCS_SECC_TIMEOUT_CM_START_ATTEN_CHAR_IND
  1440. "023812", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_match_MNBC
  1441. "023813", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_EVSE_avg_atten_calc
  1442. "023814", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_ATTEN_CHAR_RSP
  1443. "023815", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_VALIDATE_REQ_1ST__CM_SLAC_MATCH_REQ
  1444. "023816", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_assoc_session
  1445. "023817", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_vald_toggle
  1446. "023818", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_MNBC_SOUND_IND
  1447. "023819", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_VALIDATE_REQ_2ND__CM_SLAC_MATCH_REQ
  1448. "023820", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_3
  1449. "023821", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_4
  1450. "023822", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_5
  1451. "023823", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_UDP_TT_match_join
  1452. "023824", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TCP_TT_match_join
  1453. "023825", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_amp_map_exchange
  1454. "023826", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_link_ready_notification
  1455. "023827", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_1
  1456. "023828", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_2
  1457. "023829", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_3
  1458. "023830", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_4
  1459. "023831", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_5
  1460. "023832", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SupportedAppProtocolRes
  1461. "023833", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionSetupRes
  1462. "023834", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServiceDiscoveryRes
  1463. "023835", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServicePaymentSelectionRes
  1464. "023836", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ContractAuthenticationRes
  1465. "023837", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ChargeParameterDiscoveryRes
  1466. "023838", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PowerDeliveryRes
  1467. "023839", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CableCheckRes
  1468. "023840", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PreChargeRes
  1469. "023841", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CurrentDemandRes
  1470. "023842", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_WeldingDetectionRes
  1471. "023843", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionStopRes
  1472. "023844", //CCS:CCS_SECC_TIMEOUT_V2G_Sequence_Time
  1473. "023845", //CCS:CCS_SECC_TIMEOUT_V2G_ReadyToCharge_Performance_Time
  1474. "023846", //CCS:CCS_SECC_TIMEOUT_V2G_CommunicationSetup_Performance_Time
  1475. "023847", //CCS:CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time
  1476. "023848", //CCS:CCS_SECC_TIMEOUT_V2G_CPState_Detection_Time
  1477. "023849", //CCS:CCS_SECC_TIMEOUT_V2G_CPOscillator_Retain_Time
  1478. "023850", //CCS:CCS_SECC_TIMEOUT_V2G_PreCharge_Performace_Time
  1479. "023851", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_2
  1480. "023852", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_3
  1481. "023853", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_4
  1482. "023854", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_5
  1483. "023855", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_TARGET_INFO
  1484. "023856", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_TARGET_INFO
  1485. "023857", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_BATTERY_INFO
  1486. "023858", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_BATTERY_INFO
  1487. "023859", //CCS:CCS_CAN_TIMEOUT_TP_EV_STOP_EVENT
  1488. "023860", //CCS:CCS_CAN_TIMEOUT_TT_EV_STOP_EVENT
  1489. "023861", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_STOP_EVENT
  1490. "023862", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_STOP_EVENT
  1491. "023863", //CCS:CCS_CAN_TIMEOUT_TP_GET_MISC_INFO
  1492. "023864", //CCS:CCS_CAN_TIMEOUT_TT_GET_MISC_INFO
  1493. "023865", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_REQUEST
  1494. "023866", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_REQUEST
  1495. "023867", //CCS:CCS_CAN_TIMEOUT_TP_START_BLOCK_TRANSFER
  1496. "023868", //CCS:CCS_CAN_TIMEOUT_TT_START_BLOCK_TRANSFER
  1497. "023869", //CCS:CCS_CAN_TIMEOUT_TP_DATA_TRANSFER
  1498. "023870", //CCS:CCS_CAN_TIMEOUT_TT_DATA_TRANSFER
  1499. "023871", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_FINISH
  1500. "023872", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_FINISH
  1501. "023873", //CCS:CCS_CAN_TIMEOUT_TP_ISOLATION_STATUS
  1502. "023874", //CCS:CCS_CAN_TIMEOUT_TT_ISOLATION_STATUS
  1503. "023875", //CCS:CCS_CAN_TIMEOUT_TP_CONNECTOR_INFO
  1504. "023876", //CCS:CCS_CAN_TIMEOUT_TT_CONNECTOR_INFO
  1505. "023877", //CCS:CCS_CAN_TIMEOUT_TT_RTC_INFO
  1506. "023878", //CCS:CCS_CAN_TIMEOUT_TP_RTC_INFO
  1507. "023879", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_PRECHARGE_INFO
  1508. "023880", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_PRECHARGE_INFO
  1509. "023881", //CCS:CCS_CAN_TIMEOUT_MSG_Sequence
  1510. "023882", //CCS:CCS_CAN_MSG_Unrecognized_CMD_ID
  1511. "023883", //CCS:CCS_SECC_DIN_Msg_Decode_Error
  1512. "023884", //CCS:CCS_SECC_DIN_Msg_Encode_Error
  1513. "023885", //CCS:CCS_SECC_ISO1_Msg_Decode_Error
  1514. "023886", //CCS:CCS_SECC_ISO1_Msg_Encode_Error
  1515. "023887", //CCS:CCS_SECC_ISO2_Msg_Decode_Error
  1516. "023888", //CCS:CCS_SECC_ISO2_Msg_Encode_Error
  1517. "023889", //CCS:CCS_SECC_CP_STATUS_Error
  1518. "023890", //CCS:CCS_SECC_Unexpected_60V_Before_Charing_Error
  1519. "023891", //CCS:CCS_SECC_Not_Ready_For_Charging
  1520. "023892", //CCS:CCS_SECCC_TIMEOUT_QCA7000_COMM (The firmware code of QCA7000 may not be installed, yet)
  1521. "023893", //CCS:CCS_SECC_FAIL_QCA7000_SETKEY
  1522. "023894", //Reserved
  1523. "023895", //Reserved
  1524. "023896", //Reserved
  1525. "023897", //Reserved
  1526. "023898", //Reserved
  1527. "023899", //Reserved
  1528. "023900", //GBT: ERROR_CODE_GBT_LOS_CC1
  1529. "023901", //GBT: ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL
  1530. "023902", //GBT: ERROR_CODE_GBT_BATTERY_INCOMPATIBLE
  1531. "023903", //GBT: ERROR_CODE_GBT_BMS_BROAA_TIMEOUT
  1532. "023904", //GBT: ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT
  1533. "023905", //GBT: ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT
  1534. "023906", //GBT: ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE
  1535. "023907", //GBT: ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE
  1536. "023908", //GBT: ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT
  1537. "023909", //GBT: ERROR_CODE_GBT_ADC_MORE_THAN_10V
  1538. "023910", //GBT: ERROR_CODE_GBT_ADC_MORE_THAN_60V
  1539. "023911", //GBT: ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD
  1540. "023912", //GBT: ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD
  1541. "023913", //GBT: ERROR_CODE_GBT_ISOLATION_RESULT_FAIL
  1542. "023914", //GBT: ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK
  1543. "023915", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT
  1544. "023916", //GBT: ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT
  1545. "023917", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT
  1546. "023918", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT
  1547. "023919", //GBT: ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V
  1548. "023920", // Reserved
  1549. "023921", // Reserved
  1550. "023922", // Reserved
  1551. "023923", // Reserved
  1552. "023924", // Reserved
  1553. "023925", // Reserved
  1554. "023926", // Reserved
  1555. "023927", // Reserved
  1556. "023928", // Reserved
  1557. "023929", // Reserved
  1558. "023930", //GBT: ERROR_CODE_CEM_BHM_TIMEOUT
  1559. "023931", //GBT: ERROR_CODE_CEM_BRM_TIMEOUT
  1560. "023932", //GBT: ERROR_CODE_CEM_BCP_TIMEOUT
  1561. "023933", //GBT: ERROR_CODE_CEM_BRO_TIMEOUT
  1562. "023934", //GBT: ERROR_CODE_CEM_BCL_TIMEOUT
  1563. "023935", //GBT: ERROR_CODE_CEM_BCS_TIMEOUT
  1564. "023936", //GBT: ERROR_CODE_CEM_BSM_TIMEOUT
  1565. "023937", //GBT: ERROR_CODE_CEM_BST_TIMEOUT
  1566. "023938", //GBT: ERROR_CODE_CEM_BSD_TIMEOUT
  1567. "023939", //GBT: ERROR_CODE_CEM_BEM_OTHER_TIMEOUT
  1568. "023940", //GBT: ERROR_CODE_BEM_CRM_TIMEOUT
  1569. "023941", //GBT: ERROR_CODE_BEM_CRMAA_TIMEOUT
  1570. "023942", //GBT: ERROR_CODE_BEM_CTS_CML_TIMEOUT
  1571. "023943", //GBT: ERROR_CODE_BEM_CRO_TIMEOUT
  1572. "023944", //GBT: ERROR_CODE_BEM_CCS_TIMEOUT
  1573. "023945", //GBT: ERROR_CODE_BEM_CST_TIMEOUT
  1574. "023946", //GBT: ERROR_CODE_BEM_CSD_TIMEOUT
  1575. "023947", //GBT: ERROR_CODE_BEM_BEM_OTHER_TIMEOUT
  1576. "023948", // Reserved
  1577. "023949", // Reserved
  1578. "023950", //GBT: ERROR_CODE_BST_SOC_GOAL
  1579. "023951", //GBT: ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL
  1580. "023952", //GBT: ERROR_CODE_BST_CELL_VOLTAGE_GOAL
  1581. "023953", //GBT: ERROR_CODE_BST_GET_CST
  1582. "023954", //GBT: ERROR_CODE_BST_ISOLATION
  1583. "023955", //GBT: ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP
  1584. "023956", //GBT: ERROR_CODE_BST_COMPONENT
  1585. "023957", //GBT: ERROR_CODE_BST_CHARGE_CONNECTOR
  1586. "023958", //GBT: ERROR_CODE_BST_OTP
  1587. "023959", //GBT: ERROR_CODE_BST_OTHER
  1588. "023960", //GBT: ERROR_CODE_BST_HIGH_V
  1589. "023961", //GBT: ERROR_CODE_BST_CC2
  1590. "023962", //GBT: ERROR_CODE_BST_CURRENT
  1591. "023963", //GBT: ERROR_CODE_BST_VOLTAGE
  1592. "023964", //GBT: ERROR_CODE_GET_BST_NO_REASON
  1593. "023965", // Reserved
  1594. "023966", // Reserved
  1595. "023967", // Reserved
  1596. "023968", // Reserved
  1597. "023969", // Reserved
  1598. "023970", //GBT: ERROR_CODE_BSM_CELL_OVER_VOLTAGE
  1599. "023971", //GBT: ERROR_CODE_BSM_CELL_UNDER_VOLTAGE
  1600. "023972", //GBT: ERROR_CODE_BSM_OVER_SOC
  1601. "023973", //GBT: ERROR_CODE_BSM_UNDER_SOC
  1602. "023974", //GBT: ERROR_CODE_BSM_CURRENT
  1603. "023975", //GBT: ERROR_CODE_BSM_TEMPERATURE
  1604. "023976", //GBT: ERROR_CODE_BSM_ISOLATE
  1605. "023977", //GBT: ERROR_CODE_BSM_OUTPUT_CONNECTOR
  1606. "023978", // Reserved
  1607. "023979", // EV full charging
  1608. "023980", // ERROR_CODE_CHADEMO_BMS_CHARGE_ALLOW_ERROR
  1609. "023981", // ERROR_CODE_CHADEMO_OUTPUT_VOLTAGE_MORE_THEN_10_PERCENT
  1610. "023982", // ERROR_CODE_CHADEMO_ADC_LESS_THAN_10V
  1611. "023983", // STOP by EV with unknow reason
  1612. "023984", // Reserved
  1613. "023985", // Reserved
  1614. "023986", // Reserved
  1615. "023987", // Reserved
  1616. "033900", //disconnected from backend through Ethernet
  1617. "033901", //disconnected from backend through WiFi
  1618. "033902", //disconnected from backend through 3G/4G
  1619. "033903", //Remote start charging by backend
  1620. "033904", //Remote stop charging by backend
  1621. "033905", //Remote reset by backend
  1622. "033906", //Authorization failed
  1623. "033907", //Reserved
  1624. };
  1625. struct InfoCodeData
  1626. {
  1627. unsigned char PreviousInfoVal[InfoCodeLength];
  1628. union
  1629. {
  1630. unsigned char InfoVal[InfoCodeLength];
  1631. struct
  1632. {
  1633. //InfoVal[0]
  1634. unsigned char NormalStopChargingByUser:1; //bit 0
  1635. unsigned char ChargingTimesUp:1; //bit 1
  1636. unsigned char ReplaceSystemAirFilter:1; //bit 2
  1637. unsigned char ReachChademoMaxPluggingTimes:1; //bit 3
  1638. unsigned char ReachCcsMaxPluggingTimes:1; //bit 4
  1639. unsigned char ReachGbMaxPluggingTimes:1; //bit 5
  1640. unsigned char ReachAcMaxPluggingTimes:1; //bit 6
  1641. unsigned char CsuFimrwareUpdateFail:1; //bit 7
  1642. //InfoVal[1]
  1643. unsigned char ChademoModuleFimrwareUpdateFail:1; //bit 0
  1644. unsigned char CcsModuleFimrwareUpdateFail:1; //bit 1
  1645. unsigned char GbModuleFimrwareUpdateFail:1; //bit 2
  1646. unsigned char AuxPowerModuleFimrwareUpdateFail:1; //bit 3
  1647. unsigned char RelayBoardFimrwareUpdateFail:1; //bit 4
  1648. unsigned char LcmModuleFimrwareUpdateFail:1; //bit 5
  1649. unsigned char BluetoothModuleFimrwareUpdateFail:1; //bit 6
  1650. unsigned char WiFiModuleFimrwareUpdateFail:1; //bit 7
  1651. //InfoVal[2]
  1652. unsigned char Telocom4GModuleFimrwareUpdateFail:1; //bit 0
  1653. unsigned char PsuFimrwareUpdateFail:1; //bit 1
  1654. unsigned char RfidModuleFimrwareUpdateFail:1; //bit 2
  1655. unsigned char ConfiguredByUsbFlashDrive:1; //bit 3
  1656. unsigned char ConfiguredByBackend:1; //bit 4
  1657. unsigned char ConfiguredByWebpage:1; //bit 5
  1658. unsigned char InternetDisconnectViaEthernet:1; //bit 6
  1659. unsigned char InternetDisconnectViaWiFi :1; //bit 7
  1660. //InfoVal[3]
  1661. unsigned char InternetDisconnectVia4Gi:1; //bit 0
  1662. unsigned char ApDisconnectViaWiFi:1; //bit 1
  1663. unsigned char ApnDisconnectVia4Gi:1; //bit 2
  1664. unsigned char WiFiDisable:1; //bit 3
  1665. unsigned char Telocom4GModuleDisable:1; //bit 4
  1666. unsigned char :3; //bit 5~7 reserved
  1667. //InfoVal[4]
  1668. unsigned char ChademoEvCommFail:1; //bit 0
  1669. unsigned char CcsEvCommFail:1; //bit 1
  1670. unsigned char GbEvCommFail:1; //bit 2
  1671. unsigned char PilotFault:1; //bit 3
  1672. unsigned char ChademoBatteryMalfun:1; //bit 4
  1673. unsigned char ChademoNoPermission:1; //bit 5
  1674. unsigned char ChademoBatteryIncompatibility:1; //bit 6
  1675. unsigned char ChademoBatteryOVP:1; //bit 7
  1676. //InfoVal[5]
  1677. unsigned char ChademoBatteryUVP:1; //bit 0
  1678. unsigned char ChademoBatteryOTP:1; //bit 1
  1679. unsigned char ChademoBatteryCurrentDiff:1; //bit 2
  1680. unsigned char ChademoBatteryVoltageDiff:1; //bit 3
  1681. unsigned char ChademoShiftPosition:1; //bit 4
  1682. unsigned char ChademoBatteryOtherFault:1; //bit 5
  1683. unsigned char ChademoChargingSystemError:1; //bit 6
  1684. unsigned char ChademoEvNormalStop:1; //bit 7
  1685. //InfoVal[6]
  1686. unsigned char ChademoTempSensorBroken:1; //bit 0
  1687. unsigned char ChademoConnectorLockFail:1; //bit 1
  1688. unsigned char ChademoD1OnNoReceive:1; //bit 2
  1689. unsigned char ChademoBmsKtoJTimeout:1; //bit 3
  1690. unsigned char ChademoBmsChargeAllowTimeout:1; //bit 4
  1691. unsigned char ChademoWaitGfdTimeout:1; //bit 5
  1692. unsigned char ChademoBmsEvRelayTimeout:1; //bit 6
  1693. unsigned char ChademoBmsReqCurrentTimeout:1; //bit 7
  1694. //InfoVal[7]
  1695. unsigned char ChademoBmsKtoJOffTimeout :1; //bit 0
  1696. unsigned char ChademoBmsEvRelayOffTimeout :1; //bit 1
  1697. unsigned char ChademoAdcMoreThan10V :1; //bit 2
  1698. unsigned char ChademoAdcMoreThan20V :1; //bit 3
  1699. unsigned char ChademoBmsChargeBeforeStop :1; //bit 4
  1700. unsigned char ChademoChargerGetNormalStop :1; //bit 5
  1701. unsigned char ChademoChargerGetEmergencyStop :1; //bit 6
  1702. unsigned char ChademoIsolationResultFail :1; //bit 7
  1703. //InfoVal[8]
  1704. unsigned char ChademoMissLinkWithMotherBoard :1; //bit 0
  1705. unsigned char ChademoOutputVolMoreThanLimit :1; //bit 1
  1706. unsigned char ChademoReqCurrentMoreThanLimit :1; //bit 2
  1707. unsigned char ChademoReCapBmsEqrCurrentExceed :1; //bit 3
  1708. unsigned char ChademoChargeRemainCountDown :1; //bit 4
  1709. unsigned char CcsRESTemperatureInhibit:1; //bit 5
  1710. unsigned char CcsEVShiftPosition:1; //bit 6
  1711. unsigned char CcsChargerConnectorLockFault:1; //bit 7
  1712. //InfoVal[9]
  1713. unsigned char CcsEVRESSMalfunction:1; //bit 0
  1714. unsigned char CcsChargingCurrentdifferential:1; //bit 1
  1715. unsigned char CcsChargingVoltageOutOfRange:1; //bit 2
  1716. unsigned char CcsChargingSystemIncompatibility:1; //bit 3
  1717. unsigned char CcsEmergencyEvent:1; //bit 4
  1718. unsigned char CcsBreaker:1; //bit 5
  1719. unsigned char CcsNoData:1; //bit 6
  1720. unsigned char Ccsreserved_by_DIN_A:1; //bit 7
  1721. //InfoVal[10]
  1722. unsigned char Ccsreserved_by_DIN_B:1; //bit 0
  1723. unsigned char Ccsreserved_by_DIN_C:1; //bit 1
  1724. unsigned char Ccsreserved_by_ISO_1:1; //bit 2
  1725. unsigned char Ccsreserved_by_ISO_2:1; //bit 3
  1726. unsigned char Ccsreserved_by_ISO_3:1; //bit 4
  1727. unsigned char Ccsreserved_by_OEM_1:1; //bit 5
  1728. unsigned char Ccsreserved_by_OEM_2:1; //bit 6
  1729. unsigned char Ccsreserved_by_OEM_3:1; //bit 7
  1730. //InfoVal[11]
  1731. unsigned char Ccsreserved_by_OEM_4:1; //bit 0
  1732. unsigned char Ccsreserved_by_OEM_5:1; //bit 1
  1733. unsigned char CcsSequenceError:1; //bit 2
  1734. unsigned char CcsSignatureError:1; //bit 3
  1735. unsigned char CcsUnknownSession:1; //bit 4
  1736. unsigned char CcsServiceIDInvalid:1; //bit 5
  1737. unsigned char CcsPaymentSelectionInvalid:1; //bit 6
  1738. unsigned char CcsIdentificationSelectionInvalid:1; //bit 7
  1739. //InfoVal[12]
  1740. unsigned char CcsServiceSelectionInvalid:1; //bit 0
  1741. unsigned char CcsCertificateExpired:1; //bit 1
  1742. unsigned char CcsCertificateNotYetValid:1; //bit 2
  1743. unsigned char CcsCertificateRevoked:1; //bit 3
  1744. unsigned char CcsNoCertificateAvailable:1; //bit 4
  1745. unsigned char CcsCertChainError:1; //bit 5
  1746. unsigned char CcsCertValidationError:1; //bit 6
  1747. unsigned char CcsCertVerificationError:1; //bit 7
  1748. //InfoVal[13]
  1749. unsigned char CcsContractCanceled:1; //bit 0
  1750. unsigned char CcsChallengeInvalid:1; //bit 1
  1751. unsigned char CcsWrongEnergyTransferMode:1; //bit 2
  1752. unsigned char CcsWrongChargeParameter:1; //bit 3
  1753. unsigned char CcsChargingProfileInvalid:1; //bit 4
  1754. unsigned char CcsTariffSelectionInvalid:1; //bit 5
  1755. unsigned char CcsEVSEPresentVoltageToLow:1; //bit 6
  1756. unsigned char CcsPowerDeliveryNotApplied:1; //bit 7
  1757. //InfoVal[14]
  1758. unsigned char CcsMeteringSignatureNotValid:1; //bit 0
  1759. unsigned char CcsNoChargeServiceSelected:1; //bit 1
  1760. unsigned char CcsContactorError:1; //bit 2
  1761. unsigned char CcsCertificateNotAllowedAtThisEVSE:1; //bit 3
  1762. unsigned char CcsGAChargeStop:1; //bit 4
  1763. unsigned char CcsAlignmentError:1; //bit 5
  1764. unsigned char CcsACDError:1; //bit 6
  1765. unsigned char CcsAssociationError:1; //bit 7
  1766. //InfoVal[15]
  1767. unsigned char CcsEVSEChargeAbort:1; //bit 0
  1768. unsigned char CcsNoSupportedAppProtocol:1; //bit 1
  1769. unsigned char CcsContractNotAccepted:1; //bit 2
  1770. unsigned char CcsMOUnknown:1; //bit 3
  1771. unsigned char CcsOEM_Prov_CertificateRevoke:1; //bit 4
  1772. unsigned char CcsOEM_SubCA1_CertificateRevoked:1; //bit 5
  1773. unsigned char CcsOEM_SubCA2_CertificateRevoked:1; //bit 6
  1774. unsigned char CcsOEM_RootCA_CertificateRevoked:1; //bit 7
  1775. //InfoVal[16]
  1776. unsigned char CcsMO_Prov_CertificateRevoked:1; //bit 0
  1777. unsigned char CcsMO_SubCA1_CertificateRevoked:1; //bit 1
  1778. unsigned char CcsMO_SubCA2_CertificateRevoked:1; //bit 2
  1779. unsigned char CcsMO_RootCA_CertificateRevoked:1; //bit 3
  1780. unsigned char CcsCPS_Prov_CertificateRevoked:1; //bit 4
  1781. unsigned char CcsCPS_SubCA1_CertificateRevoked:1; //bit 5
  1782. unsigned char CcsCPS_SubCA2_CertificateRevoked:1; //bit 6
  1783. unsigned char CcsCPS_RootCA_CertificateRevoked:1; //bit 7
  1784. //InfoVal[17]
  1785. unsigned char :5; //bit 0~4 reserved
  1786. unsigned char CcsTT_EVSE_SLAC_init:1; //bit 5
  1787. unsigned char CcsTP_match_response:1; //bit 6
  1788. unsigned char CcsTT_match_sequence:1; //bit 7
  1789. //InfoVal[18]
  1790. unsigned char CcsTT_EVSE_match_MNBC:1; //bit 0
  1791. unsigned char CcsTP_EVSE_avg_atten_calc:1; //bit 1
  1792. unsigned char CcsTT_match_response:1; //bit 2
  1793. unsigned char CcsTP_EVSE_match_session:1; //bit 3
  1794. unsigned char CcsTT_EVSE_assoc_session:1; //bit 4
  1795. unsigned char CcsTT_EVSE_vald_toggle:1; //bit 5
  1796. unsigned char CcsSeccSlacTimeoutCmMnbcSound:1; //bit 6 reserved
  1797. unsigned char CcsSeccSlacTimeoutCmValidateReq:1; //bit 7 reserved
  1798. //InfoVal[19]
  1799. unsigned char :3; //bit 0~2 reserved
  1800. unsigned char CcsUDP_TT_match_join:1; //bit 3
  1801. unsigned char CcsTCP_TT_match_join:1; //bit 4
  1802. unsigned char CcsTP_amp_map_exchange:1; //bit 5
  1803. unsigned char CcsTP_link_ready_notification:1; //bit 6
  1804. unsigned char :1; //bit 7 resetved
  1805. //InfoVal[20]
  1806. unsigned char :4; //bit 0~3 reserved
  1807. unsigned char CcsSupportedAppProtocolRes:1; //bit 4
  1808. unsigned char CcsSessionSetupRes:1; //bit 5
  1809. unsigned char CcsServiceDiscoveryRes:1; //bit 6
  1810. unsigned char CcsServicePaymentSelectionRes:1; //bit 7
  1811. //InfoVal[21]
  1812. unsigned char CcsContractAuthenticationRes:1; //bit 0
  1813. unsigned char CcsChargeParameterDiscoveryRes:1; //bit 1
  1814. unsigned char CcsPowerDeliveryRes:1; //bit 2
  1815. unsigned char CcsCableCheckRes:1; //bit 3
  1816. unsigned char CcsPreChargeRes:1; //bit 4
  1817. unsigned char CcsCurrentDemandRes:1; //bit 5
  1818. unsigned char CcsWeldingDetectionRes:1; //bit 6
  1819. unsigned char CcsSessionStopRes:1; //bit 7
  1820. //InfoVal[22]
  1821. unsigned char CcsSequence_Time:1; //bit 0
  1822. unsigned char CcsReadyToCharge_Performance_Time:1; //bit 1
  1823. unsigned char CcsCommunicationSetup_Performance_Time:1; //bit 2
  1824. unsigned char CcsCableCheck_Performance_Time:1; //bit 3
  1825. unsigned char CcsCPState_Detection_Time:1; //bit 4
  1826. unsigned char CcsCPOscillator_Retain_Time:1; //bit 5
  1827. unsigned char CcsSeccTimeoutV2GPreChargePerformaceTime:1; //bit 6
  1828. unsigned char :1; //bit 7 reserved
  1829. //InfoVal[23]
  1830. unsigned char :3; //bit 0~2 reserved
  1831. unsigned char CcsTP_GET_EV_TARGET_INFO:1; //bit 3
  1832. unsigned char CcsTT_GET_EV_TARGET_INFO:1; //bit 4
  1833. unsigned char CcsTP_GET_EV_BATTERY_INFO:1; //bit 5
  1834. unsigned char CcsTT_GET_EV_BATTERY_INFO:1; //bit 6
  1835. unsigned char CcsTP_EV_STOP_EVENT:1; //bit 7
  1836. //InfoVal[24]
  1837. unsigned char CcsTT_EV_STOP_EVENT:1; //bit 0
  1838. unsigned char CcsTP_EVSE_STOP_EVENT:1; //bit 1
  1839. unsigned char CcsTT_EVSE_STOP_EVENT:1; //bit 2
  1840. unsigned char CcsTP_GET_MISC_INFO:1; //bit 3
  1841. unsigned char CcsTT_GET_MISC_INFO:1; //bit 4
  1842. unsigned char CcsTP_DOWNLOAD_REQUEST:1; //bit 5
  1843. unsigned char CcsTT_DOWNLOAD_REQUEST:1; //bit 6
  1844. unsigned char CcsTP_START_BLOCK_TRANSFER:1; //bit 7
  1845. //InfoVal[25]
  1846. unsigned char CcsTT_START_BLOCK_TRANSFER:1; //bit 0
  1847. unsigned char CcsTP_DATA_TRANSFER:1; //bit 1
  1848. unsigned char CcsTT_DATA_TRANSFER:1; //bit 2
  1849. unsigned char CcsTP_DOWNLOAD_FINISH:1; //bit 3
  1850. unsigned char CcsTT_DOWNLOAD_FINISH:1; //bit 4
  1851. unsigned char CcsTP_ISOLATION_STATUS:1; //bit 5
  1852. unsigned char CcsTT_ISOLATION_STATUS:1; //bit 6
  1853. unsigned char CcsTP_CONNECTOR_INFO:1; //bit 7
  1854. //InfoVal[26]
  1855. unsigned char CcsTT_CONNECTOR_INFO:1; //bit 0
  1856. unsigned char CcsTT_RTC_INFO:1; //bit 1
  1857. unsigned char CcsTP_RTC_INFO:1; //bit 2
  1858. unsigned char CcsTP_EVSE_PRECHARGE_INFO:1; //bit 3
  1859. unsigned char CcsTT_EVSE_PRECHARGE_INFO:1; //bit 4
  1860. unsigned char CcsMSG_Sequence:1; //bit 5
  1861. unsigned char CcsCAN_MSG_Unrecognized_CMD_ID:1; //bit 6
  1862. unsigned char CcsDIN_Msg_Decode_Error:1; //bit 7
  1863. //InfoVal[27]
  1864. unsigned char CcsDIN_Msg_Encode_Error:1; //bit 0
  1865. unsigned char CcsISO1_Msg_Decode_Error:1; //bit 1
  1866. unsigned char CcsISO1_Msg_Encode_Error:1; //bit 2
  1867. unsigned char CcsISO2_Msg_Decode_Error:1; //bit 3
  1868. unsigned char CcsISO2_Msg_Encode_Error:1; //bit 4
  1869. unsigned char CcsCpStatus_Error:1; //bit 5
  1870. unsigned char CcsUnexpectVolBeforeCharing_Error:1; //bit 6
  1871. unsigned char CcsSeccNotReadyForCharging:1; //bit 7 reserved
  1872. //InfoVal[28]
  1873. unsigned char CcsSeccTimeoutQCA7000Comm:1; //bit 0
  1874. unsigned char CcsSeccFailForQCA7000SetKey:1; //bit 1
  1875. unsigned char :6; //bit 2~7 reserved
  1876. //InfoVal[29]
  1877. unsigned char ERROR_CODE_GBT_LOS_CC1 :1; //bit 0
  1878. unsigned char ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL :1; //bit 1
  1879. unsigned char ERROR_CODE_GBT_BATTERY_INCOMPATIBLE :1; //bit 2
  1880. unsigned char ERROR_CODE_GBT_BMS_BROAA_TIMEOUT :1; //bit 3
  1881. unsigned char ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT :1; //bit 4
  1882. unsigned char ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT :1; //bit 5
  1883. unsigned char ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE :1; //bit 6
  1884. unsigned char ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE :1; //bit 7
  1885. //InfoVal[30]
  1886. unsigned char ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT :1; //bit 0
  1887. unsigned char ERROR_CODE_GBT_ADC_MORE_THAN_10V :1; //bit 1
  1888. unsigned char ERROR_CODE_GBT_ADC_MORE_THAN_60V :1; //bit 2
  1889. unsigned char ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD :1; //bit 3
  1890. unsigned char ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD :1; //bit 4
  1891. unsigned char ERROR_CODE_GBT_ISOLATION_RESULT_FAIL :1; //bit 5
  1892. unsigned char ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK :1; //bit 6
  1893. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT :1; //bit 7
  1894. //InfoVal[31]
  1895. unsigned char ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT :1; //bit 0
  1896. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT :1; //bit 1
  1897. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT :1; //bit 2
  1898. unsigned char ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V :1; //bit 3
  1899. unsigned char :4; //bit 4 ~ 7 reserved
  1900. //InfoVal[32]
  1901. unsigned char :6; //bit 0 ~ 5 reserved
  1902. unsigned char ERROR_CODE_CEM_BHM_TIMEOUT :1; //bit 6
  1903. unsigned char ERROR_CODE_CEM_BRM_TIMEOUT :1; //bit 7
  1904. //InfoVal[33]
  1905. unsigned char ERROR_CODE_CEM_BCP_TIMEOUT :1; //bit 0
  1906. unsigned char ERROR_CODE_CEM_BRO_TIMEOUT :1; //bit 1
  1907. unsigned char ERROR_CODE_CEM_BCL_TIMEOUT :1; //bit 2
  1908. unsigned char ERROR_CODE_CEM_BCS_TIMEOUT :1; //bit 3
  1909. unsigned char ERROR_CODE_CEM_BSM_TIMEOUT :1; //bit 4
  1910. unsigned char ERROR_CODE_CEM_BST_TIMEOUT :1; //bit 5
  1911. unsigned char ERROR_CODE_CEM_BSD_TIMEOUT :1; //bit 6
  1912. unsigned char ERROR_CODE_CEM_BEM_OTHER_TIMEOUT :1; //bit 7
  1913. //InfoVal[34]
  1914. unsigned char ERROR_CODE_BEM_CRM_TIMEOUT :1; //bit 0
  1915. unsigned char ERROR_CODE_BEM_CRMAA_TIMEOUT :1; //bit 1
  1916. unsigned char ERROR_CODE_BEM_CTS_CML_TIMEOUT :1; //bit 2
  1917. unsigned char ERROR_CODE_BEM_CRO_TIMEOUT :1; //bit 3
  1918. unsigned char ERROR_CODE_BEM_CCS_TIMEOUT :1; //bit 4
  1919. unsigned char ERROR_CODE_BEM_CST_TIMEOUT :1; //bit 5
  1920. unsigned char ERROR_CODE_BEM_CSD_TIMEOUT :1; //bit 6
  1921. unsigned char ERROR_CODE_BEM_BEM_OTHER_TIMEOUT :1; //bit 7
  1922. //InfoVal[35]
  1923. unsigned char :2; //bit 0 ~ 1
  1924. unsigned char ERROR_CODE_BST_SOC_GOAL :1; //bit 2
  1925. unsigned char ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL :1; //bit 3
  1926. unsigned char ERROR_CODE_BST_CELL_VOLTAGE_GOAL :1; //bit 4
  1927. unsigned char ERROR_CODE_BST_GET_CST :1; //bit 5
  1928. unsigned char ERROR_CODE_BST_ISOLATION :1; //bit 6
  1929. unsigned char ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP :1; //bit 7
  1930. //InfoVal[36]
  1931. unsigned char ERROR_CODE_BST_COMPONENT :1; //bit 0
  1932. unsigned char ERROR_CODE_BST_CHARGE_CONNECTOR :1; //bit 1
  1933. unsigned char ERROR_CODE_BST_OTP :1; //bit 2
  1934. unsigned char ERROR_CODE_BST_OTHER :1; //bit 3
  1935. unsigned char ERROR_CODE_BST_HIGH_V :1; //bit 4
  1936. unsigned char ERROR_CODE_BST_CC2 :1; //bit 5
  1937. unsigned char ERROR_CODE_BST_CURRENT :1; //bit 6
  1938. unsigned char ERROR_CODE_BST_VOLTAGE :1; //bit 7
  1939. //InfoVal[37]
  1940. unsigned char ERROR_CODE_GET_BST_NO_REASON :1; //bit 0
  1941. unsigned char :5; //bit 1 ~ 5 reserved
  1942. unsigned char ERROR_CODE_BSM_CELL_OVER_VOLTAGE :1; //bit 6
  1943. unsigned char ERROR_CODE_BSM_CELL_UNDER_VOLTAGE :1; //bit 7
  1944. //InfoVal[38]
  1945. unsigned char ERROR_CODE_BSM_OVER_SOC :1; //bit 0
  1946. unsigned char ERROR_CODE_BSM_UNDER_SOC :1; //bit 1
  1947. unsigned char ERROR_CODE_BSM_CURRENT :1; //bit 2
  1948. unsigned char ERROR_CODE_BSM_TEMPERATURE :1; //bit 3
  1949. unsigned char ERROR_CODE_BSM_ISOLATE :1; //bit 4
  1950. unsigned char ERROR_CODE_BSM_OUTPUT_CONNECTOR :1; //bit 5
  1951. unsigned char :1; //bit 6
  1952. unsigned char EV_Full_Charging:1; //bit 7
  1953. //InfoVal[39]
  1954. unsigned char CHADEMO_BMS_CHARGE_ALLOW_ERROR:1; //bit 0
  1955. unsigned char CHADEMO_OUTPUT_VOLTAGE_MORE_THEN_10_PERCENT:1; //bit 1
  1956. unsigned char CHADEMO_ADC_LESS_THAN_10V:1; //bit 2
  1957. unsigned char Stop_by_EV_with_unknow_reason:1; //bit 3
  1958. unsigned char :4; //bit 4 ~ 7 reserved
  1959. //InfoVal[40]
  1960. unsigned char BackendDisconnectedViaEthernet:1; //bit 0
  1961. unsigned char BackendDisconnectViaWiFi:1; //bit 1
  1962. unsigned char BackendDisconnectVia4G:1; //bit 2
  1963. unsigned char BackendRemoteStart:1; //bit 3
  1964. unsigned char BackendRemoteStop:1; //bit 4
  1965. unsigned char BackendRemoteReset:1; //bit 5
  1966. unsigned char AuthorizationFailed:1; //bit 6
  1967. unsigned char :1; //bit 7 reserved
  1968. }bits;
  1969. }InfoEvents;
  1970. };
  1971. struct StatusCodeData
  1972. {
  1973. struct FaultCodeData FaultCode;
  1974. struct AlarmCodeData AlarmCode;
  1975. struct InfoCodeData InfoCode;
  1976. };
  1977. /**************************************************************************************/
  1978. /**************************PSU Share memory***************************************/
  1979. /**************************************************************************************/
  1980. typedef union
  1981. {
  1982. unsigned int PsuGroupErrorValue;
  1983. struct
  1984. {
  1985. unsigned int PsuFailure:1; // 0: no effect, 1: Psu Failure
  1986. unsigned int res:31;
  1987. }bits;
  1988. }PsuGroupError;
  1989. struct PsuModuleVer
  1990. {
  1991. unsigned char FwPrimaryVersion[16];
  1992. unsigned char FwSecondVersion[16];
  1993. };
  1994. /*Following are the information for each PSU module*/
  1995. struct PsuModuleData
  1996. {
  1997. unsigned char AssignID;
  1998. unsigned char PhysicalID;
  1999. unsigned char GroupID;
  2000. unsigned char Address;
  2001. unsigned char FireWireIndex;
  2002. unsigned char FwVersion[16];
  2003. unsigned char SerialNumber[32];
  2004. unsigned char StateMachine; //0: Identification, 1:Operation, 2: Alarm, 3: Failure, s4:Upgrade
  2005. unsigned char OutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  2006. unsigned short FanSpeed_1; //RPM
  2007. unsigned short FanSpeed_2; //RPM
  2008. unsigned short FanSpeed_3; //RPM
  2009. unsigned short FanSpeed_4; //RPM
  2010. unsigned short InputVoltage_Type; //0x00 = Line to Line Vol, 0x01 = Line to Neutral Vol
  2011. unsigned short InputVoltageL1; //abcd=abc.d volt
  2012. unsigned short InputVoltageL2; //abcd=abc.d volt
  2013. unsigned short InputVoltageL3; //abcd=abc.d volt
  2014. unsigned short InputCurrentL1; //abcd=abc.d amp
  2015. unsigned short InputCurrentL2; //abcd=abc.d amp
  2016. unsigned short InputCurrentL3; //abcd=abc.d amp
  2017. unsigned short PresentOutputVoltage; //abcd=abc.d volt
  2018. unsigned short PresentOutputCurrent; //abcd=abc.d amp
  2019. unsigned short AvailableCurrent; //abcd=abc.d amp
  2020. unsigned int AvailablePower; //abcd=abc.d kWatt
  2021. char CriticalTemp1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2022. char CriticalTemp2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2023. char CriticalTemp3; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2024. char ExletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2025. char InletTemp_1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2026. char InletTemp_2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2027. char InletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2028. char OutletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2029. unsigned int AlarmCode;
  2030. unsigned int FaultCode; //
  2031. unsigned int IAvailableCurrent; //abcd=abc.d amp
  2032. };
  2033. /*Following are the information for each PSU Group*/
  2034. struct PsuGroupData
  2035. {
  2036. unsigned char GroupPresentPsuQuantity;
  2037. unsigned char GroupOutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  2038. unsigned short GroupTargetOutputVoltage; //abcd=abc.d volt
  2039. unsigned short GroupTargetOutputCurrent; //abcd=abc.d amp
  2040. unsigned short GroupAvailableCurrent; //abcd=abc.d amp
  2041. unsigned int GroupAvailablePower; //abcd=abc.d kWatt
  2042. unsigned int GroupRealOutputPower; //Watt
  2043. unsigned short GroupPresentOutputVoltage; //abcd=abc.d volt
  2044. unsigned short GroupPresentOutputCurrent; //abcd=abc.d Amps
  2045. unsigned int GroupPresentOutputPower; //Watt
  2046. struct PsuModuleData PsuModule[MAX_PSU_QUANTITY];
  2047. PsuGroupError GroupErrorFlag;
  2048. unsigned short TotalIAvailableCurrent; // unit: 0.1A
  2049. unsigned short TempIAvailableCurrent; // unit: 0.1A
  2050. unsigned short StableIAvailableCurrent; // unit: 0.1A
  2051. unsigned short StableCurrentCounter; // stable current counter
  2052. };
  2053. /*Following is the information for system all PSU*/
  2054. struct PsuData
  2055. {
  2056. unsigned char SystemPresentPsuQuantity;
  2057. unsigned short SystemAvailableCurrent; //abcd=abc.d amp
  2058. unsigned int SystemAvailablePower; //Watt
  2059. struct PsuGroupData PsuGroup[4];
  2060. unsigned char GroupCount;
  2061. unsigned char Work_Step;
  2062. struct PsuModuleVer PsuVersion[MAX_PSU_QUANTITY];
  2063. };
  2064. /************************************************************************************/
  2065. /**************************CHAdeMO protocol Share memory*********************/
  2066. /**************************************************************************************/
  2067. struct CHAdeMOEvData
  2068. {
  2069. unsigned char SupportDynamicControl; //110.0
  2070. // bit0=1:supported
  2071. unsigned char SupportHighCurrent; //110.0
  2072. // bit1=1:supported
  2073. unsigned char MiniChargeCurrent; //100.0 0~200(A) (unit:1A)
  2074. // 0x00: request for current equivalent to 1.5kW
  2075. // 0x01: no request
  2076. // 0x02: request of 1A and following are the same rule
  2077. unsigned short MaxiBatteryVoltage; //100.5,100.4 0~600(V) (unit:1V)
  2078. unsigned short MaxiChargingTime; //101.2,101.1 10(sec.)~255(min.) (Unit:sec)
  2079. // Set 0xFF to 101.1 (Unit: 10sec) in case 101.2 (Unit: 1min) is used
  2080. unsigned char EstimatChargingTime; //101.3 0~254(min.) (Unit:sec)
  2081. // Display Only
  2082. unsigned short TotalBatteryCapacity; //101.6,101.5 0.1~6553.5(kWh) (unit:0.1 kWh)
  2083. unsigned char ProtocolVersion; //102.0 0~255
  2084. // 0x02: CHAdeMO specification ver.1.2
  2085. unsigned short TargetBatteryVoltage; //102.2,102.1 0~600(V) (unit:1V)
  2086. unsigned short ChargingCurrentRequest; //102.3 0~200(A) (unit:1A)
  2087. //110.2,110.1 0~1023(A) (unit:1A)
  2088. unsigned char BatteryAlarm; //102.4 >0:alarm
  2089. // bit0=1:Battery overvoltage
  2090. // bit1=1:Battery undervoltage
  2091. // bit2=1:Battery current deviation error
  2092. // bit3=1:High battery temperature
  2093. // bit4=1:Battery voltage deviation error
  2094. unsigned char EvDetection; //102.5
  2095. // bit0=0:Vehicle charging disabled, (stop charging)
  2096. // bit0=1:Vehicle charging enabled,
  2097. // bit1=0:¡§Parking¡¨ position
  2098. // bit1=1:other position (stop charging)
  2099. // bit2=0:Charging system normal
  2100. // bit2=1:Charging system error (stop charging)
  2101. // bit3=0:EV contactor close or during welding detection
  2102. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  2103. // bit4=0:No stop request before charging
  2104. // bit4=1:Normal stop request before charging (stop charging)
  2105. unsigned char SOC; //102.6 0~100(%) (unit:%)
  2106. // Display Only
  2107. unsigned char Communicating; // it is true if receive EV CAN message within every 1500ms
  2108. unsigned char PresentMsgFlowStatus; //
  2109. };
  2110. struct CHAdeMOEvseData
  2111. {
  2112. unsigned char SelfTest_Comp;
  2113. unsigned char version[16]; //Chademo firmware version
  2114. unsigned char SupportDynamicControl; //118.0
  2115. // bit0=1:supported
  2116. unsigned char SupportHighCurrent; //118.0
  2117. // bit1=1:supported
  2118. unsigned short AvailableOutputVoltage; //108.2,108.1 0~600(V) (unit:1V)
  2119. unsigned short AvailableOutputCurrent; //108.3 0~255(A) (unit:1A)
  2120. //118.2,118.1 0~1023(A) (unit:1A)
  2121. unsigned short ThresholdVoltage; //108.5,108.4 0~600(V) (unit:1V)
  2122. unsigned char ConnectorTemperatureP; //108.6 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2123. unsigned char ConnectorTemperatureN; //108.7 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2124. unsigned char ProtocolVersion; //109.0 0~255
  2125. // 0x00: CHAdeMO specification 0.9 and earlier
  2126. // 0x01: CHAdeMO specification 0.9 and 0.9.1
  2127. // 0x02: CHAdeMO specification 1.0.0, 1.0.1, 1.1 and 1.2
  2128. unsigned short PresentOutputVoltage; //109.2,109.1 0~600(V) (unit:1V)
  2129. unsigned short PresentOutputCurrent; //109.3 0~255(A) (unit:1A)
  2130. //118.4,118.3 0~1023(A) (unit:1A)
  2131. unsigned char EvseDetection; //109.5
  2132. // bit0=0:not charging state now
  2133. // bit0=1:charging state now
  2134. // bit1=0:EVSE normal
  2135. // bit1=1:EVSE error
  2136. // bit2=0:Not Energizing state
  2137. // bit2=1:Energizing state
  2138. // bit3=0:No Battery incompatibility
  2139. // bit3=1:Battery incompatibility
  2140. // bit4=0:No Charging system error
  2141. // bit4=1:Charging system error
  2142. // bit5=0:No Charging stop control
  2143. // bit5=1:Charging stop control
  2144. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  2145. // Set 0xFF to 109.6 (Unit: 10sec) in case 109.7 (Unit: 1min) is used
  2146. unsigned char HighPowerCondition; //118.5
  2147. // bit0=0:Present charging current H¡¦118.3,H¡¦118.4¡¨ is less than or equal to rated current of a charging cable
  2148. // bit0=1:Present charging current H¡¦118.3,H¡¦118.4¡¨ is exceeds to rated current of a charging cable
  2149. // bit1=1:charging cable Cooling function Operating Installed
  2150. // bit2=1:charging cable Current limiting function
  2151. // bit3=1:charging connector Cooling function Operating
  2152. // bit4=1:charging connector Current limiting function Installed
  2153. // bit5=1:charging connector Over-temperature protection Installed
  2154. // bit6=1:Functional safety Applied
  2155. unsigned int MaxiGroupPower; // XXXXXXXX (Unit:Watt)depend on which group to be used
  2156. unsigned int MaxiGroupCurrent; // XXXXXXXX (unit:1A)depend on which group to be used
  2157. unsigned short ApplyOutputVoltage; // 0~600(V) (unit:1V)
  2158. unsigned short ElapseChargingTime; // (Unit:sec)
  2159. unsigned short ElapseEnergy; // (Unit:10xkWh)
  2160. unsigned char EvboardStatus; // 0 : init
  2161. };
  2162. struct CHAdeMOData
  2163. {
  2164. struct CHAdeMOEvData ev[CHAdeMO_QUANTITY];
  2165. struct CHAdeMOEvseData evse[CHAdeMO_QUANTITY];
  2166. };
  2167. /************************************************************************************/
  2168. /**************************GBT protocol Share memory*********************/
  2169. /**************************************************************************************/
  2170. struct GBTEvData
  2171. {
  2172. unsigned short MaxiBatteryVoltage; // 0~600(V) (unit:1V)
  2173. unsigned short MaxiChargingTime; // 10(sec.)~255(min.) (Unit:sec)
  2174. unsigned char EstimatChargingTime; // 0~254(min.) (Unit:sec)
  2175. unsigned short TotalBatteryCapacity; // 0.1~6553.5(kWh) (unit:0.1 kWh)
  2176. unsigned char ProtocolVersion; // 0~255
  2177. unsigned short TargetBatteryVoltage; // 0~600(V) (unit:1V)
  2178. unsigned short ChargingCurrentRequest; // 0~200(A) (unit:1A)
  2179. // 0~1023(A) (unit:1A)
  2180. unsigned char EvDetection; //102.5
  2181. // bit0=0:Vehicle charging disabled, (stop charging)
  2182. // bit0=1:Vehicle charging enabled,
  2183. // bit1=0:¡§Parking¡¨ position
  2184. // bit1=1:other position (stop charging)
  2185. // bit2=0:Charging system normal
  2186. // bit2=1:Charging system error (stop charging)
  2187. // bit3=0:EV contactor close or during welding detection
  2188. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  2189. // bit4=0:No stop request before charging
  2190. // bit4=1:Normal stop request before charging (stop charging)
  2191. unsigned char SOC; //102.6 0~100(%) (unit:%)
  2192. // Display Only
  2193. unsigned char PresentMsgFlowStatus; //
  2194. };
  2195. struct GBTEvseData
  2196. {
  2197. unsigned char SelfTest_Comp;
  2198. unsigned char version[16]; // GBT firmware version
  2199. unsigned short AvailableOutputVoltage; // 0~600(V) (unit:1V)
  2200. unsigned short AvailableOutputCurrent; // 0~255(A) (unit:1A)
  2201. unsigned char ConnectorTemperatureP; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2202. unsigned char ConnectorTemperatureN; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2203. unsigned short PresentOutputVoltage; // 0~600(V) (unit:1V)
  2204. unsigned short PresentOutputCurrent; // 0~255(A) (unit:1A)
  2205. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  2206. unsigned char EvboardStatus; // 0 : init
  2207. };
  2208. struct GBTData
  2209. {
  2210. struct GBTEvData ev[GB_QUANTITY];
  2211. struct GBTEvseData evse[GB_QUANTITY];
  2212. };
  2213. /************************************************************************************/
  2214. /**************************CCS protocol Share memory***************************/
  2215. /**************************DIN70121: 201412***************************************/
  2216. /**************************ISO15118_2014: 2014************************************/
  2217. /**************************ISO15118_2018: 2018************************************/
  2218. /************************************************************************************/
  2219. typedef enum boolean { FALSE, TRUE } BOOL;
  2220. enum ResponseCodeType_DIN70121 { OK_DIN70121 = 0, OK_NewSessionEstablished_DIN70121 = 1, OK_OldSessionJoined_DIN70121 = 2, OK_CertificateExpiresSoon_DIN70121 = 3,
  2221. FAILED_DIN70121 = 4, FAILED_SequenceError_DIN70121 = 5, FAILED_ServiceIDInvalid_DIN70121 = 6, FAILED_UnknownSession_DIN70121 = 7,
  2222. FAILED_ServiceSelectionInvalid_DIN70121 = 8, FAILED_PaymentSelectionInvalid_DIN70121 = 9, FAILED_CertificateExpired_DIN70121 = 10,
  2223. FAILED_SignatureError_DIN70121 = 11, FAILED_NoCertificateAvailable_DIN70121 = 12, FAILED_CertChainError_DIN70121 = 13, FAILED_ChallengeInvalid_DIN70121 = 14,
  2224. FAILED_ContractCanceled_DIN70121 = 15, FAILED_WrongChargeParameter_DIN70121 = 16, FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  2225. FAILED_TariffSelectionInvalid_DIN70121 = 18, FAILED_ChargingProfileInvalid_DIN70121 = 19, FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  2226. FAILED_MeteringSignatureNotValid_DIN70121 = 21, FAILED_WrongEnergyTransferType_DIN70121 = 22};
  2227. enum ResponseCodeType_ISO15118_2014 { OK_ISO15118_2014 = 0, OK_NewSessionEstablished_ISO15118_2014 = 1, OK_OldSessionJoined_ISO15118_2014 = 2, OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  2228. FAILED_ISO15118_2014 = 4, FAILED_SequenceError_ISO15118_2014 = 5, FAILED_ServiceIDInvalid_ISO15118_2014 = 6, FAILED_UnknownSession_ISO15118_2014 = 7,
  2229. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8, FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9, FAILED_CertificateExpired_ISO15118_2014 = 10,
  2230. FAILED_SignatureError_ISO15118_2014 = 11, FAILED_NoCertificateAvailable_ISO15118_2014 = 12, FAILED_CertChainError_ISO15118_2014 = 13, FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  2231. FAILED_ContractCanceled_ISO15118_2014 = 15, FAILED_WrongChargeParameter_ISO15118_2014 = 16, FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  2232. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18, FAILED_ChargingProfileInvalid_ISO15118_2014 = 19, FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  2233. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21, FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22, FAILED_ContactorError_ISO15118_2014 = 23,
  2234. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24, FAILED_CertificateRevoked_ISO15118_2014 = 25 };
  2235. enum ResponseCodeType_ISO15118_2018 { OK_ISO15118_2018 = 0, OK_NewSessionEstablished_ISO15118_2018 = 1, OK_OldSessionJoined_ISO15118_2018 = 2, OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  2236. OK_IsolationValid_ISO15118_2018 = 4, OK_IsolationWarning_ISO15118_2018 = 5, WARNING_CertificateExpired_ISO15118_2018 = 6, WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  2237. WARNING_CertValidationError_ISO15118_2018 = 8, WARNING_CertVerificationError_ISO15118_2018 = 9, WARNING_ContractCanceled_ISO15118_2018 = 10,
  2238. FAILED_ISO15118_2018 = 11, FAILED_SequenceError_ISO15118_2018 = 12, FAILED_ServiceIDInvalid_ISO15118_2018 = 13, FAILED_UnknownSession_ISO15118_2018 = 14,
  2239. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15, FAILED_SignatureError_ISO15118_2018 = 16, FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  2240. FAILED_ChallengeInvalid_ISO15118_2018 = 18, FAILED_WrongChargeParameter_ISO15118_2018 = 19, FAILED_IsolationFault_ISO15118_2018 = 20,
  2241. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21, FAILED_TariffSelectionInvalid_ISO15118_2018 = 22, FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  2242. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24, FAILED_NoChargeServiceSelected_ISO15118_2018 = 25, FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  2243. FAILED_ContactorError_ISO15118_2018 = 27, FAILED_CertificateRevoked_ISO15118_2018 = 28, FAILED_CertificateNotYetValid_ISO15118_2018 = 29 };
  2244. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  2245. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  2246. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  2247. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  2248. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  2249. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  2250. enum EnergyTransferModeType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  2251. DC_combo_core = 4, DC_unique = 5};
  2252. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  2253. enum unitSymbolType_DIN70121 { h_DIN70121 = 0, m_DIN70121 = 1, s_DIN70121 = 2, A_DIN70121 = 3, Ah_DIN70121 = 4, V_DIN70121 = 5, VA_DIN70121 = 6, W_DIN70121 = 7, Ws_DIN70121 = 8, Wh_DIN70121 = 9};
  2254. enum unitSymbolType_ISO15118_2014 { h_ISO15118_2014 = 0, m_ISO15118_2014 = 1, s_ISO15118_2014 = 2, A_ISO15118_2014 = 3, V_ISO15118_2014 = 4, W_ISO15118_2014 = 5, Wh_ISO15118_2014 = 6};
  2255. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  2256. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  2257. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  2258. enum DC_EVErrorCodeType { NO_ERROR = 0, FAILED_RESSTemperatureInhibit = 1, FAILED_EVShiftPosition = 2, FAILED_ChargerConnectorLockFault = 3,
  2259. FAILED_EVRESSMalfunction = 4, FAILED_ChargingCurrentdifferential = 5, FAILED_ChargingVoltageOutOfRange = 6,
  2260. Reserved_A = 7, Reserved_B = 8, Reserved_C = 9, FAILED_ChargingSystemIncompatibility = 10, NoData = 11};
  2261. enum IsolationLevelType_DIN70121 { Invalid_DIN70121 = 0, Valid_DIN70121 = 1, Warning_DIN70121 = 2, Fault_DIN70121 = 3};
  2262. enum IsolationLevelType_ISO15118_2014 { Invalid_ISO15118_2014 = 0, Valid_ISO15118_2014 = 1, Warning_ISO15118_2014 = 2, Fault_ISO15118_2014 = 3, No_IMD_ISO15118_2014 = 4};
  2263. enum DC_EVSEStatusCodeType { EVSE_NotReady = 0, EVSE_Ready = 1, EVSE_Shutdown = 2, EVSE_UtilityInterruptEvent = 3,
  2264. EVSE_IsolationMonitoringActive = 4, EVSE_EmergencyShutdown = 5, EVSE_Malfunction = 6,
  2265. Reserved_8 = 7, Reserved_9 = 8};
  2266. enum ScheduleOriginType { EV = 0, SA = 1};
  2267. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  2268. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  2269. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  2270. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  2271. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  2272. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  2273. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  2274. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  2275. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  2276. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  2277. enum ChargingSessionType { Terminate = 0, Pause = 1};
  2278. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  2279. struct PhysicalValueType_DIN70121 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  2280. {
  2281. int Multiplier; //range: -3..+3
  2282. enum unitSymbolType_DIN70121 Unit;
  2283. short Value;
  2284. };
  2285. struct PhysicalValueType_ISO15118_2014 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  2286. {
  2287. int Multiplier; //range: -3..+3
  2288. enum unitSymbolType_ISO15118_2014 Unit;
  2289. short Value;
  2290. };
  2291. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  2292. {
  2293. int Exponent; //range: -3..+3
  2294. short Value;
  2295. };
  2296. struct AppProtocolType
  2297. {
  2298. unsigned char ProtocolNamespace[100];
  2299. unsigned int VersionNumberMajor;
  2300. unsigned int VersionNumberMinor;
  2301. unsigned char SchemaID;
  2302. unsigned char Priority; //range 1..20
  2303. };
  2304. struct ACD_SSEnergyTransferModeType
  2305. {
  2306. unsigned char EVID[20];
  2307. };
  2308. struct EVSEStatusType
  2309. {
  2310. unsigned short NotificationMaxDelay; //in seconds
  2311. enum EVSENotificationType EVSENotification;
  2312. };
  2313. struct ServiceIDListType
  2314. {
  2315. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  2316. };
  2317. struct PaymentOptionListType
  2318. {
  2319. enum PaymentOptionType PaymentOption[2];
  2320. };
  2321. struct ServiceTagType
  2322. {
  2323. unsigned short ServiceID;
  2324. unsigned char ServiceName[32];//Optional Element
  2325. enum ServiceCategoryType ServiceCategory;
  2326. unsigned char ServiceScope[32];//Optional Element
  2327. };
  2328. struct ServiceType_DIN70121
  2329. {
  2330. struct ServiceTagType ServiceTag;
  2331. BOOL FreeService;
  2332. };
  2333. struct ServiceType_ISO15118_2014
  2334. {
  2335. unsigned short ServiceID;
  2336. unsigned char ServiceName[32]; //Optional
  2337. enum ServiceCategoryType ServiceCategory;
  2338. unsigned char ServiceScope[64]; //Optional
  2339. BOOL FreeService;
  2340. };
  2341. /*struct ServiceType_ISO15118_2018
  2342. {
  2343. unsigned short ServiceID;
  2344. BOOL FreeService;
  2345. }; */
  2346. struct SupportedEnergyTransferModeType
  2347. {
  2348. enum EnergyTransferModeType EnergyTransferMode[6];
  2349. };
  2350. struct ServiceChargeType
  2351. {
  2352. struct ServiceType_DIN70121 Services;
  2353. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  2354. enum EnergyTransferModeType EnergyTransferType;
  2355. };
  2356. struct ChargeServiceType
  2357. {
  2358. struct ServiceType_ISO15118_2014 Services;
  2359. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  2360. };
  2361. struct ServiceListType
  2362. {
  2363. struct ServiceType_ISO15118_2014 Service[8];
  2364. };
  2365. struct IdentificationOptionListType
  2366. {
  2367. enum PaymentOptionType IdentificationOption[2];
  2368. };
  2369. struct ParameterType
  2370. {
  2371. unsigned char Name[32];
  2372. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  2373. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  2374. };
  2375. struct ParameterSetType
  2376. {
  2377. short ParameterSetID;
  2378. struct ParameterType Parameter[16];
  2379. };
  2380. struct ServiceParameterListType
  2381. {
  2382. struct ParameterSetType ParameterSet[255];
  2383. };
  2384. struct WPT_SDlEnergyTransferModeType
  2385. {
  2386. struct ServiceParameterListType ServiceParameterList;
  2387. };
  2388. struct SelectedServiceType
  2389. {
  2390. unsigned short ServiceID;
  2391. short ParameterSetID;
  2392. };
  2393. struct SelectedServiceListType
  2394. {
  2395. struct SelectedServiceType SelectedService[16];
  2396. };
  2397. struct CertificateChainType
  2398. {
  2399. unsigned char Id[32]; //Optional
  2400. unsigned char Certificate[800]; //check size again
  2401. unsigned char SubCertificates[4][800]; //Optional, check size again
  2402. };
  2403. struct PNC_AReqIdentificationModeType
  2404. {
  2405. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  2406. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  2407. };
  2408. struct AC_EVChargeParameterType
  2409. {
  2410. unsigned int DepartureTime; //Optional
  2411. struct PhysicalValueType_ISO15118_2014 EAmount;
  2412. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  2413. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  2414. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  2415. };
  2416. struct DC_EVStatusType_DIN70121
  2417. {
  2418. BOOL EVReady;
  2419. BOOL EVCabinConditioning;
  2420. BOOL EVRESSConiditioning;
  2421. enum DC_EVErrorCodeType EVErrorCode;
  2422. unsigned char EVRESSSOC; /*0-100 percentage*/
  2423. };
  2424. struct DC_EVChargeParameterType_DIN70121
  2425. {
  2426. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2427. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  2428. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  2429. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  2430. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  2431. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  2432. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  2433. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  2434. };
  2435. struct DC_EVStatusType_ISO15118_2014
  2436. {
  2437. BOOL EVReady;
  2438. enum DC_EVErrorCodeType EVErrorCode;
  2439. unsigned char EVRESSSOC; /*0-100 percentage*/
  2440. };
  2441. struct DC_EVChargeParameterType_ISO15118_2014
  2442. {
  2443. unsigned int DepartureTime; //Optional
  2444. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2445. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  2446. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  2447. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  2448. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  2449. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  2450. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  2451. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  2452. };
  2453. struct Dynamic_CPDReqControlModeType
  2454. {
  2455. unsigned int DepartureTime;
  2456. };
  2457. struct RelativeTimeIntervalType
  2458. {
  2459. unsigned int duration; //Optional
  2460. unsigned int start;
  2461. };
  2462. struct PMaxScheduleEntryType
  2463. {
  2464. struct RelativeTimeIntervalType RelativeTimeInterval;
  2465. unsigned short PMax;
  2466. };
  2467. struct PMaxScheduleType
  2468. {
  2469. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  2470. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  2471. };
  2472. struct CostType
  2473. {
  2474. unsigned int amount;
  2475. enum CostKindType costKind;
  2476. int amountMultiplier; //Optional , range: -3..+3
  2477. };
  2478. struct ConsumptionCostType
  2479. {
  2480. struct CostType Cost[3];
  2481. struct PhysicalValueType_ISO15118_2014 startValue;
  2482. };
  2483. struct SalesTariffEntryType
  2484. {
  2485. struct RelativeTimeIntervalType RelativeTimeInterval;
  2486. unsigned char EPriceLevel; //Optional
  2487. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  2488. };
  2489. struct SalesTariffType
  2490. {
  2491. unsigned char Id[32]; //Optional
  2492. short SalesTariffID;
  2493. unsigned char SalesTariffDescription[32]; //Optional
  2494. unsigned char NumEPriceLevels; //Optional
  2495. struct SalesTariffEntryType SalesTariffEntry[1024];
  2496. };
  2497. struct SAScheduleTupleType
  2498. {
  2499. short SAScheduleTupleID;
  2500. struct PMaxScheduleType PMaxSchedule;
  2501. struct SalesTariffType SalesTariff; //Optional
  2502. };
  2503. struct ScheduleListType
  2504. {
  2505. enum ScheduleOriginType ScheduleOrigin;
  2506. struct SAScheduleTupleType ScheduleTuple[3];
  2507. };
  2508. struct Scheduled_CPDReqControlModeType
  2509. {
  2510. enum ProcessingType EVProcessing;
  2511. unsigned int DepartureTime; //Optional
  2512. unsigned short MaxSupportingPoints;
  2513. struct ScheduleListType ScheduleList; //Optional
  2514. };
  2515. struct AC_CPDReqEnergyTransferModeType
  2516. {
  2517. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2518. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2519. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2520. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2521. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2522. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2523. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2524. };
  2525. struct DC_CPDReqEnergyTransferModeType
  2526. {
  2527. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  2528. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  2529. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2530. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2531. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2532. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2533. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2534. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2535. unsigned char TargetSOC; //Optional
  2536. unsigned char BulkSOC; //Optional
  2537. };
  2538. struct BPT_AC_CPDReqEnergyTransferModeType
  2539. {
  2540. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2541. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  2542. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  2543. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2544. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  2545. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2546. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  2547. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2548. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2549. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2550. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2551. };
  2552. struct BPT_DC_CPDReqEnergyTransferModeType
  2553. {
  2554. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2555. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  2556. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  2557. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  2558. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2559. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2560. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  2561. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  2562. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2563. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  2564. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  2565. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  2566. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  2567. unsigned char TargetSOC; //Optional
  2568. unsigned char BulkSOC; //Optional
  2569. };
  2570. struct WPT_CPDReqEnergyTransferModeType
  2571. {
  2572. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  2573. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  2574. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2575. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2576. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2577. };
  2578. struct ACD_CPDReqEnergyTransferModeType
  2579. {
  2580. //cannot be found in standard
  2581. };
  2582. struct SAScheduleListType
  2583. {
  2584. struct SAScheduleTupleType SAScheduleTuple[3];
  2585. };
  2586. struct DC_EVSEStatusType_DIN70121
  2587. {
  2588. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  2589. enum DC_EVSEStatusCodeType EVSEStatusCode;
  2590. unsigned int NotificationMaxDelay;
  2591. enum EVSENotificationType EVSENotification;
  2592. };
  2593. struct DC_EVSEChargeParameterType_DIN70121
  2594. {
  2595. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2596. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  2597. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  2598. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  2599. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  2600. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  2601. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  2602. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  2603. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  2604. };
  2605. struct AC_EVSEStatusType
  2606. {
  2607. BOOL RCD;
  2608. unsigned short NotificationMaxDelay;
  2609. enum EVSENotificationType EVSENotification; //need to be confirmed
  2610. };
  2611. struct AC_EVSEChargeParameterType
  2612. {
  2613. struct AC_EVSEStatusType AC_EVSEStatus;
  2614. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  2615. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  2616. };
  2617. struct DC_EVSEStatusType_ISO15118_2014
  2618. {
  2619. unsigned short NotificationMaxDelay;
  2620. enum EVSENotificationType EVSENotification;
  2621. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  2622. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  2623. };
  2624. struct DC_EVSEChargeParameterType_ISO15118_2014
  2625. {
  2626. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2627. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  2628. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  2629. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  2630. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  2631. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  2632. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  2633. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  2634. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  2635. };
  2636. struct Scheduled_CPDResControlModeType
  2637. {
  2638. struct ScheduleListType ScheduleList;
  2639. };
  2640. struct AC_CPDResEnergyTransferModeType
  2641. {
  2642. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  2643. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  2644. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  2645. };
  2646. struct DC_CPDResEnergyTransferModeType
  2647. {
  2648. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  2649. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  2650. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  2651. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  2652. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  2653. };
  2654. struct BPT_AC_CPDResEnergyTransferModeType
  2655. {
  2656. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  2657. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  2658. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  2659. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  2660. };
  2661. struct BPT_DC_CPDResEnergyTransferModeType
  2662. {
  2663. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  2664. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  2665. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  2666. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  2667. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  2668. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  2669. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  2670. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  2671. };
  2672. struct WPT_CPDResEnergyTransferModeType
  2673. {
  2674. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  2675. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  2676. };
  2677. struct ACD_CPDResEnergyTransferModeType
  2678. {
  2679. //not found in ISO15118_2018
  2680. };
  2681. struct ProfileEntryType_DIN70121
  2682. {
  2683. unsigned int ChargingProfileEntryStart;
  2684. short ChargingProfileEntryMaxPower;
  2685. };
  2686. struct ChargingProfileType_DIN70121
  2687. {
  2688. short SAScheduleTupleID;
  2689. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  2690. };
  2691. struct DC_EVPowerDeliveryParameterType_DIN70121
  2692. {
  2693. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2694. BOOL BulkChargingComplete; //Optional
  2695. BOOL ChargingComplete;
  2696. };
  2697. struct ProfileEntryType_ISO15118_2014
  2698. {
  2699. unsigned int ChargingProfileEntryStart;
  2700. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  2701. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  2702. };
  2703. struct ChargingProfileType_ISO15118_2014
  2704. {
  2705. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  2706. };
  2707. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  2708. {
  2709. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2710. BOOL BulkChargingComplete; //Optional
  2711. BOOL ChargingComplete;
  2712. };
  2713. struct TimeInterval
  2714. {
  2715. unsigned int start;
  2716. unsigned int duration; //Optional
  2717. };
  2718. struct PowerScheduleEntryType
  2719. {
  2720. struct TimeInterval TimeInterval;
  2721. struct PhysicalValueType_ISO15118_2018 Power[3];
  2722. };
  2723. struct EVPowerProfileType
  2724. {
  2725. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  2726. };
  2727. struct Scheduled_PDReqControlModeType
  2728. {
  2729. unsigned char ScheduleTupleID;
  2730. struct EVPowerProfileType EVPowerProfile;
  2731. };
  2732. struct BPT_Scheduled_PDReqControlModeType
  2733. {
  2734. unsigned char ScheduleTupleID;
  2735. struct EVPowerProfileType EVPowerProfile; //Optional
  2736. enum evOperationType EVOperation;
  2737. };
  2738. struct ListOfRootCertificateIDsType
  2739. {
  2740. unsigned char RootCertificateID[20][40];
  2741. };
  2742. struct ContractSignatureEncryptedPrivateKeyType
  2743. {
  2744. unsigned char Id[32];
  2745. };
  2746. struct DiffieHellmanPublickeyType
  2747. {
  2748. unsigned char Id[32];
  2749. };
  2750. struct ContractCertificateEncryptedPrivateKeyType
  2751. {
  2752. unsigned char Id[32];
  2753. };
  2754. struct EVTechnicalStatusType
  2755. {
  2756. BOOL EV_Status_ReadyToCharge;
  2757. BOOL EV_Status_ImmobilizationRequest; //Optional
  2758. BOOL EV_Status_Immobilized;
  2759. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  2760. enum EV_CP_StatusType EV_CP_Status;
  2761. unsigned char EV_Status_RESSSOC; //0~100%
  2762. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  2763. BOOL EVSE_Timeout;
  2764. };
  2765. struct MeterInfoType_ISO15118_2014
  2766. {
  2767. unsigned char MeterID[32];
  2768. unsigned long MeterReading; //Optional
  2769. unsigned char SigMeterReading[64]; //Optional
  2770. short MeterStatus; //Optional
  2771. short TMeter; //Optional
  2772. };
  2773. struct Scheduled_MRReqControlModeType
  2774. {
  2775. unsigned char ScheduleTupleID;
  2776. };
  2777. struct MeterInfoType_ISO15118_2018
  2778. {
  2779. unsigned char MeterID[32];
  2780. unsigned long MeterReadingWhCharged; //Optional
  2781. unsigned long MeterReadingWhDischarged; //Optional
  2782. unsigned long MeterReadingVARhLeading; //Optional
  2783. unsigned long MeterReadingVARhLagging; //Optional
  2784. unsigned char SignatureMeterReading[64]; //Optional
  2785. short MeterStatus; //Optional
  2786. short TimeStampMeter; //Optional
  2787. BOOL ReceiptRequired; //Optional
  2788. };
  2789. struct PnC_CLReqIdentificationModeType
  2790. {
  2791. BOOL MeteringReceiptRequested;
  2792. };
  2793. struct Dynamic_CSReqControlModeType
  2794. {
  2795. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  2796. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  2797. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  2798. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2799. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2800. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2801. };
  2802. struct Scheduled_CSReqControlModeType
  2803. {
  2804. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2805. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2806. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2807. BOOL Standby;
  2808. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  2809. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  2810. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  2811. };
  2812. struct DisplayParametersType
  2813. {
  2814. unsigned short CurrentRange;
  2815. unsigned char CurrentSOC; //0~100%
  2816. unsigned char MinimumSOC; //0~100%
  2817. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  2818. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  2819. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  2820. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  2821. BOOL ChargingComplete;
  2822. BOOL BulkChargingComplete;
  2823. BOOL InletHot;
  2824. };
  2825. struct PnC_CLResIdentificationModeType
  2826. {
  2827. struct MeterInfoType_ISO15118_2018 MeterInfo;
  2828. };
  2829. struct Dynamic_CSResControlModeType
  2830. {
  2831. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  2832. };
  2833. struct Scheduled_CDResControlModeType
  2834. {
  2835. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  2836. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  2837. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  2838. };
  2839. struct LFA_EVFinePositioningSetupParametersType
  2840. {
  2841. unsigned char NumberOfSensors;
  2842. //NOT complete yet, to be continue.....
  2843. };
  2844. /****SupportedAppProtocolRequest****/
  2845. struct SupportedAppProtocolRequest_DIN70121
  2846. {
  2847. struct AppProtocolType AppProtocol[20];
  2848. };
  2849. struct SupportedAppProtocolRequest_ISO15118_2014
  2850. {
  2851. struct AppProtocolType AppProtocol[20];
  2852. };
  2853. struct SupportedAppProtocolRequest_ISO15118_2018
  2854. {
  2855. struct AppProtocolType AppProtocol[20];
  2856. };
  2857. /****SupportedAppProtocolResponse****/
  2858. struct SupportedAppProtocolResponse_DIN70121
  2859. {
  2860. enum ResponseCodeType_DIN70121 ResponseCode;
  2861. unsigned char SchemaID; //Optional
  2862. };
  2863. struct SupportedAppProtocolResponse_ISO15118_2014
  2864. {
  2865. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2866. unsigned char SchemaID; //Optional
  2867. };
  2868. struct SupportedAppProtocolResponse_ISO15118_2018
  2869. {
  2870. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2871. unsigned char SchemaID; //Optional
  2872. };
  2873. /****SessionSetupRequest****/
  2874. struct SessionSetupRequest_DIN70121
  2875. {
  2876. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2877. };
  2878. struct SessionSetupRequest_ISO15118_2014
  2879. {
  2880. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2881. };
  2882. struct SessionSetupRequest_ISO15118_2018
  2883. {
  2884. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2885. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  2886. };
  2887. /****SessionSetupResponse****/
  2888. struct SessionSetupResponse_DIN70121
  2889. {
  2890. enum ResponseCodeType_DIN70121 ResponseCode;
  2891. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2892. unsigned int EVSETimeStamp; //EPOCH format, Optional
  2893. };
  2894. struct SessionSetupResponse_ISO15118_2014
  2895. {
  2896. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2897. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2898. unsigned int EVSETimeStamp; //EPOCH format, Optional
  2899. };
  2900. struct SessionSetupResponse_ISO15118_2018
  2901. {
  2902. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2903. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2904. struct EVSEStatusType EVSEStatus; //Optional
  2905. };
  2906. /****ServiceDiscoveryRequest****/
  2907. struct ServiceDiscoveryRequest_DIN70121
  2908. {
  2909. unsigned char ServiceScope[32]; //Optional
  2910. enum ServiceCategoryType ServiceCategory; //Optional
  2911. };
  2912. struct ServiceDiscoveryRequest_ISO15118_2014
  2913. {
  2914. unsigned char ServiceScope[32]; //Optional
  2915. enum ServiceCategoryType ServiceCategory; //Optional
  2916. };
  2917. struct ServiceDiscoveryRequest_ISO15118_2018
  2918. {
  2919. struct ServiceIDListType SupportedServiceIDs; //Optional
  2920. };
  2921. /****ServiceDiscoveryResponse****/
  2922. struct ServiceDiscoveryResponse_DIN70121
  2923. {
  2924. enum ResponseCodeType_DIN70121 ResponseCode;
  2925. struct PaymentOptionListType PaymentOptions;
  2926. struct ServiceChargeType ChargeService_DIN70121;
  2927. };
  2928. struct ServiceDiscoveryResponse_ISO15118_2014
  2929. {
  2930. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2931. struct PaymentOptionListType PaymentOptions;
  2932. struct ChargeServiceType ChargeService;
  2933. struct ServiceListType ServiceList; //Optional
  2934. };
  2935. struct ServiceDiscoveryResponse_ISO15118_2018
  2936. {
  2937. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2938. struct EVSEStatusType EVSEStatus; //Optional
  2939. struct IdentificationOptionListType IdentificationOptionList;
  2940. struct ServiceListType EnergyTransferServiceList;
  2941. struct ServiceListType VASList; //Optional
  2942. };
  2943. /****ServiceDetailRequest****/
  2944. //Only in ISO15118_2014 and ISO15118_2018
  2945. struct ServiceDetailRequest_ISO15118_2014
  2946. {
  2947. unsigned short ServiceID;
  2948. };
  2949. struct ServiceDetailRequest_ISO15118_2018
  2950. {
  2951. unsigned short ServiceID;
  2952. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  2953. };
  2954. /****ServiceDetailResponse****/
  2955. struct ServiceDetailResponse_ISO15118_2014
  2956. {
  2957. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2958. unsigned short ServiceID;
  2959. struct ServiceParameterListType ServiceParameterList;
  2960. };
  2961. struct ServiceDetailResponse_ISO15118_2018
  2962. {
  2963. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2964. unsigned short ServiceID;
  2965. struct ServiceParameterListType ServiceParameterList;
  2966. struct EVSEStatusType EVSEStatus; //Optional
  2967. };
  2968. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  2969. struct ServiceAndPaymentSelectionRequest_DIN70121
  2970. {
  2971. enum PaymentOptionType SelectedPaymentOption;
  2972. struct SelectedServiceListType SelectedServiceList;
  2973. };
  2974. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  2975. {
  2976. enum PaymentOptionType SelectedPaymentOption;
  2977. struct SelectedServiceListType SelectedServiceList;
  2978. };
  2979. struct ServiceSelectionRequest_ISO15118_2018
  2980. {
  2981. enum PaymentOptionType SelectedPaymentOption;
  2982. struct SelectedServiceType SelectedEnergyTransferService;
  2983. struct SelectedServiceListType SelectedVASList;
  2984. enum ProcessingType EVProcessing;
  2985. };
  2986. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  2987. struct ServiceAndPaymentSelectionResponse_DIN70121
  2988. {
  2989. enum ResponseCodeType_DIN70121 ResponseCode;
  2990. };
  2991. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  2992. {
  2993. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2994. };
  2995. struct ServiceSelectionResponse_ISO15118_2018
  2996. {
  2997. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2998. struct EVSEStatusType EVSEStatus; //Optional
  2999. };
  3000. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  3001. struct PaymentDetailsRequest_ISO15118_2014
  3002. {
  3003. unsigned char eMAID[16];
  3004. struct CertificateChainType ContractSignatureCertChain;
  3005. };
  3006. struct IdentificationDetailsRequest_ISO15118_2018
  3007. {
  3008. struct CertificateChainType ContractSignatureCertChain;
  3009. };
  3010. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  3011. struct PaymentDetailsResponse_ISO15118_2014
  3012. {
  3013. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3014. unsigned char GenChallenge[16];
  3015. long EVSETimeStamp;
  3016. };
  3017. struct IdentificationDetailsResponse_ISO15118_2018
  3018. {
  3019. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3020. struct EVSEStatusType EVSEStatus; //Optional
  3021. unsigned char GenChallenge[16];
  3022. enum ProcessingType EVSEProcessing;
  3023. };
  3024. /****ContractAuthenticationRequest / AuthorizationRequest****/
  3025. struct ContractAuthenticationRequest_DIN70121
  3026. {
  3027. //None
  3028. };
  3029. struct AuthorizationRequest_ISO15118_2014
  3030. {
  3031. unsigned char GenChallenge[16]; //Optional
  3032. unsigned char Id[32]; //Optional
  3033. };
  3034. struct AuthorizationRequest_ISO15118_2018
  3035. {
  3036. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  3037. };
  3038. /****ContractAuthenticationResponse / AuthorizationResponse****/
  3039. struct ContractAuthenticationResponse_DIN70121
  3040. {
  3041. enum ResponseCodeType_DIN70121 ResponseCode;
  3042. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  3043. };
  3044. struct AuthorizationResponse_ISO15118_2014
  3045. {
  3046. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3047. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  3048. };
  3049. struct AuthorizationResponse_ISO15118_2018
  3050. {
  3051. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3052. enum ProcessingType EVSEProcessing;
  3053. struct EVSEStatusType EVSEStatus; //Optional
  3054. };
  3055. /****ChargeParameterDiscoveryRequest****/
  3056. struct ChargeParameterDiscoveryRequest_DIN70121
  3057. {
  3058. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  3059. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  3060. };
  3061. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  3062. {
  3063. unsigned short MaxEntriesSAScheduleTuple; //Optional
  3064. enum EnergyTransferModeType RequestedEnergyTransferMode;
  3065. struct AC_EVChargeParameterType AC_EVChargeParameter;
  3066. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  3067. };
  3068. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  3069. {
  3070. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  3071. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  3072. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  3073. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  3074. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  3075. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  3076. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  3077. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  3078. };
  3079. /****ChargeParameterDiscoveryResponse****/
  3080. struct ChargeParameterDiscoveryResponse_DIN70121
  3081. {
  3082. enum ResponseCodeType_DIN70121 ResponseCode;
  3083. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  3084. struct SAScheduleListType SAScheduleList;
  3085. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  3086. };
  3087. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  3088. {
  3089. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  3090. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3091. struct SAScheduleListType SAScheduleList;
  3092. struct AC_EVSEChargeParameterType AC_EVSEChargeParameter;
  3093. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  3094. };
  3095. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  3096. {
  3097. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3098. struct EVSEStatusType EVSEStatus; //Optional
  3099. enum ProcessingType EVSEProcessing;
  3100. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  3101. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  3102. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  3103. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  3104. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  3105. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  3106. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  3107. };
  3108. /****PowerDeliveryRequest****/
  3109. struct PowerDeliveryRequest_DIN70121
  3110. {
  3111. BOOL ReadyToChargeState;
  3112. struct ChargingProfileType_DIN70121 ChargingProfile;
  3113. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  3114. };
  3115. struct PowerDeliveryRequest_ISO15118_2014
  3116. {
  3117. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  3118. short SAScheduleTupleID;
  3119. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  3120. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  3121. };
  3122. struct PowerDeliveryRequest_ISO15118_2018
  3123. {
  3124. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  3125. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  3126. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  3127. };
  3128. /****PowerDeliveryResponse****/
  3129. struct PowerDeliveryResponse_DIN70121
  3130. {
  3131. enum ResponseCodeType_DIN70121 ResponseCode;
  3132. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3133. };
  3134. struct PowerDeliveryResponse_ISO15118_2014
  3135. {
  3136. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3137. struct AC_EVSEStatusType AC_EVSEStatus;
  3138. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3139. };
  3140. struct PowerDeliveryResponse_ISO15118_2018
  3141. {
  3142. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3143. struct EVSEStatusType EVSEStatus; //Optional
  3144. };
  3145. /****CertificateUpdateRequest****/
  3146. struct CertificateUpdateRequest_ISO15118_2014
  3147. {
  3148. unsigned char Id[32];
  3149. struct CertificateChainType ContractSignatureCertChain;
  3150. unsigned char eMAID[16];
  3151. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  3152. };
  3153. /****CertificateUpdateResponse****/
  3154. struct CertificateUpdateResponse_ISO15118_2014
  3155. {
  3156. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3157. struct CertificateChainType SAProvisioningCertificateChain;
  3158. struct CertificateChainType ContractSignatureCertChain;
  3159. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  3160. struct DiffieHellmanPublickeyType DHpublickey;
  3161. unsigned char eMAID[16];
  3162. short RetryCounter; //Optional
  3163. };
  3164. /****CertificateInstallationRequest****/
  3165. struct CertificateInstallationRequest_ISO15118_2014
  3166. {
  3167. unsigned char Id[32];
  3168. unsigned char OEMProvisioningCert[800];
  3169. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  3170. };
  3171. struct CertificateInstallationRequest_ISO15118_2018
  3172. {
  3173. unsigned char Id[32];
  3174. struct CertificateChainType OEMProvisioningCertChain;
  3175. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  3176. unsigned short MaxSupportedCerts;
  3177. };
  3178. /****CertificateInstallationResponse****/
  3179. struct CertificateInstallationResponse_ISO15118_2014
  3180. {
  3181. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3182. struct CertificateChainType SAProvisioningCertificateChain;
  3183. struct CertificateChainType ContractSignatureCertChain;
  3184. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  3185. struct DiffieHellmanPublickeyType DHpublickey;
  3186. unsigned char eMAID[16];
  3187. };
  3188. struct CertificateInstallationResponse_ISO15118_2018
  3189. {
  3190. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3191. struct EVSEStatusType EVSEStatus; //Optional
  3192. struct CertificateChainType SAProvisioningCertificateChain;
  3193. struct CertificateChainType ContractCertificateChain;
  3194. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  3195. struct DiffieHellmanPublickeyType DHpublickey;
  3196. enum ProcessingType EVSEProcessing;
  3197. unsigned short RemainingContractCertificateChains;
  3198. };
  3199. /****SystemStatusRequest****/
  3200. struct SystemStatusRequest_ISO15118_2018
  3201. {
  3202. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  3203. struct EVTechnicalStatusType EVTechnicalStatus;
  3204. unsigned char EV_OEMStatus[800]; //Optional
  3205. };
  3206. /****SystemStatusResponse****/
  3207. struct SystemStatusResponse_ISO15118_2018
  3208. {
  3209. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3210. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  3211. BOOL EVSE_ReadyToCharge;
  3212. enum IsolationStatusType EVSE_IsolationStatus;
  3213. BOOL EVSE_Disabled;
  3214. BOOL EVSE_UtilityInterruptEvent;
  3215. BOOL EVSE_EmergencyShutdown;
  3216. BOOL EVSE_Malfunction;
  3217. BOOL EV_InChargePosition;
  3218. BOOL EV_AssociationStatus;
  3219. };
  3220. /****SessionStopRequest****/
  3221. struct SessionStopRequest_DIN70121
  3222. {
  3223. //No member in standard
  3224. };
  3225. struct SessionStopRequest_ISO15118_2014
  3226. {
  3227. enum ChargingSessionType ChargingSession;
  3228. };
  3229. struct SessionStopRequest_ISO15118_2018
  3230. {
  3231. enum ChargingSessionType ChargingSession;
  3232. };
  3233. /****SessionStopResponse****/
  3234. struct SessionStopResponse_DIN70121
  3235. {
  3236. enum ResponseCodeType_DIN70121 ResponseCode;
  3237. };
  3238. struct SessionStopResponse_ISO15118_2014
  3239. {
  3240. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3241. };
  3242. struct SessionStopResponse_ISO15118_2018
  3243. {
  3244. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3245. struct EVSEStatusType EVSEStatus; //Optional
  3246. };
  3247. /****MeteringReceiptRequest****/
  3248. struct MeteringReceiptRequest_ISO15118_2014
  3249. {
  3250. unsigned char Id[32]; //Optional
  3251. unsigned char SessionID[8];
  3252. short SAScheduleTupleID; //Optional
  3253. struct MeterInfoType_ISO15118_2014 MeterInfo;
  3254. };
  3255. struct MeteringReceiptRequest_ISO15118_2018
  3256. {
  3257. unsigned char Id[32]; //Optional
  3258. unsigned char SessionID[8];
  3259. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  3260. struct MeterInfoType_ISO15118_2018 MeterInfo;
  3261. };
  3262. /****MeteringReceiptResponse****/
  3263. struct MeteringReceiptResponse_ISO15118_2014
  3264. {
  3265. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3266. struct AC_EVSEStatusType AC_EVSEStatus;
  3267. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3268. };
  3269. struct MeteringReceiptResponse_ISO15118_2018
  3270. {
  3271. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3272. struct EVSEStatusType EVSEStatus; //Optional
  3273. };
  3274. /****ChargingStatusRequest (AC Only)****/
  3275. struct ChargingStatusRequest_ISO15118_2014
  3276. {
  3277. //No member in standard
  3278. };
  3279. struct ChargingStatusRequest_ISO15118_2018
  3280. {
  3281. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  3282. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  3283. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  3284. struct DisplayParametersType DisplayParameters;
  3285. };
  3286. /****ChargingStatusResponse (AC Only)****/
  3287. struct ChargingStatusResponse_ISO15118_2014
  3288. {
  3289. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3290. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3291. short SAScheduleTupleID;
  3292. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  3293. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  3294. BOOL ReceiptRequired; //Optional
  3295. struct AC_EVSEStatusType AC_EVSEStatus;
  3296. };
  3297. struct ChargingStatusResponse_ISO15118_2018
  3298. {
  3299. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3300. struct EVSEStatusType EVSEStatus; //Optional
  3301. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3302. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  3303. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  3304. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  3305. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  3306. };
  3307. /****CableCheckRequest (DC Only)****/
  3308. struct CableCheckRequest_DIN70121
  3309. {
  3310. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3311. };
  3312. struct CableCheckRequest_ISO15118_2014
  3313. {
  3314. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3315. };
  3316. struct CableCheckRequest_ISO15118_2018
  3317. {
  3318. //No member in standard
  3319. };
  3320. /****CableCheckResponse (DC Only)****/
  3321. struct CableCheckResponse_DIN70121
  3322. {
  3323. enum ResponseCodeType_DIN70121 ResponseCode;
  3324. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3325. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  3326. };
  3327. struct CableCheckResponse_ISO15118_2014
  3328. {
  3329. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3330. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3331. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  3332. };
  3333. struct CableCheckResponse_ISO15118_2018
  3334. {
  3335. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3336. struct EVSEStatusType EVSEStatus; //Optional
  3337. enum ProcessingType EVSEProcessing;
  3338. };
  3339. /****PreChargeRequest (DC Only)****/
  3340. struct PreChargeRequest_DIN70121
  3341. {
  3342. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3343. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  3344. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  3345. };
  3346. struct PreChargeRequest_ISO15118_2014
  3347. {
  3348. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3349. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  3350. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  3351. };
  3352. struct PreChargeRequest_ISO15118_2018
  3353. {
  3354. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  3355. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  3356. };
  3357. /****PreChargeResponse (DC Only)****/
  3358. struct PreChargeResponse_DIN70121
  3359. {
  3360. enum ResponseCodeType_DIN70121 ResponseCode;
  3361. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3362. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  3363. };
  3364. struct PreChargeResponse_ISO15118_2014
  3365. {
  3366. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3367. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3368. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  3369. };
  3370. struct PreChargeResponse_ISO15118_2018
  3371. {
  3372. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3373. struct EVSEStatusType EVSEStatus; //Optional
  3374. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  3375. };
  3376. /****CurrentDemandRequest (DC Only)****/
  3377. struct CurrentDemandRequest_DIN70121
  3378. {
  3379. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3380. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  3381. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  3382. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  3383. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  3384. BOOL BulkChargingComplete; //Optional
  3385. BOOL ChargingComplete;
  3386. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  3387. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  3388. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  3389. };
  3390. struct CurrentDemandRequest_ISO15118_2014
  3391. {
  3392. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3393. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  3394. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  3395. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  3396. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  3397. BOOL BulkChargingComplete; //Optional
  3398. BOOL ChargingComplete;
  3399. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  3400. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  3401. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  3402. };
  3403. struct CurrentDemandRequest_ISO15118_2018
  3404. {
  3405. struct DisplayParametersType DisplayParameters; //Optional
  3406. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  3407. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  3408. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  3409. };
  3410. /****CurrentDemandResponse (DC Only)****/
  3411. struct CurrentDemandResponse_DIN70121
  3412. {
  3413. enum ResponseCodeType_DIN70121 ResponseCode;
  3414. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3415. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  3416. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  3417. BOOL EVSECurrentLimitAchieved;
  3418. BOOL EVSEVoltageLimitAchieved;
  3419. BOOL EVSEPowerLimitAchieved;
  3420. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  3421. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  3422. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  3423. };
  3424. struct CurrentDemandResponse_ISO15118_2014
  3425. {
  3426. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3427. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3428. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  3429. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  3430. BOOL EVSECurrentLimitAchieved;
  3431. BOOL EVSEVoltageLimitAchieved;
  3432. BOOL EVSEPowerLimitAchieved;
  3433. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  3434. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  3435. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  3436. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3437. short SAScheduleTupleID;
  3438. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  3439. BOOL ReceiptRequired; //Optional
  3440. };
  3441. struct CurrentDemandResponse_ISO15118_2018
  3442. {
  3443. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3444. struct EVSEStatusType EVSEStatus; //Optional
  3445. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  3446. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  3447. BOOL EVSECurrentLimitAchieved;
  3448. BOOL EVSEVoltageLimitAchieved;
  3449. BOOL EVSEPowerLimitAchieved;
  3450. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  3451. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  3452. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  3453. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3454. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  3455. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  3456. };
  3457. /****WeldingDetectionRequest (DC Only)*****/
  3458. struct WeldingDetectionRequest_DIN70121
  3459. {
  3460. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3461. };
  3462. struct WeldingDetectionRequest_ISO15118_2014
  3463. {
  3464. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3465. };
  3466. struct WeldingDetectionRequest_ISO15118_2018
  3467. {
  3468. //No member in Standard
  3469. };
  3470. /****WeldingDetectionResponse (DC Only)****/
  3471. struct WeldingDetectionResponse_DIN70121
  3472. {
  3473. enum ResponseCodeType_DIN70121 ResponseCode;
  3474. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3475. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  3476. };
  3477. struct WeldingDetectionResponse_ISO15118_2014
  3478. {
  3479. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3480. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3481. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  3482. };
  3483. struct WeldingDetectionResponse_ISO15118_2018
  3484. {
  3485. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3486. struct EVSEStatusType EVSEStatus; //Optional
  3487. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  3488. };
  3489. /****FinePositioningSetupRequest (WPT Only)****/
  3490. struct FinePositioningSetupRequest_ISO15118_2018
  3491. {
  3492. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  3493. };
  3494. /****FinePositioningSetupResponse (WPT Only)****/
  3495. struct FinePositioningSetupResponse_ISO15118_2018
  3496. {
  3497. //NOT complete yet, to be continue.....
  3498. };
  3499. struct V2GMessageType_DIN70121
  3500. {
  3501. unsigned char SelfTest_Comp;
  3502. unsigned char version[16];
  3503. unsigned char PresentMsgFlowStatus;
  3504. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  3505. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  3506. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  3507. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  3508. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  3509. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  3510. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  3511. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  3512. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  3513. 28: AuthorizationRequest, 29: AuthorizationResponse,
  3514. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  3515. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  3516. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  3517. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  3518. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  3519. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  3520. 52: SessionStopRequest, 53: SessionStopResponse
  3521. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  3522. */
  3523. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  3524. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  3525. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  3526. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  3527. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  3528. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  3529. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  3530. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  3531. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  3532. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  3533. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  3534. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  3535. struct CableCheckRequest_DIN70121 CableCheckRequest;
  3536. struct CableCheckResponse_DIN70121 CableCheckResponse;
  3537. struct PreChargeRequest_DIN70121 PreChargeRequest;
  3538. struct PreChargeResponse_DIN70121 PreChargeResponse;
  3539. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  3540. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  3541. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  3542. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  3543. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  3544. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  3545. struct SessionStopRequest_DIN70121 SessionStopRequest;
  3546. struct SessionStopResponse_DIN70121 SessionStopResponse;
  3547. };
  3548. struct V2GMessageType_ISO15118_2014
  3549. {
  3550. unsigned char PresentMsgFlowStatus;
  3551. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  3552. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  3553. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  3554. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  3555. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  3556. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  3557. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  3558. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  3559. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  3560. 28: AuthorizationRequest, 29: AuthorizationResponse,
  3561. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  3562. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  3563. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  3564. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  3565. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  3566. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  3567. 52: SessionStopRequest, 53: SessionStopResponse
  3568. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  3569. */
  3570. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  3571. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  3572. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  3573. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  3574. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  3575. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  3576. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  3577. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  3578. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  3579. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  3580. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  3581. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  3582. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  3583. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  3584. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  3585. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  3586. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  3587. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  3588. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  3589. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  3590. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  3591. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  3592. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  3593. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  3594. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  3595. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  3596. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  3597. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  3598. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  3599. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  3600. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  3601. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  3602. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  3603. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  3604. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  3605. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  3606. };
  3607. struct V2GMessageType_ISO15118_2018
  3608. {
  3609. unsigned char PresentMsgFlowStatus;
  3610. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  3611. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  3612. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  3613. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  3614. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  3615. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  3616. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  3617. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  3618. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  3619. 28: AuthorizationRequest, 29: AuthorizationResponse,
  3620. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  3621. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  3622. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  3623. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  3624. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  3625. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  3626. 52: SessionStopRequest, 53: SessionStopResponse
  3627. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  3628. */
  3629. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  3630. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  3631. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  3632. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  3633. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  3634. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  3635. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  3636. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  3637. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  3638. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  3639. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  3640. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  3641. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  3642. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  3643. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  3644. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  3645. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  3646. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  3647. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  3648. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  3649. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  3650. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  3651. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  3652. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  3653. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  3654. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  3655. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  3656. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  3657. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  3658. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  3659. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  3660. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  3661. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  3662. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  3663. };
  3664. struct CcsData
  3665. {
  3666. unsigned char CommProtocol; // 1: V2GMessage_DIN70121, 2:V2GMessage_ISO15118_2014, 3:V2GMessage_ISO15118_2018
  3667. struct V2GMessageType_DIN70121 V2GMessage_DIN70121[CCS_QUANTITY];
  3668. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014[CCS_QUANTITY];
  3669. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018[CCS_QUANTITY];
  3670. };
  3671. /**************************************************************************************/
  3672. /***************STM32F407 Communication Share memory**************************/
  3673. /**************************************************************************************/
  3674. struct PrimaryMcuData
  3675. {
  3676. unsigned char SelfTest_Comp;
  3677. unsigned char version[16]; //STM32F407 firmware version
  3678. unsigned int InputVoltage; //value comes from external meter
  3679. unsigned int InputCurrent; //value comes from external meter
  3680. union
  3681. {
  3682. unsigned char OutputDrvValue[1];
  3683. struct
  3684. {
  3685. //OutputDrvValue[0]
  3686. unsigned char OnButtonLedDrv:1; //bit 0, H: ON, L:OFF
  3687. unsigned char OffButtonLedDrv:1; //bit 1, H: ON, L:OFF
  3688. unsigned char SystemLed1Drv:1; //bit 2, H: ON, L:OFF
  3689. unsigned char SystemLed2Drv:1; //bit 3, H: ON, L:OFF
  3690. unsigned char SystemLed3Drv:1; //bit 4, H: ON, L:OFF
  3691. unsigned char SystemLed4Drv:1; //bit 5, H: ON, L:OFF
  3692. unsigned char AcContactorDrv:1; //bit 6, H: ON, L:OFF
  3693. unsigned char:1; //bit 7 reserved
  3694. }bits;
  3695. }OutputDrv;
  3696. union
  3697. {
  3698. unsigned char InputDetValue[2];
  3699. struct
  3700. {
  3701. //InputDetValue[0]
  3702. unsigned char AcContactorDetec:1; //bit 0, H: ON, L:OFF
  3703. unsigned char AcMainBreakerDetec:1; //bit 1, H: ON, L:OFF
  3704. unsigned char SpdDetec:1; //bit 2, H: ON, L:OFF
  3705. unsigned char DoorOpen:1; //bit 3, H: Open, L:Close
  3706. unsigned char Gfd1:1; //bit 4, H: Trigger, L:Normal
  3707. unsigned char Gfd2:1; //bit 5, H: Trigger, L:Normal
  3708. unsigned char Button1:1; //bit 6 , H: Push, L:Release
  3709. unsigned char Button2:1; //bit 7, H: Push, L:Release
  3710. //InputDetValue[1]
  3711. unsigned char EmergencyButton:1; //bit 0, H: Push, L:Release
  3712. unsigned char Key0:1; //bit 1, H: ON, L:OFF
  3713. unsigned char Key1:1; //bit 2, H: ON, L:OFF
  3714. unsigned char Key2:1; //bit 3, H: ON, L:OFF
  3715. unsigned char Key3:1; //bit 4, H: ON, L:OFF
  3716. unsigned char :3; //bit 5~7, Reserved
  3717. }bits;
  3718. }InputDet;
  3719. };
  3720. /**************************************************************************************/
  3721. /*************Fan power module Communication Share memory******************/
  3722. /**************************************************************************************/
  3723. struct FanModuleData
  3724. {
  3725. unsigned char SelfTest_Comp;
  3726. unsigned char version[16]; //fan power module firmware version
  3727. unsigned short PresentFan1Speed; //RPM
  3728. unsigned short PresentFan2Speed; //RPM
  3729. unsigned short PresentFan3Speed; //RPM
  3730. unsigned short PresentFan4Speed; //RPM
  3731. unsigned short SetFan1Speed; //RPM
  3732. unsigned short SetFan2Speed; //RPM
  3733. unsigned short SetFan3Speed; //RPM
  3734. unsigned short SetFan4Speed; //RPM
  3735. unsigned short TestFanSpeed; //RPM
  3736. unsigned char DiffOfAirPressure; //pa
  3737. unsigned char UpdateFW; //1:do update
  3738. };
  3739. /**************************************************************************************/
  3740. /***********Relay control module Communication Share memory******************/
  3741. /**************************************************************************************/
  3742. struct RelayModuleData
  3743. {
  3744. unsigned char SelfTest_Comp;
  3745. unsigned char version[16]; //relay module firmware version
  3746. unsigned short InputL1Volt; //XXXXX.x volt
  3747. unsigned short InputL2Volt; //XXXXX.x volt
  3748. unsigned short InputL3Volt; //XXXXX.x volt
  3749. unsigned short Gun1FuseOutputVolt; //XXXXX.x volt
  3750. unsigned short Gun2FuseOutputVolt; //XXXXX.x volt
  3751. unsigned short Gun1RelayOutputVolt; //XXXXX.x volt
  3752. unsigned short Gun2RelayOutputVolt; //XXXXX.x volt
  3753. unsigned short Gun1OutputCurrent; //XXXXX.x amp
  3754. unsigned short Gun2OutputCurrent; //XXXXX.x amp
  3755. unsigned char UpdateFW; //1:do update
  3756. };
  3757. /**************************************************************************************/
  3758. /***********Led control module Communication Share memory******************/
  3759. /**************************************************************************************/
  3760. struct LedModuleData
  3761. {
  3762. unsigned char SelfTest_Comp;
  3763. unsigned char version[16]; //led module firmware version
  3764. unsigned short Connect_1_Status; // Idle : 0, Charging : 1, Alarm : 2
  3765. unsigned short Connect_2_Status; // Idle : 0, Charging : 1, Alarm : 2
  3766. unsigned short EnableFunc; // reserved
  3767. };
  3768. /**************************************************************************************/
  3769. /************************OCPP Share memory***************************************/
  3770. /**************************************************************************************/
  3771. struct StructIdTagInfo
  3772. {
  3773. unsigned char ExpiryDate[36];
  3774. unsigned char ParentIdTag[21];
  3775. unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
  3776. };
  3777. struct StructLocalAuthorizationList
  3778. {
  3779. unsigned char IdTag[21];
  3780. struct StructIdTagInfo IdTagInfo;
  3781. };
  3782. struct StructSampledValue
  3783. {
  3784. unsigned char Value[128];
  3785. unsigned char Context[30];//Interruption.Begin, Interruption.End, Sample.Clock, Sample.Periodic, Transaction.Begin, Transaction.End, Trigger, Other
  3786. unsigned char Format[16];//Raw,SignedData
  3787. unsigned char Measurand[40];/* "Energy.Active.Export.Register",
  3788. "Energy.Active.Import.Register",
  3789. "Energy.Reactive.Export.Register",
  3790. "Energy.Reactive.Import.Register",
  3791. "Energy.Active.Export.Interval",
  3792. "Energy.Active.Import.Interval",
  3793. "Energy.Reactive.Export.Interval",
  3794. "Energy.Reactive.Import.Interval",
  3795. "Power.Active.Export",
  3796. "Power.Active.Import",
  3797. "Power.Offered",
  3798. "Power.Reactive.Export",
  3799. "Power.Reactive.Import",
  3800. "Power.Factor",
  3801. "Current.Import",
  3802. "Current.Export",
  3803. "Current.Offered",
  3804. "Voltage",
  3805. "Frequency",
  3806. "Temperature",
  3807. "SoC",
  3808. "RPM"
  3809. */
  3810. unsigned char Phase[10]; /* "L1",
  3811. "L2",
  3812. "L3",
  3813. "N",
  3814. "L1-N",
  3815. "L2-N",
  3816. "L3-N",
  3817. "L1-L2",
  3818. "L2-L3",
  3819. "L3-L1"
  3820. */
  3821. unsigned char Location[10]; //Cable,EV,Inlet,Outlet,Body
  3822. unsigned char Unit[20]; /* "Wh",
  3823. "kWh",
  3824. "varh",
  3825. "kvarh",
  3826. "W",
  3827. "kW",
  3828. "VA",
  3829. "kVA",
  3830. "var",
  3831. "kvar",
  3832. "A",
  3833. "V",
  3834. "K",
  3835. "Celcius",
  3836. "Fahrenheit",
  3837. "Percent"
  3838. */
  3839. };
  3840. struct StructMeterValue
  3841. {
  3842. unsigned char TimeStamp[36];
  3843. struct StructSampledValue SampledValue[20];
  3844. };
  3845. struct StructConfigurationKeyItems
  3846. {
  3847. unsigned char Item[50];
  3848. };
  3849. struct StructConfigurationKey
  3850. {
  3851. unsigned char Key[50];
  3852. unsigned char ReadOnly[8]; //boolean
  3853. unsigned char Value[500];
  3854. };
  3855. struct StructChargingSchedulePeriod
  3856. {
  3857. int StartPeriod;
  3858. float Limit;//0.1;
  3859. int NumberPhases;
  3860. };
  3861. struct StructChargingSchedule
  3862. {
  3863. int Duration;
  3864. unsigned char StartSchedule[36];
  3865. unsigned char ChargingRateUnit[4]; //A, W
  3866. struct StructChargingSchedulePeriod ChargingSchedulePeriod[10];
  3867. float MinChargingRate; //0.1;
  3868. };
  3869. struct StructChargingProfile
  3870. {
  3871. int ChargingProfileId;
  3872. int TransactionId;
  3873. int StackLevel;
  3874. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  3875. unsigned char ChargingProfileKind[12]; //Absolute, Recurring, Relative
  3876. unsigned char RecurrencyKind[8]; //Daily, Weekly
  3877. unsigned char ValidFrom[36];
  3878. unsigned char ValidTo[36];
  3879. struct StructChargingSchedule ChargingSchedule;
  3880. };
  3881. struct StructBootNotification
  3882. {
  3883. unsigned char CpVendor[20]; //chargePointVendor //mandatory
  3884. unsigned char CpModel[20]; //chargePointModel //mandatory
  3885. unsigned char CpSN[25]; //chargePointSerialNumber
  3886. unsigned char CbSN[25]; //chargeBoxSerialNumber
  3887. unsigned char CpFwVersion[50]; //firmwareVersion
  3888. unsigned char CpIccid[22]; //iccid
  3889. unsigned char CpImsi[20]; //imsi
  3890. unsigned char CpMeterType[25]; //meterType
  3891. unsigned char CpMeterSerialNumber[25]; //meterSerialNumber
  3892. unsigned char ResponseStatus[16]; //Accepted, Pending, Rejected
  3893. unsigned char ResponseCurrentTime[36]; //currentTime //mandatory
  3894. int ResponseHeartbeatInterval; //interval //mandatory
  3895. };
  3896. struct StructHeartbeat
  3897. {
  3898. unsigned char ResponseCurrentTime[36];
  3899. };
  3900. struct StructAuthorize
  3901. {
  3902. unsigned char IdTag[21];
  3903. struct StructIdTagInfo ResponseIdTagInfo;
  3904. };
  3905. struct StructStartTransaction
  3906. {
  3907. int ConnectorId;
  3908. unsigned char IdTag[21];
  3909. int MeterStart;
  3910. int ReservationId;
  3911. unsigned char Timestamp[36];
  3912. struct StructIdTagInfo ResponseIdTagInfo;
  3913. int ResponseTransactionId;
  3914. };
  3915. struct StructStopTransaction
  3916. {
  3917. unsigned char IdTag[21];
  3918. int MeterStop;
  3919. unsigned char Timestamp[36];
  3920. int TransactionId;
  3921. unsigned char StopReason[20]; /* "EmergencyStop",
  3922. "EVDisconnected",
  3923. "HardReset",
  3924. "Local",
  3925. "Other",
  3926. "PowerLoss",
  3927. "Reboot",
  3928. "Remote",
  3929. "SoftReset",
  3930. "UnlockCommand",
  3931. "DeAuthorized"
  3932. */
  3933. struct StructMeterValue TransactionData[1];
  3934. struct StructIdTagInfo ResponseIdTagInfo;
  3935. };
  3936. struct StructStatusNotification
  3937. {
  3938. int ConnectorId;
  3939. unsigned char ErrorCode[25]; /* "ConnectorLockFailure",
  3940. "EVCommunicationError",
  3941. "GroundFailure",
  3942. "HighTemperature",
  3943. "InternalError",
  3944. "LocalListConflict",
  3945. "NoError",
  3946. "OtherError",
  3947. "OverCurrentFailure",
  3948. "PowerMeterFailure",
  3949. "PowerSwitchFailure",
  3950. "ReaderFailure",
  3951. "ResetFailure",
  3952. "UnderVoltage",
  3953. "OverVoltage",
  3954. "WeakSignal"
  3955. */
  3956. unsigned char Info[50];
  3957. unsigned char Status[20]; /* "Available",
  3958. "Preparing",
  3959. "Charging",
  3960. "SuspendedEVSE",
  3961. "SuspendedEV",
  3962. "Finishing",
  3963. "Reserved",
  3964. "Unavailable",
  3965. "Faulted"
  3966. */
  3967. unsigned char Timestamp[36];
  3968. unsigned char VendorId[256];
  3969. unsigned char VendorErrorCode[50];
  3970. };
  3971. struct StructCancelReservation
  3972. {
  3973. int ReservationId;
  3974. unsigned char ResponseStatus[16]; //Accepted, Rejected
  3975. unsigned char guid[37];
  3976. };
  3977. struct StructChangeAvailability
  3978. {
  3979. int ConnectorId;
  3980. unsigned char Type[16]; //Inoperative, Operative
  3981. unsigned char ResponseStatus[16]; //Accepted, Rejected, Scheduled
  3982. unsigned char guid[37];
  3983. };
  3984. struct StructChangeConfiguration
  3985. {
  3986. unsigned char Key[50];
  3987. unsigned char Value[500];
  3988. unsigned char ResponseStatus[16]; //Accepted, Rejected, RebootRequired, NotSupported
  3989. };
  3990. struct StructClearCache
  3991. {
  3992. unsigned char ResponseStatus[16]; //Accepted, Rejected
  3993. };
  3994. struct StructClearChargingProfile
  3995. {
  3996. int Id;
  3997. int ConnectorId;
  3998. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  3999. int StackLevel;
  4000. unsigned char ResponseStatus[16]; //Accepted, Unknown
  4001. };
  4002. struct StructDataTransfer
  4003. {
  4004. unsigned char VendorId[256];
  4005. unsigned char MessageId[52];
  4006. unsigned char Data[512];
  4007. unsigned char ResponseStatus[18]; //Accepted, Rejected,UnknownMessageId,UnknownVendorId
  4008. unsigned char ResponseData[256];
  4009. };
  4010. struct StructDiagnosticsStatusNotification
  4011. {
  4012. unsigned char Status[16]; //Idle,Uploaded,UploadFailed,Uploading
  4013. };
  4014. struct StructFirmwareStatusNotification
  4015. {
  4016. unsigned char Status[20]; //Downloaded,DownloadFailed,Downloading,Idle,InstallationFailed,Installing,Installed
  4017. };
  4018. struct StructGetCompositeSchedule
  4019. {
  4020. int ConnectorId;
  4021. int Duration;
  4022. unsigned char ChargingRateUnit[4]; //A,W
  4023. unsigned char ResponseStatus[12]; //Accepted,Rejected
  4024. int ResponseConnectorId;
  4025. unsigned char ResponseScheduleStart[36];
  4026. struct StructChargingSchedule ResponseChargingSchedule;
  4027. };
  4028. struct StructGetConfiguration
  4029. {
  4030. struct StructConfigurationKeyItems *Key;
  4031. struct StructConfigurationKey *ResponseConfigurationKey;
  4032. struct StructConfigurationKeyItems *ResponseUnknownKey;
  4033. };
  4034. struct StructGetDiagnostics
  4035. {
  4036. unsigned char Location[256];
  4037. int Retries;
  4038. int RetryInterval;
  4039. unsigned char StartTime[36];
  4040. unsigned char StopTime[36];
  4041. unsigned char ResponseFileName[256];
  4042. };
  4043. struct StructGetLocalListVersion
  4044. {
  4045. int ResponseListVersion;
  4046. };
  4047. struct StructMeterValues
  4048. {
  4049. int ConnectorId;
  4050. int TransactionId;
  4051. struct StructMeterValue MeterValue[1];
  4052. };
  4053. struct StructRemoteStartTransaction
  4054. {
  4055. int ConnectorId;
  4056. unsigned char IdTag[21];
  4057. struct StructChargingProfile ChargingProfile;
  4058. unsigned char ResponseStatus[10]; //Accepted, Rejected
  4059. unsigned char guid[37];
  4060. };
  4061. struct StructRemoteStopTransaction
  4062. {
  4063. int TransactionId;
  4064. unsigned char ResponseStatus[10]; //Accepted, Rejected
  4065. };
  4066. struct StructReserveNow
  4067. {
  4068. int ConnectorId;
  4069. unsigned char ExpiryDate[36];
  4070. unsigned char IdTag[21];
  4071. unsigned char ParentIdTag[21];
  4072. int ReservationId;
  4073. unsigned char ResponseStatus[12]; //Accepted, Faulted, Occupied, Rejected, Unavailable
  4074. unsigned char guid[37]; //OCPP Server request message uuid
  4075. };
  4076. struct StructReset
  4077. {
  4078. unsigned char Type[8]; //Hard, Soft
  4079. unsigned char ResponseStatus[10]; //Accepted, Rejected
  4080. unsigned char guid[37]; //OCPP Server request message uuid
  4081. };
  4082. struct StructSendLocalList
  4083. {
  4084. int ListVersion;
  4085. unsigned char UpdateType[16]; //Differential, Full
  4086. struct StructLocalAuthorizationList *LocalAuthorizationList;
  4087. unsigned char ResponseStatus[16]; //Accepted, Failed, NotSupported, VersionMismatch
  4088. };
  4089. struct StructSetChargingProfile
  4090. {
  4091. int ConnectorId;
  4092. struct StructChargingProfile ChargingProfile;
  4093. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotSupported
  4094. };
  4095. struct StructTriggerMessage
  4096. {
  4097. unsigned char RequestedMessage[32]; /*
  4098. "BootNotification",
  4099. "DiagnosticsStatusNotification",
  4100. "FirmwareStatusNotification",
  4101. "Heartbeat",
  4102. "MeterValues",
  4103. "StatusNotification"
  4104. */
  4105. int ConnectorId;
  4106. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotImplemented
  4107. };
  4108. struct StructUnlockConnector
  4109. {
  4110. int ConnectorId;
  4111. unsigned char ResponseStatus[16]; //Unlocked, UnlockFailed, NotSupported
  4112. unsigned char guid[37]; //OCPP Server request message uuid
  4113. };
  4114. struct StructUpdateFirmware
  4115. {
  4116. unsigned char Location[256];
  4117. int Retries;
  4118. unsigned char RetrieveDate[36];
  4119. int RetryInterval;
  4120. };
  4121. struct OCPP16ConfigurationItem
  4122. {
  4123. unsigned char ItemName[64];
  4124. unsigned char ItemAccessibility;//0:RO, 1:RW
  4125. unsigned char ItemData[128];
  4126. };
  4127. struct OCPP16ConfigurationTable
  4128. {
  4129. //please refer to OCPP 1.6 chapter 9
  4130. struct OCPP16ConfigurationItem CoreProfile[_CoreProfile_CNT];
  4131. struct OCPP16ConfigurationItem LocalAuthListManagementProfile[3];
  4132. struct OCPP16ConfigurationItem ReservationProfile[1];
  4133. struct OCPP16ConfigurationItem SmartChargingProfile[5];
  4134. };
  4135. struct StrcutSetUserPrice
  4136. {
  4137. unsigned char idToken[21];
  4138. unsigned char price[256];
  4139. };
  4140. struct StrcutRunningFinalCost
  4141. {
  4142. int txId;
  4143. unsigned char description[256];
  4144. };
  4145. struct StructCost
  4146. {
  4147. struct StrcutSetUserPrice SetUserPrice;
  4148. struct StrcutRunningFinalCost RunningCost[CONNECTOR_QUANTITY];
  4149. struct StrcutRunningFinalCost FinalCost[CONNECTOR_QUANTITY];
  4150. };
  4151. struct CertificateHashDataType
  4152. {
  4153. unsigned char hashAlgorithm[8]; // Required. Used algorithms for the hashes provided.
  4154. unsigned char issuerNameHash[129]; // Required. hashed value of the IssuerName.
  4155. unsigned char issuerKeyHash[129]; // Required. Hashed value of the issuers public key
  4156. unsigned char serialNumber[41]; // Required. The serial number of the certificate.
  4157. };
  4158. struct LogParametersType
  4159. {
  4160. unsigned char remoteLocation[513]; // Required. The URL of the location at the remote system where the log should be stored.
  4161. unsigned char oldestTimestamp[36]; // Optional. This contains the date and time of the oldest logging information to include in the diagnostics.
  4162. unsigned char latestTimestamp[36]; // Optional. This contains the date and time of the latest logging information to include in the diagnostics.
  4163. };
  4164. struct FirmwareType
  4165. {
  4166. unsigned char location[513]; // Required. URI defining the origin of the firmware.
  4167. unsigned char retrieveDateTime[36]; // Required. Date and time at which the firmware shall be retrieved.
  4168. unsigned char installDateTime[36]; // Optional. Date and time at which the firmware shall be installed.
  4169. unsigned char signingCertificate[5501]; // Optional. Certificate with which the firmware was signed. X.509 certificate, first DER encoded into binary, and then Base64 encoded.
  4170. unsigned char signature[801]; // Optional. Base64 encoded firmware signature.
  4171. };
  4172. struct StructCertificateSigned
  4173. {
  4174. unsigned char certificateChain[10001];
  4175. unsigned char Response_status[16];
  4176. };
  4177. struct StructDeleteCertificate
  4178. {
  4179. struct CertificateHashDataType certificateHashData;
  4180. unsigned char Response_status[16];
  4181. };
  4182. struct StructExtendedTrigger
  4183. {
  4184. unsigned char requestedMessage[32];
  4185. int connectorId;
  4186. unsigned char Response_status[16];
  4187. };
  4188. struct StructGetInstalledCertificateIds
  4189. {
  4190. unsigned char certificateType[32];
  4191. unsigned char Response_status[16];
  4192. struct CertificateHashDataType Response_certificateHashData[3];
  4193. };
  4194. struct StructGetLog
  4195. {
  4196. unsigned char logType[16];
  4197. int requestId;
  4198. int retries;
  4199. int retryInterval;
  4200. struct LogParametersType log;
  4201. unsigned char Response_status[16];
  4202. unsigned char Response_filename[256];
  4203. };
  4204. struct StructInstallCertificate
  4205. {
  4206. unsigned char certificateType[32];
  4207. unsigned char certificate[5501];
  4208. unsigned char Response_status[16];
  4209. };
  4210. struct StructSignedUpdateFirmware
  4211. {
  4212. int retries;
  4213. int retryInterval;
  4214. int requestId;
  4215. struct FirmwareType firmware;
  4216. unsigned char Response_status[16];
  4217. };
  4218. struct StructLogStatusNotification
  4219. {
  4220. unsigned char status[32];
  4221. int requestId;
  4222. };
  4223. struct StructSecurityEventNotification
  4224. {
  4225. unsigned char type[51];
  4226. unsigned char timestamp[28];
  4227. unsigned char techInfo[256];
  4228. };
  4229. struct StructSignCertificate
  4230. {
  4231. unsigned char csr[5501];
  4232. unsigned char Response_status[16];
  4233. };
  4234. struct StructSignedFirmwareStatusNotification
  4235. {
  4236. unsigned char status[32];
  4237. int requestId;
  4238. };
  4239. struct OCPP16Data
  4240. {
  4241. unsigned char OcppServerURL[512]; //http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
  4242. unsigned char ChargeBoxId[128];
  4243. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  4244. unsigned int Timeout_Secs;
  4245. unsigned short Ping_Pong_Interval;
  4246. unsigned int procDogTime; // Process watch dog refresh timer
  4247. union
  4248. {
  4249. //Operations Initiated by Charge Point
  4250. unsigned char CpMsgValue[CONNECTOR_QUANTITY];
  4251. struct
  4252. {
  4253. //CpMsgValue[0]
  4254. unsigned char DataTransferReq:1; //bit 0,
  4255. unsigned char DataTransferConf:1; //bit 1,
  4256. unsigned char StartTransactionReq:1; //bit 2,
  4257. unsigned char StartTransactionConf:1; //bit 3,
  4258. unsigned char StopTransactionReq:1; //bit 4,
  4259. unsigned char StopTransactionConf:1; //bit 5,
  4260. unsigned char :2; //bit 6,7 , reserved
  4261. } bits[CONNECTOR_QUANTITY];
  4262. }CpMsg;
  4263. union
  4264. {
  4265. //Operations Initiated by Sequence Point
  4266. unsigned char SpMsgValue[2];
  4267. struct
  4268. {
  4269. //SpMsgValue[0]
  4270. unsigned char BootNotificationReq :1; //bit 0,
  4271. unsigned char BootNotificationConf :1; //bit 1,
  4272. unsigned char AuthorizeReq :1; //bit 2,
  4273. unsigned char AuthorizeConf :1; //bit 3,
  4274. unsigned char DiagnosticsStatusNotificationReq :1; //bit 4,
  4275. unsigned char DiagnosticsStatusNotificationConf :1; //bit 5,
  4276. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  4277. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  4278. //SpMsgValue[1]
  4279. unsigned char LogStatusNotificationReq :1; //bit 0,
  4280. unsigned char LogStatusNotificationConf :1; //bit 1,
  4281. unsigned char SecurityEventNotificationReq :1; //bit 2,
  4282. unsigned char SecurityEventNotificationConf :1; //bit 3,
  4283. unsigned char SignCertificateReq :1; //bit 4,
  4284. unsigned char SignCertificateConf :1; //bit 5,
  4285. unsigned char SignedFirmwareStatusNotificationReq :1; //bit 6,
  4286. unsigned char SignedFirmwareStatusNotificationConf :1; //bit 7,
  4287. } bits;
  4288. } SpMsg;
  4289. union
  4290. {
  4291. //Operations Initiated by Central System
  4292. unsigned char CsMsgValue[3 * (CONNECTOR_QUANTITY)];
  4293. struct
  4294. {
  4295. //CsMsgValue[0]
  4296. unsigned char CancelReservationReq :1; //bit 0,
  4297. unsigned char CancelReservationConf :1; //bit 1,
  4298. unsigned char ChangeAvailabilityReq :1; //bit 2,
  4299. unsigned char ChangeAvailabilityConf :1; //bit 3,
  4300. unsigned char ReserveNowReq :1; //bit 4,
  4301. unsigned char ReserveNowConf :1; //bit 5,
  4302. unsigned char SetChargingProfileReq :1; //bit 6,
  4303. unsigned char SetChargingProfileConf :1; //bit 7,
  4304. //CsMsgValue[1]
  4305. unsigned char TriggerMessageReq :1; //bit 0,
  4306. unsigned char TriggerMessageConf :1; //bit 1,
  4307. unsigned char UnlockConnectorReq :1; //bit 2,
  4308. unsigned char UnlockConnectorConf :1; //bit 3,
  4309. unsigned char RemoteStartTransactionReq :1; //bit 4,
  4310. unsigned char RemoteStartTransactionConf :1;//bit 5,
  4311. unsigned char RemoteStopTransactionReq :1; //bit 6,
  4312. unsigned char RemoteStopTransactionConf :1; //bit 7,
  4313. //CsMsgValue[2]
  4314. unsigned char ClearChargingProfileReq :1; //bit 0,
  4315. unsigned char ClearChargingProfileConf :1; //bit 1,
  4316. unsigned char DataTransferReq :1; //bit 2,
  4317. unsigned char DataTransferConf :1; //bit 3,
  4318. unsigned char GetCompositeScheduleReq :1; //bit 4,
  4319. unsigned char GetCompositeScheduleConf :1; //bit 5,
  4320. unsigned char :2; //bit 6,7
  4321. } bits[CONNECTOR_QUANTITY];
  4322. }CsMsg;
  4323. union
  4324. {
  4325. //Operations Initiated by Main System
  4326. unsigned char MsMsgValue[4];
  4327. struct
  4328. {
  4329. //CsMsgValue[0]
  4330. unsigned char ChangeConfigurationReq :1; //bit 0,
  4331. unsigned char ChangeConfigurationConf :1; //bit 1,
  4332. unsigned char ClearCacheReq :1; //bit 2,
  4333. unsigned char ClearCacheConf :1; //bit 3,
  4334. unsigned char GetConfigurationReq :1; //bit 4,
  4335. unsigned char GetConfigurationConf :1; //bit 5,
  4336. unsigned char UpdateFirmwareReq :1; //bit 6,
  4337. unsigned char UpdateFirmwareConf :1; //bit 7,
  4338. //CsMsgValue[1]
  4339. unsigned char GetDiagnosticsReq :1; //bit 0,
  4340. unsigned char GetDiagnosticsConf :1; //bit 1,
  4341. unsigned char GetLocalListVersionReq :1; //bit 2,
  4342. unsigned char GetLocalListVersionConf :1; //bit 3,
  4343. unsigned char ResetReq :1; //bit 4,
  4344. unsigned char ResetConf :1; //bit 5,
  4345. unsigned char SendLocalListReq :1; //bit 6,
  4346. unsigned char SendLocalListConf :1; //bit 7,
  4347. //CsMsgValue[2]
  4348. unsigned char CertificateSignedReq :1; //bit 0
  4349. unsigned char CertificateSignedConf :1; //bit 1
  4350. unsigned char DeleteCertificateReq :1; //bit 2
  4351. unsigned char DeleteCertificateConf :1; //bit 3
  4352. unsigned char ExtendedTriggerMessageReq :1; //bit 4
  4353. unsigned char ExtendedTriggerMessageConf :1; //bit 5
  4354. unsigned char GetInstalledCertificateIdsReq :1; //bit 6
  4355. unsigned char GetInstalledCertificateIdsConf :1; //bit 7
  4356. //CsMsgValue[3]
  4357. unsigned char GetLogReq :1; //bit 0
  4358. unsigned char GetLogConf :1; //bit 1
  4359. unsigned char InstallCertificateReq :1; //bit 2
  4360. unsigned char InstallCertificateConf :1; //bit 3
  4361. unsigned char SignedUpdateFirmwareReq :1; //bit 4
  4362. unsigned char SignedUpdateFirmwareConf :1; //bit 5
  4363. unsigned char :2; //bit 6 & 7
  4364. } bits;
  4365. } MsMsg;
  4366. union
  4367. {
  4368. //Operations triggered by CSU
  4369. unsigned char CSUMsgValue[CONNECTOR_QUANTITY];
  4370. struct
  4371. {
  4372. //CSUMsgValue[0]
  4373. unsigned char ChargingProfileReq:1; //bit 0,
  4374. unsigned char ChargingProfileConf:1; //bit 0,
  4375. unsigned char :6; //bit 1,2,3,4,5,6,7 , reserved
  4376. } bits[CONNECTOR_QUANTITY];
  4377. }CSUMsg;
  4378. struct StructBootNotification BootNotification;
  4379. struct StructHeartbeat Heartbeat;
  4380. struct StructAuthorize Authorize;
  4381. struct StructStartTransaction StartTransaction[CONNECTOR_QUANTITY];
  4382. struct StructStopTransaction StopTransaction[CONNECTOR_QUANTITY];
  4383. struct StructStatusNotification StatusNotification[CONNECTOR_QUANTITY];
  4384. struct StructCancelReservation CancelReservation[CONNECTOR_QUANTITY];
  4385. struct StructChangeAvailability ChangeAvailability[CONNECTOR_QUANTITY];
  4386. struct StructChangeConfiguration ChangeConfiguration;
  4387. struct StructClearCache ClearCache;
  4388. struct StructClearChargingProfile ClearChargingProfile[CONNECTOR_QUANTITY];
  4389. struct StructDataTransfer DataTransfer[CONNECTOR_QUANTITY];
  4390. struct StructDiagnosticsStatusNotification DiagnosticsStatusNotification;
  4391. struct StructFirmwareStatusNotification FirmwareStatusNotification;
  4392. struct StructGetCompositeSchedule GetCompositeSchedule[CONNECTOR_QUANTITY];
  4393. struct StructGetConfiguration GetConfiguration;
  4394. struct StructGetDiagnostics GetDiagnostics;
  4395. struct StructGetLocalListVersion GetLocalListVersion;
  4396. struct StructMeterValues MeterValues[CONNECTOR_QUANTITY];
  4397. struct StructRemoteStartTransaction RemoteStartTransaction[CONNECTOR_QUANTITY];
  4398. struct StructRemoteStopTransaction RemoteStopTransaction[CONNECTOR_QUANTITY];
  4399. struct StructReserveNow ReserveNow[CONNECTOR_QUANTITY];
  4400. struct StructReset Reset;
  4401. struct StructSendLocalList SendLocalList;
  4402. struct StructSetChargingProfile SetChargingProfile[CONNECTOR_QUANTITY];
  4403. struct StructTriggerMessage TriggerMessage[CONNECTOR_QUANTITY];
  4404. struct StructUnlockConnector UnlockConnector[CONNECTOR_QUANTITY];
  4405. struct StructUpdateFirmware UpdateFirmware;
  4406. struct OCPP16ConfigurationTable ConfigurationTable;
  4407. struct StructChargingProfile SmartChargingProfile[CONNECTOR_QUANTITY];
  4408. struct StructCost Cost;
  4409. struct StructCertificateSigned CertificateSigned;
  4410. struct StructDeleteCertificate DeleteCertificate;
  4411. struct StructExtendedTrigger ExtendedTriggerMessage;
  4412. struct StructGetInstalledCertificateIds GetInstalledCertificateIds;
  4413. struct StructGetLog GetLog;
  4414. struct StructInstallCertificate InstallCertificate;
  4415. struct StructSignedUpdateFirmware SignedUpdateFirmware;
  4416. struct StructLogStatusNotification LogStatusNotification;
  4417. struct StructSecurityEventNotification SecurityEventNotification;
  4418. struct StructSignCertificate SignCertificate;
  4419. struct StructSignedFirmwareStatusNotification SignedFirmwareStatusNotification;
  4420. };
  4421. /**************************************************************************************/
  4422. /************************* OCPP 2.0 Share memory **************************************/
  4423. /**************************************************************************************/
  4424. /*
  4425. * =============== Enum variable content ===============
  4426. */
  4427. enum OCPP20CtrlrVariable
  4428. {
  4429. AlignedDataCtrlr_Enabled=0,
  4430. AlignedDataCtrlr_Available,
  4431. AlignedDataCtrlr_Measurands,
  4432. AlignedDataCtrlr_Interval,
  4433. AlignedDataCtrlr_SendDuringIdle,
  4434. AlignedDataCtrlr_SignReadings,
  4435. AlignedDataCtrlr_TxEndedMeasurands,
  4436. AlignedDataCtrlr_TxEndedInterval,
  4437. AuthCtrlr_Enabled,
  4438. AuthCtrlr_AdditionalInfoItemsPerMessage,
  4439. AuthCtrlr_OfflineTxForUnknownIdEnabled,
  4440. AuthCtrlr_AuthorizeRemoteStart,
  4441. AuthCtrlr_LocalAuthorizeOffline,
  4442. AuthCtrlr_LocalPreAuthorize,
  4443. AuthCtrlr_MasterPassGroupId,
  4444. AuthCacheCtrlr_Enabled,
  4445. AuthCacheCtrlr_Available,
  4446. AuthCacheCtrlr_LifeTime,
  4447. AuthCacheCtrlr_Storage,
  4448. AuthCacheCtrlr_Policy,
  4449. ClockCtrlr_DateTime,
  4450. ClockCtrlr_NtpSource,
  4451. ClockCtrlr_NtpServerUri,
  4452. ClockCtrlr_TimeOffset,
  4453. ClockCtrlr_NextTimeOffsetTransitionDateTime,
  4454. ClockCtrlr_NextTransition_TimeOffset,
  4455. ClockCtrlr_TimeSource,
  4456. ClockCtrlr_TimeZone,
  4457. ChargingStation_Available,
  4458. ChargingStation_AvailabilityState,
  4459. ChargingStation_SupplyPhases,
  4460. Connector_Available,
  4461. Connector_ConnectorType,
  4462. Connector_SupplyPhases,
  4463. CustomizationCtrlr_CustomImplementationEnabled,
  4464. DeviceDataCtrlr_GetReport_ItemsPerMessage,
  4465. DeviceDataCtrlr_GetVariables_ItemsPerMessage,
  4466. DeviceDataCtrlr_GetReport_BytesPerMessage,
  4467. DeviceDataCtrlr_GetVariables_BytesPerMessage,
  4468. DeviceDataCtrlr_ConfigurationValueSize,
  4469. DeviceDataCtrlr_ReportingValueSize,
  4470. DeviceDataCtrlr_SetVariables_ItemsPerMessage,
  4471. DeviceDataCtrlr_SetVariables_BytesPerMessage,
  4472. DisplayMessageCtrlr_Enabled,
  4473. DisplayMessageCtrlr_Available,
  4474. DisplayMessageCtrlr_DisplayMessages,
  4475. DisplayMessageCtrlr_SupportedFormats,
  4476. DisplayMessageCtrlr_SupportedPriorities,
  4477. EVSE_Available,
  4478. EVSE_AvailabilityState,
  4479. EVSE_SupplyPhases,
  4480. EVSE_Power,
  4481. LocalAuthListCtrlr_Enabled,
  4482. LocalAuthListCtrlr_Entries,
  4483. LocalAuthListCtrlr_Available,
  4484. LocalAuthListCtrlr_ItemsPerMessage,
  4485. LocalAuthListCtrlr_BytesPerMessage,
  4486. LocalAuthListCtrlr_Storage,
  4487. MonitoringCtrlr_Enabled,
  4488. MonitoringCtrlr_Available,
  4489. MonitoringCtrlr_ClearVariableMonitoring_ItemsPerMessage,
  4490. MonitoringCtrlr_SetVariableMonitoring_ItemsPerMessage,
  4491. MonitoringCtrlr_ClearVariableMonitoring_BytesPerMessage,
  4492. MonitoringCtrlr_SetVariableMonitoring_BytesPerMessage,
  4493. MonitoringCtrlr_OfflineQueuingSeverity,
  4494. OCPPCommCtrlr_ActiveNetworkProfile,
  4495. OCPPCommCtrlr_MessageTimeout,
  4496. OCPPCommCtrlr_FileTransferProtocols,
  4497. OCPPCommCtrlr_HeartbeatInterval,
  4498. OCPPCommCtrlr_NetworkConfigurationPriority,
  4499. OCPPCommCtrlr_NetworkProfileConnectionAttempts,
  4500. OCPPCommCtrlr_OfflineThreshold,
  4501. OCPPCommCtrlr_QueueAllMessages,
  4502. OCPPCommCtrlr_MessageAttempts,
  4503. OCPPCommCtrlr_MessageAttemptInterval,
  4504. OCPPCommCtrlr_UnlockOnEVSideDisconnect,
  4505. OCPPCommCtrlr_WebSocketPingInterval,
  4506. OCPPCommCtrlr_ResetRetries,
  4507. OCPPCommCtrlr_PublicKeyWithSignedMeterValue,
  4508. ReservationCtrlr_Enabled,
  4509. ReservationCtrlr_Available,
  4510. ReservationCtrlr_NonEvseSpecific,
  4511. SampledDataCtrlr_Enabled,
  4512. SampledDataCtrlr_Available,
  4513. SampledDataCtrlr_SignReadings,
  4514. SampledDataCtrlr_TxEndedMeasurands,
  4515. SampledDataCtrlr_TxEndedInterval,
  4516. SampledDataCtrlr_TxStartedMeasurands,
  4517. SampledDataCtrlr_TxUpdatedMeasurands,
  4518. SampledDataCtrlr_TxUpdatedInterval,
  4519. SecurityCtrlr_BasicAuthPassword,
  4520. SecurityCtrlr_Identity,
  4521. SecurityCtrlr_OrganizationName,
  4522. SecurityCtrlr_CertificateEntries,
  4523. SecurityCtrlr_SecurityProfile,
  4524. SecurityCtrlr_AdditionalRootCertificateCheck,
  4525. SecurityCtrlr_MaxCertificateChainSize,
  4526. SmartChargingCtrlr_Enabled,
  4527. SmartChargingCtrlr_Available,
  4528. SmartChargingCtrlr_ACPhaseSwitchingSupported,
  4529. SmartChargingCtrlr_ProfileStackLevel,
  4530. SmartChargingCtrlr_RateUnit,
  4531. SmartChargingCtrlr_PeriodsPerSchedule,
  4532. SmartChargingCtrlr_ExternalControlSignalsEnabled,
  4533. SmartChargingCtrlr_NotifyChargingLimitWithSchedules,
  4534. SmartChargingCtrlr_Phases3to1,
  4535. SmartChargingCtrlr_Entries,
  4536. SmartChargingCtrlr_LimitChangeSignificance,
  4537. Tariff_Enabled,
  4538. Tariff_Available,
  4539. Tariff_TariffFallbackMessage,
  4540. Cost_Enabled,
  4541. Cost_Available,
  4542. Cost_TotalCostFallbackMessage,
  4543. Cost_Currency,
  4544. TxCtrlr_ChargingBeforeAcceptedEnabled,
  4545. TxCtrlr_EVConnectionTimeOut,
  4546. TxCtrlr_StopTxOnEVSideDisconnect,
  4547. TxCtrlr_TxBeforeAcceptedEnabled,
  4548. TxCtrlr_TxStartPoint,
  4549. TxCtrlr_TxStopPoint,
  4550. TxCtrlr_MaxEnergyOnInvalidId,
  4551. TxCtrlr_StopTxOnInvalidId,
  4552. CtrlrVariable_CNT
  4553. };
  4554. /*
  4555. * =============== Common class ===============
  4556. */
  4557. struct ACChargingParametersType
  4558. {
  4559. int energyAmount; // Required, Amount of energy requested (in Wh). This includes energy required for preconditioning.
  4560. int evMinCurrent; // Required. Minimum current (amps) supported by the electric vehicle (per phase).
  4561. int evMaxCurrent; // Required. Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity.
  4562. int evMaxVoltage; // Required. Maximum voltage supported by the electric vehicle
  4563. };
  4564. struct DCChargingParametersType
  4565. {
  4566. int evMaxCurrent; // Required. Maximum current (amps) supported by the electric vehicle. Includes cable capacity.
  4567. int evMaxVoltage; // Required. Maximum voltage supported by the electric vehicle
  4568. int energyAmount; // Optional. Amount of energy requested (in Wh). This inludes energy required for preconditioning.
  4569. int evMaxPower; // Optional. Maximum power (in W) supported by the electric vehicle. Required for DC charging.
  4570. unsigned char stateOfCharge; // Optional. Energy available in the battery (in percent of the battery capacity)
  4571. int evEnergyCapacity; // Optional. Capacity of the electric vehicle battery (in Wh)
  4572. unsigned char fullSoC; // Optional. Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100)
  4573. unsigned char bulkSoC; // Optional. Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100)
  4574. };
  4575. struct AdditionalInfoType
  4576. {
  4577. unsigned char additionalIdToken[37]; // Required. This field specifies the additional IdToken.
  4578. unsigned char type[50]; // Required. This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.
  4579. };
  4580. struct APNType
  4581. {
  4582. unsigned char apn[512]; // Required. The Access Point Name as an URL.
  4583. unsigned char apnUserName[20]; // Optional. APN user name.
  4584. unsigned char apnPassword[20]; // Optional. APN Password.
  4585. short int simPin; // Optional. SIM card pin code.
  4586. unsigned char preferredNetwork[6]; // Optional. Preferred network, written as MCC and MNC concatenated. See note.
  4587. unsigned char useOnlyPreferredNetwork; // Optional. Default: false. Use only the preferred Network, do not dial in when not available. See Note.
  4588. short int apnAuthentication[8]; // Required. Authentication method.
  4589. };
  4590. struct VPNType
  4591. {
  4592. unsigned char server[512]; // Required. VPN Server Address
  4593. unsigned char user[20]; // Required. VPN User
  4594. unsigned char group[20]; // Optional. VPN group.
  4595. unsigned char password[20]; // Required. VPN Password.
  4596. unsigned char key[255]; // Required. VPN shared secret.
  4597. unsigned char type[8]; // Required. Type of VPN
  4598. };
  4599. struct GroupIdTokenType
  4600. {
  4601. unsigned char idToken[37]; // Required. IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
  4602. unsigned char type[16]; // Required. Enumeration of possible idToken types.
  4603. };
  4604. struct MessageContentType
  4605. {
  4606. unsigned char format[8]; // Required. Format of the message.
  4607. unsigned char language[8]; // Optional. Message language identifier. Contains a language code as defined in [RFC5646].
  4608. unsigned char content[512]; // Required. Message contents.
  4609. };
  4610. struct IdTokenInfoType
  4611. {
  4612. unsigned char status[32]; // Required. Current status of the ID Token.
  4613. unsigned char cacheExpiryDateTime[28]; // Optional. Date and Time after which the token must be considered invalid.
  4614. short int chargingPriority; // Optional. Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority.
  4615. unsigned char language1[8]; // Optional. Preferred user interface language of identifier user. Contains a language code as defined in [RFC5646].
  4616. unsigned int evseId[100]; // Optional. Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
  4617. unsigned char language2[8]; // Optional. Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1.
  4618. struct GroupIdTokenType groupIdToken; // Optional. This contains the group identifier.
  4619. struct MessageContentType personalMessage; // Optional. Personal message that can be shown to the EV Driver and can be used for tariff information, user greetings etc.
  4620. };
  4621. struct IdTokenType
  4622. {
  4623. unsigned char idToken[37]; // Required. IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
  4624. unsigned char type[16]; // Required. Enumeration of possible idToken types.
  4625. struct AdditionalInfoType additionalInfo[10]; // Optional. AdditionalInfo can be used to send extra information which can be validated by the CSMS in addition to the regular authorization with IdToken.
  4626. };
  4627. struct AuthorizationData
  4628. {
  4629. struct IdTokenInfoType idTokenInfo; // Optional. Required when UpdateType is Full. This contains information about authorization status, expiry and group id.
  4630. struct IdTokenType idToken; // Required. This contains the identifier which needs to be stored for authorization.
  4631. };
  4632. struct CertificateHashDataChainType
  4633. {
  4634. unsigned char certificateType[32]; // Required. Indicates the type of the requested certificate(s).
  4635. struct CertificateHashDataType certificateHashData; // Required. Information to identify a certificate.
  4636. struct CertificateHashDataType childCertificateHashData[4]; // Optional. Information to identify the child certificate(s).
  4637. };
  4638. struct ChargingLimitType
  4639. {
  4640. unsigned char chargingLimitSource[8]; // Required. Represents the source of the charging limit.
  4641. unsigned char isGridCritical; // Optional. Indicates whether the charging limit is critical for the grid.
  4642. };
  4643. struct ChargingNeedsType
  4644. {
  4645. unsigned char requestedEnergyTransfer[32]; // Required. Mode of energy transfer requested by the EV.
  4646. unsigned char departureTime[28]; // Optional. Estimated departure time of the EV.
  4647. struct ACChargingParametersType acChargingParameters; // Optional. EV AC charging parameters.
  4648. struct DCChargingParametersType dcChargingParameters; // Optional. EV DC charging parameters
  4649. };
  4650. struct ChargingProfileCriterionType
  4651. {
  4652. unsigned char chargingProfilePurpose[36]; // Optional. Defines the purpose of the schedule transferred by this profile
  4653. unsigned short int stackLevel; // Optional. Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
  4654. unsigned short int chargingProfileId[10]; // Optional. List of all the chargingProfileIds requested. Any ChargingProfile that matches one of these profiles will be reported.
  4655. unsigned char chargingLimitSource[4][8]; // Optional. For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource.
  4656. };
  4657. struct RelativeTimeIntervalTypeOCPP
  4658. {
  4659. unsigned int start; // Required. Start of the interval, in seconds from NOW.
  4660. unsigned int duration; // Optional. Duration of the interval, in seconds.
  4661. };
  4662. struct CostTypeOCPP
  4663. {
  4664. unsigned char costKind[36]; // Required. The kind of cost referred to in the message element amount
  4665. int amount; // Required. The estimated or actual cost per kWh
  4666. };
  4667. struct ConsumptionCostTypeOCPP
  4668. {
  4669. float startValue; // Required. The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval.
  4670. struct CostTypeOCPP cost[3]; // Required. This field contains the cost details.
  4671. };
  4672. struct SalesTariffEntryTypeOCPP
  4673. {
  4674. unsigned short int ePriceLevel; // Optional. Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry.
  4675. struct RelativeTimeIntervalTypeOCPP relativeTimeInterval; // Required. Defines the time interval the SalesTariffEntry is valid for, based upon relative times.
  4676. struct ConsumptionCostTypeOCPP consumptionCost[3]; // Optional. Defines additional means for further relative price information and/or alternative costs.
  4677. };
  4678. struct SalesTariffTypeOCPP
  4679. {
  4680. unsigned short int id; // Required. SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
  4681. unsigned char salesTariffDescription[32]; // Optional. A human readable title/short description of the sales tariff e.g. for HMI display purposes.
  4682. unsigned short int numEPriceLevels; // Optional. Defines the overall number of distinct price levels used across all provided SalesTariff elements.
  4683. struct SalesTariffEntryTypeOCPP salesTariffEntry[1024]; // Required. Encapsulating element describing all relevant details for one time interval of the SalesTariff. The number of SalesTariffEntry elements is limited by the parameter maxScheduleTuples.
  4684. };
  4685. struct ChargingSchedulePeriodType
  4686. {
  4687. int startPeriod; // Required. Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
  4688. float limit; // Required. Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1).
  4689. unsigned char numberPhases; // Optional. The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given.
  4690. unsigned char phaseToUse; // Optional. Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to theEV, i.e. ACPhaseSwitchingSupported is defined and true.
  4691. };
  4692. struct ChargingScheduleType
  4693. {
  4694. unsigned char startSchedule[28]; // Optional. Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
  4695. unsigned int duration; // Optional. Duration of the charging schedule in seconds.
  4696. unsigned char chargingRateUnit[8]; // Required. The unit of measure Limit is expressed in.
  4697. float minChargingRate; // Optional. Minimum charging rate supported by the EV.
  4698. unsigned short int id; // Required. Identifies the ChargingSchedule.
  4699. struct ChargingSchedulePeriodType chargingSchedulePeriod[1024]; // Required. List of ChargingSchedulePeriod elements defining maximum power or current usage over time.
  4700. struct SalesTariffTypeOCPP salesTariff; // Optional. Sales tariff associated with this charging schedule.
  4701. };
  4702. struct ChargingProfileType
  4703. {
  4704. unsigned short int id; // Required. Id of ChargingProfile.
  4705. unsigned short int stackLevel; // Required. Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
  4706. unsigned char chargingProfilePurpose[36]; // Required. Defines the purpose of the schedule transferred by this profile
  4707. unsigned char chargingProfileKind[16]; // Required. Indicates the kind of schedule.
  4708. unsigned char recurrencyKind[8]; // Optional. Indicates the start point of a recurrence.
  4709. unsigned char validFrom[28]; // Optional. Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station.
  4710. unsigned char validTo[28]; // Optional. Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
  4711. unsigned char transactionId[37]; // Optional. SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction.
  4712. struct ChargingScheduleType chargingSchedule[3]; // Required. Schedule that contains limits for the available power or current over time. In order to support ISO 15118 schedule negotiation, it supports at most three schedules with associated tariff to choose from.
  4713. };
  4714. struct ModemType
  4715. {
  4716. unsigned char iccid[20]; // Optional. This contains the ICCID of the modem’s SIM card.
  4717. unsigned char imsi[20]; // Optional. This contains the IMSI of the modem’s SIM card.
  4718. };
  4719. struct ChargingStationType
  4720. {
  4721. unsigned char serialNumber[25]; // Optional. Vendor-specific device identifier.
  4722. unsigned char model[20]; // Required. Defines the model of the device.
  4723. unsigned char vendorName[50]; // Required. Identifies the vendor (not necessarily in a unique manner).
  4724. unsigned char firmwareVersion[50]; // Optional. This contains the firmware version of the Charging Station.
  4725. struct ModemType modem; // Optional. Defines the functional parameters of a communication link.
  4726. };
  4727. struct ClearChargingProfileType
  4728. {
  4729. unsigned int evseId; // Optional. Specifies the id of the EVSE for which to clear charging profiles.
  4730. unsigned char chargingProfilePurpose[36]; // Optional. Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
  4731. unsigned short int stackLevel; // Optional. Specifies the stackLevel for which charging profiles will be cleared, if they meet the other criteria in the request.
  4732. };
  4733. struct ClearMonitoringResultType
  4734. {
  4735. unsigned short int id; // Required. Id of the monitor of which a clear was requested.
  4736. unsigned char status[16]; // Required. Result of the clear request for this monitor, identified by its Id.
  4737. };
  4738. struct EVSEType
  4739. {
  4740. unsigned int id; // Required. EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station.
  4741. unsigned char connectorId; // Optional. An id to designate a specific connector (on an EVSE) by connector index number.
  4742. };
  4743. struct VariableType
  4744. {
  4745. unsigned char name[50]; // Required. Name of the variable.
  4746. unsigned char instance[50]; // Optional. Name of instance in case the variable exists as multiple instances.
  4747. };
  4748. struct VariableAttributeType
  4749. {
  4750. unsigned char type[8]; // Optional. Attribute: Actual, MinSet, MaxSet, etc. Defaults to Actual if absent.
  4751. unsigned char value[2500]; // Optional. Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
  4752. unsigned char mutability[16]; // Optional. Defines the mutability of this attribute. Default is ReadWrite when omitted.
  4753. unsigned char persistent; // Optional. If true, value will be persistent across system reboots or power down. Default when omitted is false.
  4754. unsigned char constant; // Optional. If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
  4755. };
  4756. struct VariableCharacteristicsType
  4757. {
  4758. unsigned char unit[16]; // Optional. Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
  4759. unsigned char dataType[16]; // Required. Data type of this variable.
  4760. float minLimit; // Optional. Minimum possible value of this variable.
  4761. float maxLimit; // Optional. Maximum possible value of this variable.
  4762. unsigned char valuesList[1000]; // Optional. Allowed values when variable is Option/Member/SequenceList.
  4763. unsigned char supportsMonitoring; // Required. Flag indicating if this variable supports monitoring.
  4764. };
  4765. struct ComponentType
  4766. {
  4767. unsigned char name[50]; // Required. Name of the component.
  4768. unsigned char instance[50]; // Optional. Name of instance in case the component exist as multiple instances.
  4769. struct EVSEType evse; // Optional. Specifies the EVSE when component is located at EVSE level, also specifies the connector when component is located at Connector level.
  4770. };
  4771. struct ComponentVariableType
  4772. {
  4773. struct ComponentType component; // Required. Component for which a report of Variable is requested.
  4774. struct VariableType variable; // Optional. Variable(s) for which the report is requested.
  4775. };
  4776. struct CompositeScheduleType
  4777. {
  4778. unsigned char startDateTime[28]; // Required. Date and time at which the schedule becomes active.
  4779. struct ChargingScheduleType chargingSchedule; // Required. Charging schedule structure defines a list of charging periods.
  4780. };
  4781. struct EventDataType
  4782. {
  4783. unsigned int eventId; // Required. Identifies the event. This field can be referred to as a cause by other events.
  4784. unsigned char timestamp[28]; // Required. Timestamp of the moment the report was generated.
  4785. unsigned char trigger[16]; // Required. Type of monitor that triggered this event, e.g. exceeding a threshold value.
  4786. unsigned int cause; // Optional. Refers to the Id of an event that is considered to be the cause for this event.
  4787. unsigned char actualValue[2500]; // Required. Actual value (attributeType Actual) of the variable.
  4788. unsigned char techcode[50]; // Optional. Technical (error) code as reported by component.
  4789. unsigned char techInfo[500]; // Optional. Technical detail information as reported by component.
  4790. unsigned char cleared; // Optional. Cleared is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
  4791. unsigned char transactionId[37]; // Optional. If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
  4792. unsigned int variableMonitoringId; // Optional. Identifies the VariableMonitoring which triggered the event.
  4793. unsigned char eventNotificationType[32]; // Required. Specifies the event notification type of the message.
  4794. struct ComponentType component; // Required. Component for which event is notified.
  4795. struct VariableType variable; // Required. Variable for which event is notified.
  4796. };
  4797. struct GetVariableDataType
  4798. {
  4799. unsigned char attributeType[8]; // Optional. Attribute type for which value is requested. When absent, default Actual is assumed.
  4800. struct ComponentType component; // Required. Component for which the Variable is requested.
  4801. struct VariableType variable; // Required. Variable for which the attribute value is requested.
  4802. };
  4803. struct GetVariableResultType
  4804. {
  4805. unsigned char attributeStatus[32]; // Required. Result status of getting the variable.
  4806. unsigned char attributeType[8]; // Optional. Attribute type for which value is requested. When absent, default Actual is assumed.
  4807. unsigned char attributeValue[2500]; // Optional. Value of requested attribute type of component- variable.
  4808. struct ComponentType component; // Required. Component for which the Variable is requested.
  4809. struct VariableType variable; // Required. Variable for which the attribute value is requested.
  4810. };
  4811. struct MessageInfoType
  4812. {
  4813. unsigned int id; // Required. Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
  4814. unsigned char priority[16]; // Required. With what priority should this message be shown
  4815. unsigned char state[16]; // Optional. During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station.
  4816. unsigned char startDateTime[28]; // Optional. From what date-time should this message be shown. If omitted: directly.
  4817. unsigned char endDateTime[28]; // Optional. Until what date-time should this message be shown, after this date/time this message SHALL be removed.
  4818. unsigned char transactionId[37]; // Optional. During which transaction shall this message be shown. Message SHALL be removed by the Charging Station after transaction has ended.
  4819. struct MessageContentType message; // Required. Contains message details for the message to be displayed on a Charging Station.
  4820. struct ComponentType display; // Optional. When a Charging Station has multiple Displays, this field can be used to define to which Display this message belongs.
  4821. };
  4822. struct SignedMeterValueType
  4823. {
  4824. unsigned char signedMeterData[2500]; // Required. Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
  4825. unsigned char signingMethod[50]; // Required. Method used to create the digital signature.
  4826. unsigned char encodingMethod[50]; // Required. Method used to encode the meter values before applying the digital signature algorithm.
  4827. unsigned char publicKey[2500]; // Required. Base64 encoded, sending depends on configuration variable PublicKeyWithSignedMeterValue.
  4828. };
  4829. struct UnitOfMeasureType
  4830. {
  4831. unsigned char uint[20]; // Optional. Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type.
  4832. unsigned short int multiplier; // Optional. Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0.
  4833. };
  4834. struct SampledValueType
  4835. {
  4836. float value; // Required. Indicates the measured value.
  4837. unsigned char context[32]; // Optional. Type of detail value: start, end or sample. Default = "Sample.Periodic"
  4838. unsigned char measurand[32]; // Optional. Type of measurement. Default = "Energy.Active.Import.Register"
  4839. unsigned char phase[8]; // Optional. Indicates how the measured value is to be interpreted.
  4840. unsigned char location[8]; // Optional. Indicates where the measured value has been sampled. Default = "Outlet"
  4841. struct SignedMeterValueType signedMeterValue; // Optional. Contains the MeterValueSignature with sign/encoding method information.
  4842. struct UnitOfMeasureType unitOfMeasure; // Optional. Represents a UnitOfMeasure including a multiplier
  4843. };
  4844. struct MeterValueType
  4845. {
  4846. unsigned char timestamp[28]; // Required. Timestamp for measured value(s).
  4847. struct SampledValueType sampledValue[10]; // Required. One or more measured values
  4848. };
  4849. struct VariableMonitoringType
  4850. {
  4851. unsigned int id; // Required. Identifies the monitor.
  4852. float value; // Required. Value for threshold or delta monitoring. For Periodic or PeriodicClockAligned this is the interval in seconds.
  4853. unsigned char type[32]; // Required. The type of this monitor, e.g. a threshold, delta or periodic monitor.
  4854. unsigned char severity; // Required. The severity that will be assigned to an event that is triggered by this monitor.
  4855. unsigned char transaction; // Required. Monitor only active when a transaction is ongoing on a component relevant to this transaction.
  4856. };
  4857. struct MonitoringDataType
  4858. {
  4859. struct ComponentType component; // Required. Component for which monitoring report was requested.
  4860. struct VariableType variable; // Required. Variable for which monitoring report was requested.
  4861. struct VariableMonitoringType variableMonitoring[10]; // Required. List of monitors for this Component-Variable pair.
  4862. };
  4863. struct NetworkConnectionProfileType
  4864. {
  4865. unsigned char ocppVersion[8]; // Required. Defines the OCPP version used for this communication function.
  4866. unsigned char ocppTransport[8]; // Required. Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.0, but is supported by other versions of OCPP.
  4867. unsigned char ocppCsmsUrl[512]; // Required. URL of the CSMS(s) that this Charging Station communicates with.
  4868. unsigned int messageTimeout; // Required. Duration in seconds before a message send by the Charging Station via this network connection times- out. The best setting depends on the underlying network and response times of the CSMS. If you are looking for a some guideline: use 30 seconds as a starting point.
  4869. unsigned char ocppInterface[16]; // Required. Applicable Network Interface.
  4870. struct VPNType vpn; // Optional. Settings to be used to set up the VPN connection
  4871. struct APNType apn; // Optional. Collection of configuration data needed to make a data-connection over a cellular network.
  4872. };
  4873. struct OCSPRequestDataType
  4874. {
  4875. unsigned char hashAlgorithm[8]; // Required. Used algorithms for the hashes provided.
  4876. unsigned char issuerNameHash[128]; // Required. hashed value of the IssuerName.
  4877. unsigned char issuerKeyHash[128]; // Required. Hashed value of the issuers public key
  4878. unsigned char serialNumber[40]; // Required. The serial number of the certificate.
  4879. unsigned char responderURL[512]; // Required. This contains the responder URL (Case insensitive).
  4880. };
  4881. struct ReportDataType
  4882. {
  4883. struct ComponentType component; // Required. Component for which a report of Variable is requested.
  4884. struct VariableType variable; // Required. Variable for which report is requested.
  4885. struct VariableAttributeType variableAttribute[4]; // Required. Attribute data of a variable.
  4886. struct VariableCharacteristicsType variableCharacteristics; // Optional. Fixed read-only parameters of a variable.
  4887. };
  4888. struct SetMonitoringDataType
  4889. {
  4890. unsigned int id; // Optional. An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id’s for new monitors.
  4891. float value; // Required. Value for threshold or delta monitoring. For Periodic or PeriodicClockAligned this is the interval in seconds.
  4892. unsigned char type[32]; // Required. The type of this monitor, e.g. a threshold, delta or periodic monitor.
  4893. unsigned char severity; // Required. The severity that will be assigned to an event that is triggered by this monitor.
  4894. unsigned char transaction; // Optional. Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false.
  4895. struct ComponentType component; // Required. Component for which monitor is set.
  4896. struct VariableType variable; // Required. Variable for which monitor is set.
  4897. };
  4898. struct SetMonitoringResultType
  4899. {
  4900. unsigned int id; // Optional. Id given to the VariableMonitor by the Charging Station.
  4901. unsigned char type[32]; // Required. The type of this monitor, e.g. a threshold, delta or periodic monitor.
  4902. unsigned char severity; // Required. The severity that will be assigned to an event that is triggered by this monitor.
  4903. unsigned char status[32]; // Required. Status is OK if a value could be returned.
  4904. struct ComponentType component; // Required. Component for which status is returned.
  4905. struct VariableType variable; // Required. Variable for which status is returned.
  4906. };
  4907. struct SetVariableDataType
  4908. {
  4909. unsigned char attributeType[8]; // Optional. Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.
  4910. unsigned char attributeValue[1000]; // Required. Value to be assigned to attribute of variable.
  4911. struct ComponentType component; // Required. The component for which the variable data is set.
  4912. struct VariableType variable; // Required. Specifies the that needs to be set.
  4913. };
  4914. struct SetVariableResultType
  4915. {
  4916. unsigned char attributeType[8]; // Optional. Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.
  4917. unsigned char attributeStatus[32]; // Required. Result status of setting the variable.
  4918. struct ComponentType component; // Required. The component for which result is returned.
  4919. struct VariableType variable; // Required. The variable for which the result is returned.
  4920. };
  4921. struct TransactionType
  4922. {
  4923. unsigned char transactionId[37]; // Required. This contains the Id of the transaction.
  4924. unsigned char chargingState[16]; // Optional. Current charging state, is required when state has changed. Omitted when there is no communication between EVSE and EV, because no cable is plugged in.
  4925. unsigned int timeSpentCharging; // Optional. Contains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction.
  4926. unsigned char stoppedReason[20]; // Optional. This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
  4927. unsigned int remoteStartId; // Optional. The ID given to remote start request (RequestStartTransactionRequest.
  4928. };
  4929. struct StatusInfoType
  4930. {
  4931. unsigned char reasonCode[21]; // Required. A predefined code for the reason why thestatus is returned in this response. The string is case-insensitive.
  4932. unsigned char additionalInfo[513]; // Optional. Additional text to provide detailed information.
  4933. };
  4934. /*
  4935. * =============== Message ===============
  4936. */
  4937. struct Authorize_20
  4938. {
  4939. struct IdTokenType idToken; // Required. This contains the identifier that needs to be authorized.
  4940. struct OCSPRequestDataType iso15118CertificateHashData[4]; // Optional. Contains the information needed to verify the EV Contract Certificate via OCSP.
  4941. unsigned char Response_certificateStatus[32]; // Optional. Certificate status information. - if all certificates are valid: return 'Accepted'. - if one of the certificates was revoked, return 'CertificateRevoked'.
  4942. struct IdTokenInfoType Response_idTokenInfo; // Required. This contains information about authorization status, expiry and group id.
  4943. };
  4944. struct BootNotification_20
  4945. {
  4946. unsigned char reason[20]; // Required. This contains the reason for sending this message to the CSMS.
  4947. struct ChargingStationType chargingStation; // Required. Identifies the Charging Station
  4948. unsigned char Response_currentTime[28]; // Required. This contains the CSMS’s current time.
  4949. unsigned int Response_interval; // Required. When Status is Accepted, this contains the heartbeat interval in seconds. If the CSMS returns something other than Accepted, the value of the interval field indicates the minimum wait time before sending a next BootNotification request.
  4950. unsigned char Response_status[16]; // Required. This contains whether the Charging Station has been registered within the CSMS.
  4951. };
  4952. struct CancelReservation_20
  4953. {
  4954. int reservationId; // Required. Id of the reservation to cancel.
  4955. unsigned char Response_status[16]; // Required. This indicates the success or failure of the canceling of a reservation by CSMS.
  4956. unsigned char guid[37]; // Save guid from server request
  4957. };
  4958. struct CertificateSigned_20
  4959. {
  4960. unsigned char certificateChain[10001]; // Required. Required. The signed PEM encoded X.509 certificate.This can also contain the necessary sub CA certificates.In that case, the order of the bundle should follow thecertificate chain, starting from the leaf certificate.The Configuration Variable MaxCertificateChainSize canbe used to limit the maximum size of this field.
  4961. unsigned char certificateType[32]; // Optional. Indicates the type of the signed certificate that is returned.
  4962. unsigned char Response_status[16]; // Required. Returns whether certificate signing has been accepted, otherwise rejected.
  4963. struct StatusInfoType Response_statusInfo; // Optional. Detailed status information.
  4964. unsigned char guid[37]; // Save guid from server request
  4965. };
  4966. struct ChangeAvailability_20
  4967. {
  4968. unsigned char operationalStatus[16]; // Required. This contains the type of availability change that the Charging Station should perform.
  4969. struct EVSEType evse; // Optional. Contains Id’s to designate a specific EVSE/connector by index numbers. When omitted, the message refers to the Charging Station as a whole.
  4970. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to perform the availability change.
  4971. unsigned char guid[37]; // Save guid from server request
  4972. };
  4973. struct ClearCache_20
  4974. {
  4975. unsigned char Response_status[16]; // Required. Accepted if the Charging Station has executed the request, otherwise rejected.
  4976. unsigned char guid[37]; // Save guid from server request
  4977. };
  4978. struct ClearChargingProfile_20
  4979. {
  4980. unsigned int chargingProfileId; // Optional. The Id of the charging profile to clear.
  4981. struct ClearChargingProfileType chargingProfileCriteria; // Optional. Specifies the charging profile.
  4982. unsigned char Response_status[16]; // Required. Indicates if the Charging Station was able to execute the request.
  4983. unsigned char guid[37]; // Save guid from server request
  4984. };
  4985. struct ClearDisplayMessage_20
  4986. {
  4987. unsigned int id; // Required. Id of the message that SHALL be removed from the Charging Station.
  4988. unsigned char Response_status[16]; // Required. Returns whether the Charging Station has been able to remove the message.
  4989. unsigned char guid[37]; // Save guid from server request
  4990. };
  4991. struct ClearedChargingLimit_20
  4992. {
  4993. unsigned char chargingLimitSource[8]; // Required. Source of the charging limit.
  4994. unsigned int evseId; // Optional. EVSE Identifier.
  4995. };
  4996. struct ClearVariableMonitoring_20
  4997. {
  4998. unsigned int id[10]; // Required. List of the monitors to be cleared, identified by there Id.
  4999. struct ClearMonitoringResultType Response_clearMonitoringResult[10];// Required. List of result statuses per monitor.
  5000. unsigned char guid[37]; // Save guid from server request
  5001. };
  5002. struct CostUpdated_20
  5003. {
  5004. float totalCost; // Required. Current total cost, based on the information known by the CSMS, of the transaction including taxes. In the currency configured with the configuration Variable: [Currency]
  5005. unsigned char transactionId[37]; // Required. Transaction Id of the transaction the current cost are asked for.
  5006. unsigned char guid[37]; // Save guid from server request
  5007. };
  5008. struct CustomerInformation_20
  5009. {
  5010. unsigned int requestId; // Required. The Id of the request.
  5011. unsigned char report; // Required. Flag indicating whether the Charging Station should return NotifyCustomerInformationRequest messages containing information about the customer referred to.
  5012. unsigned char clear; // Required. Flag indicating whether the Charging Station should clear all information about the customer referred to.
  5013. unsigned char customerIdentifier[64]; // Optional. A (e.g. vendor specific) identifier of the customer this request refers to. This field contains a custom identifier other than IdToken and Certificate. One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message.
  5014. struct IdTokenType idToken; // Optional. The IdToken of the customer this request refers to. One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message.
  5015. struct CertificateHashDataType customerCertificate; // Optional. The Certificate of the customer this request refers to. One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message.
  5016. unsigned char Response_status[16]; // Required. Indicates whether the request was accepted.
  5017. unsigned char guid[37]; // Save guid from server request
  5018. };
  5019. struct DataTransfer_20
  5020. {
  5021. unsigned char messageId[50]; // Optional. May be used to indicate a specific message or implementation.
  5022. unsigned char data[512]; // Optional. Data without specified length or format. This needs to be decided by both parties (Open to implementation).
  5023. unsigned char vendorId[255]; // Required. This identifies the Vendor specific implementation
  5024. unsigned char Response_status[20]; // Required. This indicates the success or failure of the data transfer.
  5025. unsigned char Response_data[512]; // Optional. Data without specified length or format, in response to request.
  5026. unsigned char guid[37]; // Save guid from server request
  5027. };
  5028. struct DeleteCertificate_20
  5029. {
  5030. struct CertificateHashDataType certificateHashData; // Required. Indicates the certificate of which deletion is requested.
  5031. unsigned char Response_status[16]; // Required. Charging Station indicates if it can process the request.
  5032. unsigned char guid[37]; // Save guid from server request
  5033. };
  5034. struct FirmwareStatusNotification_20
  5035. {
  5036. unsigned char status[32]; // Required. This contains the progress status of the firmware installation.
  5037. unsigned int requestId; // Optional. The request id that was provided in the UpdateFirmwareRequest that started this firmware update. This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no firmware update ongoing.
  5038. };
  5039. struct Get15118EVCertificate_20
  5040. {
  5041. unsigned char iso15118SchemaVersion[50]; // Required. Schema version currently used for the 15118 session between EV and Charging Station. Needed for parsing of the EXI stream by the CSMS.
  5042. unsigned char action[16]; // Required. Defines whether certificate needs to be installed or updated.
  5043. unsigned char exiRequest[5600]; // Required. Raw CertificateInstallationReq request from EV, Base64 encoded.
  5044. unsigned char Response_status[16]; // Required. Indicates whether the message was processed properly.
  5045. unsigned char Response_exiResponse[5600]; // Required. Raw CertificateInstallationRes response for the EV, Base64 encoded.
  5046. };
  5047. struct GetBaseReport_20
  5048. {
  5049. unsigned int requestId; // Required. The Id of the request.
  5050. unsigned char reportBase[32]; // Required. This field specifies the report base.
  5051. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to accept this request.
  5052. unsigned char guid[37]; // Save guid from server request
  5053. };
  5054. struct GetCertificateStatus_20
  5055. {
  5056. struct OCSPRequestDataType ocspRequestData; // Required. Indicates the certificate of which the status is requested.
  5057. unsigned char Response_status[16]; // Required. This indicates whether the charging station was able to retrieve the OCSP certificate status.
  5058. unsigned char Response_ocspResult[5501]; // Optional. OCSPResponse class as defined in IETF RFC 6960. DER encoded (as defined in IETF RFC 6960), and then base64 encoded. MAY only be omitted when status is not Accepted.
  5059. };
  5060. struct GetChargingProfiles_20
  5061. {
  5062. unsigned int requestId; // Required. Reference identification that is to be used by the Charging Station in the ReportChargingProfilesRequest when provided.
  5063. unsigned int evseId; // Optional. For which EVSE installed charging profiles SHALL be reported. If 0, only charging profiles installed on the Charging Station itself (the grid connection) SHALL be reported. If omitted, all installed charging profiles SHALL be reported.
  5064. struct ChargingProfileCriterionType chargingProfile; // Required. Specifies the charging profile.
  5065. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to process this request and will send ReportChargingProfilesRequest messages.
  5066. unsigned char guid[37]; // Save guid from server request
  5067. };
  5068. struct GetCompositeSchedule_20
  5069. {
  5070. unsigned int duration; // Required. Length of the requested schedule in seconds.
  5071. unsigned char chargingRateUnit[8]; // Optional. Can be used to force a power or current profile.
  5072. unsigned int evseId; // Required. The ID of the EVSE for which the schedule is requested. When evseid=0, the Charging Station will calculate the expected consumption for the grid connection.
  5073. unsigned char Response_status[16]; // Required. The Charging Station will indicate if it was able to process the request
  5074. struct CompositeScheduleType Response_schedule; // Optional. This field contains the calculated composite schedule. It may only be omitted when this message contains status Rejected.
  5075. unsigned char guid[37]; // Save guid from server request
  5076. };
  5077. struct GetDisplayMessages_20
  5078. {
  5079. unsigned int id[10]; // Optional. If provided the Charging Station shall return Display Messages of the given ids. This field SHALL NOT contain more ids than set in NumberOfDisplayMessages.maxLimit
  5080. unsigned int requestId; // Required. The Id of this request.
  5081. unsigned char priority[16]; // Optional. If provided the Charging Station shall return Display Messages with the given priority only.
  5082. unsigned char state[16]; // Optional. If provided the Charging Station shall return Display Messages with the given state only.
  5083. unsigned char Response_status[16]; // Required. Indicates if the Charging Station has Display Messages that match the request criteria in the GetDisplayMessagesRequest
  5084. unsigned char guid[37]; // Save guid from server request
  5085. };
  5086. struct GetInstalledCertificateIds_20
  5087. {
  5088. unsigned char certificateType[10][32]; // Optional. Indicates the type of certificates requested. When omitted, all certificate types are requested.
  5089. unsigned char Response_status[16]; // Required. Charging Station indicates if it can process the request.
  5090. struct CertificateHashDataChainType Response_certificateHashDataChain[10]; // Optional. The Charging Station includes the Certificate information for each available certificate.
  5091. unsigned char guid[37]; // Save guid from server request
  5092. };
  5093. struct GetLocalListVersion_20
  5094. {
  5095. int Response_versionNumber; // Required. This contains the current version number of the local authorization list in the Charging Station.
  5096. unsigned char guid[37]; // Save guid from server request
  5097. };
  5098. struct GetLog_20
  5099. {
  5100. unsigned char logType[16]; // Required. This contains the type of log file that the Charging Station should send.
  5101. unsigned int requestId; // Required. The Id of this request
  5102. unsigned char retries; // Optional. This specifies how many times the Charging Station must try to upload the log before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
  5103. unsigned int retryInterval; // Optional. The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
  5104. struct LogParametersType log; // Required. This field specifies the requested log and the location to which the log should be sent.
  5105. unsigned char Response_status[20]; // Required. This field indicates whether the Charging Station was able to accept the request.
  5106. unsigned char Response_filename[255]; // Optional. This contains the name of the log file that will be uploaded. This field is not present when no logging information is available.
  5107. unsigned char guid[37]; // Save guid from server request
  5108. };
  5109. struct GetMonitoringReport_20
  5110. {
  5111. unsigned int requestId; // Required. The Id of the request.
  5112. unsigned char monitoringCriteria[3][32]; // Optional. This field contains criteria for components for which a monitoring report is requested
  5113. struct ComponentVariableType componentVariable[10]; // Optional. This field specifies the components and variables for which a monitoring report is requested.
  5114. unsigned char Response_status[20]; // Required. This field indicates whether the Charging Station was able to accept the request.
  5115. unsigned char guid[37]; // Save guid from server request
  5116. };
  5117. struct GetReport_20
  5118. {
  5119. unsigned int requestId; // Required. The Id of the request.
  5120. unsigned char componentCriteria[4][16]; // Optional. This field contains criteria for components for which a report is requested
  5121. struct ComponentVariableType componentVariable[10]; // Optional. This field specifies the components and variables for which a report is requested.
  5122. unsigned char Response_status[20]; // Required. This field indicates whether the Charging Station was able to accept the request.
  5123. unsigned char guid[37]; // Save guid from server request
  5124. };
  5125. struct GetTransactionStatus_20
  5126. {
  5127. unsigned char transactionId[37]; // Optional. The Id of the transaction for which the status is requested.
  5128. unsigned char Response_ongoingIndicator; // Optional. Whether the transaction is still ongoing.
  5129. unsigned char Response_messagesInQueue; // Required. Whether there are still message to be delivered.
  5130. unsigned char guid[37]; // Save guid from server request
  5131. };
  5132. struct GetVariables_20
  5133. {
  5134. struct GetVariableDataType getVariableData[CtrlrVariable_CNT]; // Required. List of requested variables.
  5135. struct GetVariableResultType Response_getVariableResult[CtrlrVariable_CNT]; // Required. List of requested variables and their values.
  5136. unsigned char guid[37]; // Save guid from server request
  5137. };
  5138. struct Heartbeat_20
  5139. {
  5140. unsigned char Response_currentTime[28]; // Required. Contains the current time of the CSMS.
  5141. };
  5142. struct InstallCertificate_20
  5143. {
  5144. unsigned char certificateType[32]; // Required. Indicates the certificate type that is sent.
  5145. unsigned char certificate[5501]; // Required. A X.509 certificate, first DER encoded into binary, and then Base64 encoded.
  5146. unsigned char Response_status[16]; // Required. Charging Station indicates if installation was successful.
  5147. unsigned char guid[37]; // Save guid from server request
  5148. };
  5149. struct LogStatusNotification_20
  5150. {
  5151. unsigned char status[32]; // Required. This contains the status of the log upload.
  5152. unsigned int requestId; // Optional. The request id that was provided in GetLogRequest that started this log upload. This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no log upload ongoing.
  5153. };
  5154. struct MeterValues_20
  5155. {
  5156. unsigned int evseId; // Required. This contains a number (>0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter.
  5157. struct MeterValueType meterValue[1]; // Required. The sampled meter values with timestamps.
  5158. };
  5159. struct NotifyChargingLimit_20
  5160. {
  5161. unsigned int evseId; // Optional. The charging schedule contained in this notification applies to an EVSE. evseId must be > 0.
  5162. struct ChargingLimitType chargingLimit; // Required. This contains the source of the charging limit and whether it is grid critical.
  5163. struct ChargingScheduleType chargingSchedule[1]; // Optional. Contains limits for the available power or current over time, as set by the external source.
  5164. };
  5165. struct NotifyCustomerInformation_20
  5166. {
  5167. unsigned char data[512]; // Required. (Part of) the requested data. No format specified in which the data is returned. Should be human readable.
  5168. unsigned char tbc; // Optional. “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false.
  5169. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  5170. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  5171. unsigned int requestId; // Required. The Id of the request.
  5172. };
  5173. struct NotifyDisplayMessages_20
  5174. {
  5175. unsigned int requestId; // Required. The id of the GetDisplayMessagesRequest that requested this message.
  5176. unsigned char tbc; // Optional. "to be continued" indicator. Indicates whether another part of the report follows in an upcoming NotifyDisplayMessagesRequest message. Default value when omitted is false.
  5177. struct MessageInfoType messageInfo[10]; // Optional. The requested display message as configured in the Charging Station.
  5178. };
  5179. struct NotifyEVChargingNeeds_20
  5180. {
  5181. unsigned int maxScheduleTuples; // Optional. Contains the maximum schedule tuples the car supports per SASchedule (both Pmax and Tariff).
  5182. unsigned int evseId; // Required. Defines the EVSE and connector to which the EV is connected. EvseId may not be 0.
  5183. struct ChargingNeedsType chargingNeeds; // Required. The characteristics of the energy delivery required.
  5184. unsigned char Response_status[16]; // Required. Returns whether the CSMS has been able to process the message successfully. It does not imply that the evChargingNeeds can be met with the current charging profile.
  5185. };
  5186. struct NotifyEVChargingSchedule_20
  5187. {
  5188. unsigned char timeBase[28]; // Required. Periods contained in the charging profile are relative to this point in time.
  5189. unsigned int evseId; // Required. The charging schedule contained in this notification applies to an EVSE. EvseId must be > 0.
  5190. struct ChargingScheduleType chargingSchedule; // Required. Planned energy consumption of the EV over time. Always relative to timeBase.
  5191. unsigned char Response_status[16]; // Required. Returns whether the CSMS has been able to process the message successfully. It does not imply any approval of the charging schedule.
  5192. };
  5193. struct NotifyEvent_20
  5194. {
  5195. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  5196. unsigned char tbc; // Optional. “to be continued” indicator. Indicates whether another part of the report follows in an upcoming notifyEventRequest message. Default value when omitted is false.
  5197. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  5198. struct EventDataType eventData[10]; // Required. List of EventData.
  5199. };
  5200. struct NotifyMonitoringReport_20
  5201. {
  5202. unsigned int requestId; // Required. The id of the GetMonitoringRequest that requested this report.
  5203. unsigned char tbc; // Optional. “to be continued” indicator.
  5204. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  5205. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  5206. struct MonitoringDataType monitor[10]; // Optional. List of MonitoringData containing monitoring settings.
  5207. };
  5208. struct NotifyReport_20
  5209. {
  5210. unsigned int requestId; // Required. The id of the GetReportRequest or GetBaseReportRequest that requested this report
  5211. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  5212. unsigned char tbc; // Optional. “to be continued” indicator.
  5213. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  5214. struct ReportDataType reportData[10]; // Optional. List of ReportData.
  5215. };
  5216. struct PublishFirmware_20
  5217. {
  5218. unsigned char location[512]; // Required. This contains a string containing a URI pointing to a location from which to retrieve the firmware.
  5219. unsigned char retries; // Optional. This specifies how many times Charging Station must try to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
  5220. unsigned char checksum[32]; // Required. The MD5 checksum over the entire firmware file as a hexadecimal string of length 32.
  5221. unsigned int requestId; // Required. The Id of the request.
  5222. unsigned int retryInterval; // Optional. The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
  5223. unsigned char Response_status[16]; // Required. Indicates whether the request was accepted.
  5224. unsigned char guid[37]; // Save guid from server request
  5225. };
  5226. struct PublishFirmwareStatusNotification_20
  5227. {
  5228. unsigned char status[32]; // Required. This contains the progress status of the publishfirmware installation.
  5229. unsigned char location[10][512]; // Optional. Required if status is Published. Can be multiple URI’s, if the Local Controller supports e.g. HTTP, HTTPS, and FTP.
  5230. unsigned int requestId; // Optional. The request id that was provided in the PublishFirmwareRequest which triggered this action.
  5231. };
  5232. struct ReportChargingProfiles_20
  5233. {
  5234. unsigned int requestId; // Required. Id used to match the GetChargingProfilesRequest message with the resulting ReportChargingProfilesRequest messages
  5235. unsigned char chargingLimitSource[8]; // Required. Source that has installed this charging profile.
  5236. unsigned char tbc; // Optional. To Be Continued. Default value when omitted: false. false indicates that there are no further messages as part of this report.
  5237. unsigned int evseId; // Required. The evse to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station.
  5238. struct ChargingProfileType chargingProfile[3]; // Required. The charging profile as configured in the Charging Station.
  5239. };
  5240. struct RequestStartTransaction_20
  5241. {
  5242. unsigned int evseId; // Optional. Number of the EVSE on which to start the transaction. EvseId SHALL be > 0
  5243. unsigned int remoteStartId; // Required. Id given by the server to this start request.
  5244. struct IdTokenType idToken; // Required. The identifier that the Charging Station must use to start a transaction.
  5245. struct ChargingProfileType chargingProfile; // Optional. Charging Profile to be used by the Charging Station for the requested transaction.
  5246. struct IdTokenType groupIdToken; // Optional. The group identifier that the Charging Station must use to start a transaction.
  5247. unsigned char Response_status[16]; // Required. Status indicating whether the Charging Station accepts the request to start a transaction.
  5248. unsigned char Response_transactionId[37]; // Optional. When the transaction was already started by the Charging Station before the RequestStartTransactionRequest was received, for example: cable plugged in first. This contains the transactionId of the already started transaction.
  5249. unsigned char guid[37]; // Save guid from server request
  5250. };
  5251. struct RequestStopTransaction_20
  5252. {
  5253. unsigned char transactionId[37]; // Required. The identifier of the transaction which the Charging Station is requested to stop.
  5254. unsigned char Response_status[16]; // Required. Status indicating whether Charging Station accepts the request to stop a transaction.
  5255. unsigned char guid[37]; // Save guid from server request
  5256. };
  5257. struct ReservationStatusUpdate_20
  5258. {
  5259. int reservationId; // Required. The ID of the reservation.
  5260. unsigned char reservationUpdateStatus[8]; // Required. The updated reservation status.
  5261. };
  5262. struct ReserveNow_20
  5263. {
  5264. unsigned int id; // Required. Id of reservation.
  5265. unsigned char expiryDateTime[28]; // Required. Date and time at which the reservation expires.
  5266. unsigned char connectorType[16]; // Optional. This field specifies the connector type.
  5267. unsigned int evseId; // Optional. This contains ID of the evse to be reserved.
  5268. struct IdTokenType idToken; // Required. The identifier for which the reservation is made.
  5269. struct IdTokenType groupIdToken; // Optional. The group identifier for which the reservation is made.
  5270. unsigned char Response_status[16]; // Required. This indicates the success or failure of the reservation.
  5271. unsigned char guid[37]; // Save guid from server request
  5272. };
  5273. struct Reset_20
  5274. {
  5275. unsigned char type[16]; // Required. This contains the type of reset that the Charging Station or EVSE should perform.
  5276. unsigned int evseId; // Optional. This contains the ID of a specific EVSE that needs to be reset, instead of the entire Charging Station.
  5277. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to perform the reset.
  5278. unsigned char guid[37]; // Save guid from server request
  5279. };
  5280. struct SecurityEventNotification_20
  5281. {
  5282. unsigned char type[50]; // Required. Type of the security event. This value should be taken from the Security events list.
  5283. unsigned char timestamp[28]; // Required. Date and time at which the event occurred.
  5284. unsigned char techInfo[255]; // Optional. Additional information about the occurred security event.
  5285. };
  5286. struct SendLocalList_20
  5287. {
  5288. unsigned int versionNumber; // Required. In case of a full update this is the versio number of the full list. In case of a differential update it i the version number of the list after the update has bee applied.
  5289. unsigned char updateType[32]; // Required. This contains the type of update (full or differential) of this request.
  5290. struct AuthorizationData localAuthorizationList[500]; // Optional. This contains the Local Authorization List entries.
  5291. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
  5292. unsigned char guid[37]; // Save guid from server request
  5293. };
  5294. struct SetChargingProfile_20
  5295. {
  5296. unsigned int evseId; // Required. The EVSE to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station.
  5297. struct ChargingProfileType chargingProfile; // Required. The charging profile to be set at the Charging Station.
  5298. unsigned char Response_status[16]; // Required. Returns whether the Charging Station has been able to process the message successfully. This does not guarantee the schedule will be followed to the letter. There might be other constraints the Charging Station may need to take into account.
  5299. unsigned char guid[37]; // Save guid from server request
  5300. };
  5301. struct SetDisplayMessage_20
  5302. {
  5303. struct MessageInfoType message; // Required. Message to be configured in the Charging Station, to be displayed.
  5304. unsigned char Response_status[32]; // Required. This indicates whether the Charging Station is able to display the message.
  5305. unsigned char guid[37]; // Save guid from server request
  5306. };
  5307. struct SetMonitoringBase_20
  5308. {
  5309. unsigned char monitoringBase[16]; // Required. Specify which monitoring base will be set
  5310. unsigned char Response_status[16]; // Required. Indicates whether the Charging Station was able to accept the request.
  5311. unsigned char guid[37]; // Save guid from server request
  5312. };
  5313. struct SetMonitoringLevel_20
  5314. {
  5315. unsigned int severity; // Required. The Charging Station SHALL only report events with a severity number lower than or equal to this severity.
  5316. unsigned char Response_status[16]; // Required. Indicates whether the Charging Station was able to accept the request.
  5317. unsigned char guid[37]; // Save guid from server request
  5318. };
  5319. struct SetNetworkProfile_20
  5320. {
  5321. unsigned int configurationSlot; // Required. Slot in which the configuration should be stored.
  5322. struct NetworkConnectionProfileType connectionData; // Required. Connection details.
  5323. unsigned char Response_status[16]; // Required. Result of operation.
  5324. unsigned char guid[37]; // Save guid from server request
  5325. };
  5326. struct SetVariableMonitoring_20
  5327. {
  5328. struct SetMonitoringDataType setMonitoringData[10]; // Required. List of MonitoringData containing monitoring settings.
  5329. struct SetMonitoringResultType Response_setMonitoringResult[10];// Required. List of result statuses per monitor.
  5330. unsigned char guid[37]; // Save guid from server request
  5331. };
  5332. struct SetVariables_20
  5333. {
  5334. struct SetVariableDataType setVariableData[CtrlrVariable_CNT]; // Required. List of Component-Variable pairs and attribute values to set.
  5335. struct SetVariableResultType Response_setVariableResult[CtrlrVariable_CNT]; // Required. List of result statuses per Component-Variable.
  5336. unsigned char guid[37]; // Save guid from server request
  5337. };
  5338. struct SignCertificate_20
  5339. {
  5340. unsigned char csr[5501]; // Required. The Charging Station SHALL send the public key in form of a Certificate Signing Request (CSR) as described in RFC 2986 [22] using the SignCertificateRequest message.
  5341. unsigned char certificateType[32]; // Optional. Indicates the type of certificate that is to be signed. When omitted the certificate is to be used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection.
  5342. unsigned char Response_status[16]; // Required. Specifies whether the CSMS can process the request.
  5343. struct StatusInfoType Response_statusInfo; // Optional. Detailed status information.
  5344. };
  5345. struct StatusNotification_20
  5346. {
  5347. unsigned char timestamp[28]; // Required. The time for which the status is reported. If absent time of receipt of the message will be assumed.
  5348. unsigned char connectorStatus[16]; // Required. This contains the current status of the Connector.
  5349. unsigned int evseId; // Required. The id of the EVSE to which the connector belongs for which the the status is reported.
  5350. unsigned char connectorId; // Required. The id of the connector within the EVSE for which the status is reported.
  5351. };
  5352. struct TransactionEvent_20
  5353. {
  5354. unsigned char eventType[16]; // Required. This contains the type of this event. The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
  5355. unsigned char timestamp[28]; // Required. The date and time at which this transaction event occurred.
  5356. unsigned char triggerReason[32]; // Required. Reason the Charging Station sends this message to the CSMS
  5357. unsigned int seqNo; // Required. Incremental sequence number, helps with determining if all messages of a transaction have been received.
  5358. unsigned char offline; // Optional. Indication that this transaction event happened when the Charging Station was offline. Default = false, meaning: the event occurred when the Charging Station was online.
  5359. unsigned char numberOfPhasesUsed; // Optional. If the Charging Station is able to report the number of phases used, then it SHALL provide it. When omitted the CSMS may be able to determine the number of phases used via device management.
  5360. float cableMaxCurrent; // Optional. The maximum current of the connected cable in Ampere (A).
  5361. int reservationId; // Optional. This contains the Id of the reservation that terminates as a result of this transaction.
  5362. struct TransactionType transactionInfo; // Required. Contains transaction specific information.
  5363. struct IdTokenType idToken; // Optional. This contains the identifier for which a transaction has to be/was started.
  5364. struct EVSEType evse; // Optional. This identifies which evse (and connector) of the Charging Station is used.
  5365. struct MeterValueType meterValue[1]; // Optional. This contains the relevant meter values.
  5366. float Response_totalCost; // Optional. SHALL only be sent when charging has ended. Final total cost of this transaction, including taxes.
  5367. int Response_chargingPriority; // Optional. Priority from a business point of view. Default priority is 0,
  5368. struct IdTokenInfoType Response_idTokenInfo; // Optional. This contains information about authorization status, expiry and group id. Is required when the transactionEventRequest contained an idToken.
  5369. struct MessageContentType Response_updatedPersonalMessage; // Optional. This can contain updated personal message that can be shown to the EV Driver. This can be used to provide updated tariff information
  5370. };
  5371. struct TriggerMessage_20
  5372. {
  5373. unsigned char requestedMessage[32]; // Required. Type of message to be triggered.
  5374. struct EVSEType evse; // Optional. Can be used to specifiy the EVSE and Connector if required for the message which needs to be sent.
  5375. unsigned char Response_status[16]; // Required. Indicates whether the Charging Station will send the requested notification or not.
  5376. unsigned char guid[37]; // Save guid from server request
  5377. };
  5378. struct UnlockConnector_20
  5379. {
  5380. unsigned int evseId; // Required. This contains the identifier of the EVSE for which a connector needs to be unlocked.
  5381. unsigned char connectorId; // Required. This contains the identifier of the connector that needs to be unlocked.
  5382. unsigned char Response_status[32]; // Required. This indicates whether the Charging Station has unlocked the connector.
  5383. unsigned char guid[37]; // Save guid from server request
  5384. };
  5385. struct UnpublishFirmware_20
  5386. {
  5387. unsigned char checksum[32]; // Required. The MD5 checksum over the entire firmware file as a hexadecimal string of length 32.
  5388. unsigned char Response_status[16]; // Required. Indicates whether the Local Controller succeeded in unpublishing the firmware.
  5389. unsigned char guid[37]; // Save guid from server request
  5390. };
  5391. struct UpdateFirmware_20
  5392. {
  5393. unsigned char retries; // Optional. This specifies how many times Charging Station must try to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
  5394. unsigned int retryInterval; // Optional. The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
  5395. unsigned int requestId; // Required. The Id of this request
  5396. struct FirmwareType firmware; // Required. Specifies the firmware to be updated on the Charging Station.
  5397. unsigned char Response_status[32]; // Required. This field indicates whether the Charging Station was able to accept the request.
  5398. unsigned char guid[37]; // Save guid from server request
  5399. };
  5400. struct NetworkConnectionProfile_20
  5401. {
  5402. unsigned int slot;
  5403. unsigned char retryCount;
  5404. struct NetworkConnectionProfileType connectionData;
  5405. };
  5406. struct OCPP20Data
  5407. {
  5408. unsigned char OcppServerURL[512]; //http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
  5409. unsigned char ChargeBoxId[128];
  5410. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  5411. unsigned int Timeout_Secs;
  5412. unsigned short Ping_Pong_Interval;
  5413. unsigned int procDogTime; // Process watch dog refresh timer
  5414. struct ReportDataType ControllerComponentVariable[CtrlrVariable_CNT];
  5415. struct NetworkConnectionProfile_20 NetworkConnectionProfile[10];
  5416. union
  5417. {
  5418. //Operations Initiated by Charge Point
  5419. unsigned char CpMsgValue[CONNECTOR_QUANTITY];
  5420. struct
  5421. {
  5422. unsigned char DataTransferReq:1;
  5423. unsigned char DataTransferConf:1;
  5424. unsigned char ReservationStatusUpdateReq :1;
  5425. unsigned char ReservationStatusUpdateConf :1;
  5426. unsigned char TransactionEventReq :1;
  5427. unsigned char TransactionEventConf :1;
  5428. unsigned char :2; //bit 6,7 , reserved
  5429. } bits[CONNECTOR_QUANTITY];
  5430. }CpMsg;
  5431. union
  5432. {
  5433. //Operations Initiated by Sequence Point
  5434. unsigned char SpMsgValue[4];
  5435. struct
  5436. {
  5437. unsigned char BootNotificationReq :1; //bit 0,
  5438. unsigned char BootNotificationConf :1; //bit 1,
  5439. unsigned char AuthorizeReq :1; //bit 2,
  5440. unsigned char AuthorizeConf :1; //bit 3,
  5441. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  5442. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  5443. unsigned char Get15118EVCertificateReq :1;
  5444. unsigned char Get15118EVCertificateConf :1;
  5445. unsigned char GetCertificateStatusReq :1;
  5446. unsigned char GetCertificateStatusConf :1;
  5447. unsigned char LogStatusNotificationReq :1;
  5448. unsigned char LogStatusNotificationConf :1;
  5449. unsigned char NotifyChargingLimitReq :1;
  5450. unsigned char NotifyChargingLimitConf :1;
  5451. unsigned char NotifyDisplayMessagesReq :1;
  5452. unsigned char NotifyDisplayMessagesConf :1;
  5453. unsigned char NotifyEVChargingScheduleReq :1;
  5454. unsigned char NotifyEVChargingScheduleConf :1;
  5455. unsigned char NotifyEventReq :1;
  5456. unsigned char NotifyEventConf :1;
  5457. unsigned char NotifyMonitoringReportReq :1;
  5458. unsigned char NotifyMonitoringReportConf :1;
  5459. unsigned char NotifyReportReq :1;
  5460. unsigned char NotifyReportConf :1;
  5461. unsigned char ReportChargingProfilesReq :1;
  5462. unsigned char ReportChargingProfilesConf :1;
  5463. unsigned char SecurityEventNotificationReq :1;
  5464. unsigned char SecurityEventNotificationConf :1;
  5465. unsigned char SignCertificateReq :1;
  5466. unsigned char SignCertificateConf :1;
  5467. unsigned char :2;
  5468. } bits;
  5469. } SpMsg;
  5470. union
  5471. {
  5472. //Operations Initiated by Central System
  5473. unsigned char CsMsgValue[3 * (CONNECTOR_QUANTITY)];
  5474. struct
  5475. {
  5476. unsigned char CancelReservationReq :1; //bit 0,
  5477. unsigned char CancelReservationConf :1; //bit 1,
  5478. unsigned char ChangeAvailabilityReq :1; //bit 2,
  5479. unsigned char ChangeAvailabilityConf :1; //bit 3,
  5480. unsigned char ClearChargingProfileReq :1; //bit 0,
  5481. unsigned char ClearChargingProfileConf :1; //bit 1,
  5482. unsigned char DataTransferReq :1; //bit 2,
  5483. unsigned char DataTransferConf :1; //bit 3,
  5484. unsigned char PublishFirmwareStatusNotificationReq :1;
  5485. unsigned char PublishFirmwareStatusNotificationConf :1;
  5486. unsigned char RequestStartTransactionReq :1;
  5487. unsigned char RequestStartTransactionConf :1;
  5488. unsigned char RequestStopTransactionReq :1;
  5489. unsigned char RequestStopTransactionConf :1;
  5490. unsigned char ReserveNowReq :1; //bit 4,
  5491. unsigned char ReserveNowConf :1; //bit 5,
  5492. unsigned char TriggerMessageReq :1; //bit 0,
  5493. unsigned char TriggerMessageConf :1; //bit 1,
  5494. unsigned char UnlockConnectorReq :1; //bit 2,
  5495. unsigned char UnlockConnectorConf :1; //bit 3,
  5496. unsigned char :4; //bit 6,7 , reserved
  5497. } bits[CONNECTOR_QUANTITY];
  5498. }CsMsg;
  5499. union
  5500. {
  5501. //Operations Initiated by Main System
  5502. unsigned char MsMsgValue[8];
  5503. struct
  5504. {
  5505. //CsMsgValue[0]
  5506. unsigned char CertificateSignedReq :1;
  5507. unsigned char CertificateSignedConf :1;
  5508. unsigned char ClearCacheReq :1; //bit 2,
  5509. unsigned char ClearCacheConf :1; //bit 3,
  5510. unsigned char ClearDisplayMessageReq :1;
  5511. unsigned char ClearDisplayMessageConf :1;
  5512. unsigned char ClearVariableMonitoringReq :1;
  5513. unsigned char ClearVariableMonitoringConf :1;
  5514. unsigned char CostUpdatedReq :1;
  5515. unsigned char CostUpdatedConf :1;
  5516. unsigned char CustomerInformationReq :1;
  5517. unsigned char CustomerInformationConf :1;
  5518. unsigned char DeleteCertificateReq :1;
  5519. unsigned char DeleteCertificateConf :1;
  5520. unsigned char GetBaseReportReq :1;
  5521. unsigned char GetBaseReportConf :1;
  5522. unsigned char GetChargingProfilesReq :1;
  5523. unsigned char GetChargingProfilesConf :1;
  5524. unsigned char GetCompositeScheduleReq :1; //bit 4,
  5525. unsigned char GetCompositeScheduleConf :1; //bit 5,
  5526. unsigned char GetDisplayMessagesReq :1;
  5527. unsigned char GetDisplayMessagesConf :1;
  5528. unsigned char GetInstalledCertificateIdsReq :1;
  5529. unsigned char GetInstalledCertificateIdsConf :1;
  5530. unsigned char GetLocalListVersionReq :1; //bit 2,
  5531. unsigned char GetLocalListVersionConf :1; //bit 3,
  5532. unsigned char GetLogReq :1;
  5533. unsigned char GetLogConf :1;
  5534. unsigned char GetMonitoringReportReq :1;
  5535. unsigned char GetMonitoringReportConf :1;
  5536. unsigned char GetReportReq :1;
  5537. unsigned char GetReportConf :1;
  5538. unsigned char GetTransactionStatusReq :1;
  5539. unsigned char GetTransactionStatusConf :1;
  5540. unsigned char GetVariablesReq :1;
  5541. unsigned char GetVariablesConf :1;
  5542. unsigned char InstallCertificateReq :1;
  5543. unsigned char InstallCertificateConf :1;
  5544. unsigned char PublishFirmwareReq :1;
  5545. unsigned char PublishFirmwareConf :1;
  5546. unsigned char ResetReq :1; //bit 4,
  5547. unsigned char ResetConf :1; //bit 5,
  5548. unsigned char SendLocalListReq :1; //bit 6,
  5549. unsigned char SendLocalListConf :1; //bit 7,
  5550. unsigned char SetChargingProfileReq :1; //bit 6,
  5551. unsigned char SetChargingProfileConf :1; //bit 7,
  5552. unsigned char SetDisplayMessageReq :1;
  5553. unsigned char SetDisplayMessageConf :1;
  5554. unsigned char SetMonitoringBaseReq :1;
  5555. unsigned char SetMonitoringBaseConf :1;
  5556. unsigned char SetMonitoringLevelReq :1;
  5557. unsigned char SetMonitoringLevelConf :1;
  5558. unsigned char SetNetworkProfileReq :1;
  5559. unsigned char SetNetworkProfileConf :1;
  5560. unsigned char SetVariableMonitoringReq :1;
  5561. unsigned char SetVariableMonitoringConf :1;
  5562. unsigned char SetVariablesReq :1;
  5563. unsigned char SetVariablesConf :1;
  5564. unsigned char UnpublishFirmwareReq :1;
  5565. unsigned char UnpublishFirmwareConf :1;
  5566. unsigned char UpdateFirmwareReq :1;
  5567. unsigned char UpdateFirmwareConf :1;
  5568. unsigned char :2;
  5569. } bits;
  5570. } MsMsg;
  5571. union
  5572. {
  5573. //Operations triggered by CSU
  5574. unsigned char CSUMsgValue[CONNECTOR_QUANTITY];
  5575. struct
  5576. {
  5577. //CSUMsgValue[0]
  5578. unsigned char ChargingProfileReq:1; //bit 0,
  5579. unsigned char ChargingProfileConf:1; //bit 0,
  5580. unsigned char ClearedChargingLimitReq :1;
  5581. unsigned char ClearedChargingLimitConf :1;
  5582. unsigned char NotifyEVChargingNeedsReq :1;
  5583. unsigned char NotifyEVChargingNeedsConf :1;
  5584. unsigned char :2; //bit 1,2,3,4,5,6,7 , reserved
  5585. } bits[CONNECTOR_QUANTITY];
  5586. }CSUMsg;
  5587. struct Authorize_20 Authorize;
  5588. struct BootNotification_20 BootNotification;
  5589. struct CancelReservation_20 CancelReservation[CONNECTOR_QUANTITY];
  5590. struct CertificateSigned_20 CertificateSigned;
  5591. struct ChangeAvailability_20 ChangeAvailability[CONNECTOR_QUANTITY];
  5592. struct ClearCache_20 ClearCache;
  5593. struct ClearChargingProfile_20 ClearChargingProfile[CONNECTOR_QUANTITY];
  5594. struct ClearDisplayMessage_20 ClearDisplayMessage;
  5595. struct ClearedChargingLimit_20 ClearedChargingLimit[CONNECTOR_QUANTITY];
  5596. struct ClearVariableMonitoring_20 ClearVariableMonitoring;
  5597. struct CostUpdated_20 CostUpdated;
  5598. struct CustomerInformation_20 CustomerInformation;
  5599. struct DataTransfer_20 DataTransfer[CONNECTOR_QUANTITY];
  5600. struct DeleteCertificate_20 DeleteCertificate;
  5601. struct FirmwareStatusNotification_20 FirmwareStatusNotification;
  5602. struct Get15118EVCertificate_20 Get15118EVCertificate;
  5603. struct GetBaseReport_20 GetBaseReport;
  5604. struct GetCertificateStatus_20 GetCertificateStatus;
  5605. struct GetChargingProfiles_20 GetChargingProfiles[CONNECTOR_QUANTITY];
  5606. struct GetCompositeSchedule_20 GetCompositeSchedule[CONNECTOR_QUANTITY];
  5607. struct GetDisplayMessages_20 GetDisplayMessages;
  5608. struct GetInstalledCertificateIds_20 GetInstalledCertificateIds;
  5609. struct GetLocalListVersion_20 GetLocalListVersion;
  5610. struct GetLog_20 GetLog;
  5611. struct GetMonitoringReport_20 GetMonitoringReport;
  5612. struct GetReport_20 GetReport;
  5613. struct GetTransactionStatus_20 GetTransactionStatus[CONNECTOR_QUANTITY];
  5614. struct GetVariables_20 GetVariables;
  5615. struct Heartbeat_20 Heartbeat;
  5616. struct InstallCertificate_20 InstallCertificate;
  5617. struct LogStatusNotification_20 LogStatusNotification;
  5618. struct MeterValues_20 MeterValues[CONNECTOR_QUANTITY];
  5619. struct NotifyChargingLimit_20 NotifyChargingLimit[CONNECTOR_QUANTITY];
  5620. struct NotifyCustomerInformation_20 NotifyCustomerInformation;
  5621. struct NotifyDisplayMessages_20 NotifyDisplayMessages;
  5622. struct NotifyEVChargingNeeds_20 NotifyEVChargingNeeds[CONNECTOR_QUANTITY];
  5623. struct NotifyEVChargingSchedule_20 NotifyEVChargingSchedule[CONNECTOR_QUANTITY];
  5624. struct NotifyEvent_20 NotifyEvent;
  5625. struct NotifyMonitoringReport_20 NotifyMonitoringReport;
  5626. struct NotifyReport_20 NotifyReport;
  5627. struct PublishFirmware_20 PublishFirmware;
  5628. struct PublishFirmwareStatusNotification_20 PublishFirmwareStatusNotificatio;
  5629. struct ReportChargingProfiles_20 ReportChargingProfiles[CONNECTOR_QUANTITY];
  5630. struct RequestStartTransaction_20 RequestStartTransaction[CONNECTOR_QUANTITY];
  5631. struct RequestStopTransaction_20 RequestStopTransaction[CONNECTOR_QUANTITY];
  5632. struct ReservationStatusUpdate_20 ReservationStatusUpdate[CONNECTOR_QUANTITY];
  5633. struct ReserveNow_20 ReserveNow[CONNECTOR_QUANTITY];
  5634. struct Reset_20 Reset;
  5635. struct SecurityEventNotification_20 SecurityEventNotification;
  5636. struct SendLocalList_20 SendLocalList;
  5637. struct SetChargingProfile_20 SetChargingProfile[CONNECTOR_QUANTITY];
  5638. struct SetDisplayMessage_20 SetDisplayMessage;
  5639. struct SetMonitoringBase_20 SetMonitoringBase;
  5640. struct SetMonitoringLevel_20 SetMonitoringLevel;
  5641. struct SetNetworkProfile_20 SetNetworkProfile;
  5642. struct SetVariableMonitoring_20 SetVariableMonitoring;
  5643. struct SetVariables_20 SetVariables;
  5644. struct SignCertificate_20 SignCertificate;
  5645. struct StatusNotification_20 StatusNotification[CONNECTOR_QUANTITY];
  5646. struct TransactionEvent_20 TransactionEvent[CONNECTOR_QUANTITY];
  5647. struct TriggerMessage_20 TriggerMessage;
  5648. struct UnlockConnector_20 UnlockConnector[CONNECTOR_QUANTITY];
  5649. struct UnpublishFirmware_20 UnpublishFirmware;
  5650. struct UpdateFirmware_20 UpdateFirmware;
  5651. struct ChargingProfileType SmartChargingProfile[CONNECTOR_QUANTITY];
  5652. };
  5653. #endif // DEFINE_H_