define.h 303 KB

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