define.h 296 KB

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