define.h 321 KB

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