define.h 295 KB

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