define.h 282 KB

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