define.h 291 KB

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