define.h 296 KB

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