define.h 294 KB

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