define.h 262 KB

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