define.h 320 KB

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