define.h 273 KB

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