define.h 265 KB

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