define.h 300 KB

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