define.h 310 KB

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