define.h 320 KB

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