define.h 271 KB

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