define.h 294 KB

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