define.h 296 KB

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