define.h 154 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637
  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 PSU_QUANTITY 2
  43. #define ONE_CONNECTOR_USE 0
  44. #elif BYTONGB
  45. #define MAX_PSU_QUANTITY 62
  46. #define CHAdeMO_QUANTITY 1
  47. #define CCS_QUANTITY 1
  48. #define GB_QUANTITY 0
  49. #define AC_QUANTITY 1
  50. #define PSU_QUANTITY 2
  51. #define ONE_CONNECTOR_USE 0
  52. #elif DW30
  53. #define MAX_PSU_QUANTITY 62
  54. #define CHAdeMO_QUANTITY 1
  55. #define CCS_QUANTITY 1
  56. #define GB_QUANTITY 0
  57. #define AC_QUANTITY 0
  58. #define PSU_QUANTITY 2
  59. #define ONE_CONNECTOR_USE 1
  60. #elif DM30
  61. #define MAX_PSU_QUANTITY 62
  62. #define CHAdeMO_QUANTITY 0
  63. #define CCS_QUANTITY 1
  64. #define GB_QUANTITY 0
  65. #define AC_QUANTITY 0
  66. #define PSU_QUANTITY 2
  67. #define ONE_CONNECTOR_USE 0
  68. #elif DS60120
  69. #define MAX_PSU_QUANTITY 62
  70. #define CHAdeMO_QUANTITY 1
  71. #define CCS_QUANTITY 1
  72. #define GB_QUANTITY 0
  73. #define AC_QUANTITY 0
  74. #define PSU_QUANTITY 2
  75. #define ONE_CONNECTOR_USE 0
  76. #elif DS60210
  77. #define MAX_PSU_QUANTITY 62
  78. #define CHAdeMO_QUANTITY 1
  79. #define CCS_QUANTITY 1
  80. #define GB_QUANTITY 0
  81. #define AC_QUANTITY 0
  82. #define PSU_QUANTITY 2
  83. #define ONE_CONNECTOR_USE 0
  84. #elif PlugIt360
  85. #define MAX_PSU_QUANTITY 62
  86. #define CHAdeMO_QUANTITY 0
  87. #define CCS_QUANTITY 1
  88. #define GB_QUANTITY 0
  89. #define AC_QUANTITY 0
  90. #define PSU_QUANTITY 2
  91. #define ONE_CONNECTOR_USE 0
  92. #else
  93. #define MAX_PSU_QUANTITY 62
  94. #define CHAdeMO_QUANTITY 1
  95. #define CCS_QUANTITY 1
  96. #define GB_QUANTITY 0
  97. #define AC_QUANTITY 1
  98. #define PSU_QUANTITY 2
  99. #define ONE_CONNECTOR_USE 0
  100. #endif
  101. /*SystemLog message*/
  102. #define SystemLogMessage //for debug info save to log file
  103. #define ConsloePrintLog //for debug info print to console
  104. /**************************************************************************************/
  105. /*****************************share memory key information*****************************/
  106. /**************************************************************************************/
  107. #define ShmSysConfigAndInfoKey 1001
  108. #define ShmPsuKey 1002
  109. #define ShmCHAdeMOCommKey 1003
  110. #define ShmCcsCommKey 1004
  111. #define ShmStatusCodeKey 1005
  112. #define ShmPrimaryMcuKey 1006
  113. #define ShmFanBdKey 1007
  114. #define ShmRelayBdKey 1008
  115. #define ShmOcppModuleKey 1009
  116. #define ShmGBTCommKey 1010
  117. /**************************************************************************************/
  118. /****************** Share memory configuration value constant define ******************/
  119. /**************************************************************************************/
  120. enum SYSTEM_STATUS
  121. {
  122. SYS_MODE_BOOTING = 0,
  123. SYS_MODE_IDLE = 1,
  124. SYS_MODE_AUTHORIZING = 2,
  125. SYS_MODE_MODE_REASSIGN_CHECK = 3,
  126. SYS_MODE_REASSIGN = 4,
  127. SYS_MODE_PREPARING = 5,
  128. SYS_MODE_PREPARE_FOR_EV = 6,
  129. SYS_MODE_PREPARE_FOR_EVSE = 7,
  130. SYS_MODE_CHARGING = 8,
  131. SYS_MODE_TERMINATING = 9,
  132. SYS_MODE_COMPLETE = 10,
  133. SYS_MODE_ALARM = 11,
  134. SYS_MODE_FAULT = 12,
  135. SYS_MODE_RESERVATION = 13,
  136. SYS_MODE_BOOKING = 14,
  137. SYS_MODE_MAINTAIN = 15,
  138. SYS_MODE_DEBUG = 16,
  139. SYS_MODE_CCS_PRECHARGE_STEP0 = 17,
  140. SYS_MODE_CCS_PRECHARGE_STEP1 = 18,
  141. SYS_MODE_UPDATE = 19
  142. };
  143. enum AUTHORIZATION_MODE
  144. {
  145. AUTH_MODE_BACKEND_OCPP = 0,
  146. AUTH_MODE_FREE = 1
  147. };
  148. enum LCD_LANGUAGE
  149. {
  150. LCD_LANG_ENGLISH = 0,
  151. LCD_LANG_CHT = 1,
  152. LCD_LANG_CHS = 2,
  153. LCD_LANG_JAPANESE = 3,
  154. LCD_LANG_FRENCH = 4,
  155. LCD_LANG_ITALIAN = 5,
  156. LCD_LANG_SPANISH = 6,
  157. LCD_LANG_GERMAN = 7,
  158. LCD_LANG_DUTCH = 8,
  159. LCD_LANG_NORWEGIAN = 9,
  160. LCD_LANG_FINNISH = 10,
  161. LCD_LANG_SWEDISH = 11,
  162. LCD_LANG_SLOVENIAN = 12,
  163. LCD_LANG_THAI = 13,
  164. };
  165. enum RFID_ENDIAN
  166. {
  167. RFID_ENDIAN_LITTLE = 0,
  168. RFID_ENDIAN_BIG = 1
  169. };
  170. enum PHASE_LOSS_POLICY
  171. {
  172. LOSS_POLICY_CHARGING = 0,
  173. LOSS_POLICY_STOP = 1
  174. };
  175. enum CCS_AUTHPRIZATION_MODE
  176. {
  177. CCS_AUTH_MODE_EIM = 0,
  178. CCS_AUTH_MODE_MIXED = 1
  179. };
  180. enum OFF_LINE_POLICY
  181. {
  182. OFF_POLICY_LOCALLIST = 0,
  183. OFF_POLICY_PH_RFID = 1,
  184. OFF_POLICY_FREE = 2,
  185. OFF_POLICY_NOCHARGE = 3
  186. };
  187. /*Configuration enum*/
  188. enum CoreProfile {
  189. AllowOfflineTxForUnknownId=0,
  190. AuthorizationCacheEnabled,
  191. AuthorizeRemoteTxRequests,
  192. BlinkRepeat,
  193. ClockAlignedDataInterval,
  194. ConnectionTimeOut,
  195. GetConfigurationMaxKeys,
  196. HeartbeatInterval,
  197. LightIntensity,
  198. LocalAuthorizeOffline,
  199. LocalPreAuthorize,
  200. MaxEnergyOnInvalidId,
  201. MeterValuesAlignedData,
  202. MeterValuesAlignedDataMaxLength,
  203. MeterValuesSampledData,
  204. MeterValuesSampledDataMaxLength,
  205. MeterValueSampleInterval,
  206. MinimumStatusDuration,
  207. NumberOfConnectors,
  208. ResetRetries,
  209. ConnectorPhaseRotation,
  210. ConnectorPhaseRotationMaxLength,
  211. StopTransactionOnEVSideDisconnect,
  212. StopTransactionOnInvalidId,
  213. StopTxnAlignedData,
  214. StopTxnAlignedDataMaxLength,
  215. StopTxnSampledData,
  216. StopTxnSampledDataMaxLength,
  217. SupportedFeatureProfiles,
  218. SupportedFeatureProfilesMaxLength,
  219. TransactionMessageAttempts,
  220. TransactionMessageRetryInterval,
  221. UnlockConnectorOnEVSideDisconnect,
  222. WebSocketPingInterval,
  223. _CoreProfile_CNT
  224. };
  225. /**************************************************************************************/
  226. /****structure SysConfigData => shall store the data to NAND flash****************/
  227. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  228. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  229. /**************************************************************************************/
  230. struct NoneUse
  231. {
  232. unsigned char unknown; // None use struct
  233. };
  234. struct EthConfigData
  235. {
  236. unsigned char EthDhcpClient; //0: enable,1: disable
  237. unsigned char EthMacAddress[18]; //default: Null
  238. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  239. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  240. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  241. };
  242. struct WifiConfigData
  243. {
  244. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  245. unsigned char WifiSsid[256]; //default: Null
  246. unsigned char WifiPassword[256]; //default: Null
  247. int WifiRssi; //dbm
  248. unsigned char WifiDhcpServer; //0: enable, 1: disable
  249. unsigned char WifiDhcpClient; //0: enable, 1: disable
  250. unsigned char WifiMacAddress[18]; //default: Null
  251. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  252. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  253. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  254. unsigned char WifiNetworkConn; //0: disconnected, 1: connected
  255. };
  256. struct TeleConfigData
  257. {
  258. unsigned char TelcomModelName[64]; //default: Null
  259. unsigned char TelcomSoftwareVer[64]; //default: Null
  260. unsigned char TelcomApn[256]; //default: Null
  261. int TelcomRssi; //dbm
  262. unsigned char TelcomChapPapId[256]; //default: Null
  263. unsigned char TelcomChapPapPwd[256]; //default: Null
  264. unsigned char TelcomModemImei[16]; //default: Null
  265. unsigned char TelcomSimImsi[16]; //default: Null
  266. unsigned char TelcomSimIccid[22]; //default: Null
  267. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  268. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
  269. unsigned char TelcomIpAddress[16]; //default: Null
  270. unsigned char TelcomNetworkConn; //0: disconnected, 1: connected
  271. };
  272. struct BtConfigData
  273. {
  274. unsigned char LoginCentralID[64]; //default: Null
  275. unsigned char isLogin; //0: Central device non-login 1: Central device login
  276. unsigned char isRequestStart; //0: no action 1: request start charging
  277. unsigned char isRequestStop; //0: no action 1: request stop charging
  278. };
  279. struct BillingConfigData
  280. {
  281. unsigned char isBilling; //0:not for business 1:for business
  282. unsigned char Currency; //
  283. unsigned short Fee[24]; //fee for 24 hours
  284. };
  285. struct SysConfigData
  286. {
  287. /**************System***************/
  288. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  289. unsigned char ModelName[64]; //charger model name
  290. unsigned char SerialNumber[64]; //charger system serial number
  291. unsigned char SystemId[128]; //charger system ID
  292. unsigned char SystemDateTime[32]; //charger system date and time
  293. unsigned char AcPhaseCount; //AC EVSE power phase quantity, 1: One phase 3: Three phase
  294. unsigned char AuthorisationMode; //0: OCPP backend, 1: free mode
  295. unsigned char DefaultLanguage; //
  296. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  297. unsigned short AcPlugInTimes; //0~65535
  298. unsigned short GbPlugInTimes; //0~65535
  299. unsigned short Ccs1PlugInTime; //0~65535
  300. unsigned short Ccs2PlugInTimes; //0~65535
  301. unsigned short ChademoPlugInTimes; //0~65535
  302. unsigned char PsuAcInputType; //0: 220, 1: 277
  303. unsigned short RatingCurrent; //0: Depend on Model name, 1 ~ rating value amp
  304. unsigned char isAPP; //for AuthorisationMode=0; 0:false, 1:true
  305. unsigned char isQRCode; //for AuthorisationMode=0; 0:false, 1:true
  306. unsigned char isRFID; //for AuthorisationMode=0; 0:false, 1:true
  307. unsigned char QRCodeMadeMode; //for isQRCode=1 ; 0: default 1:customized
  308. unsigned char QRCodeContent[128]; //for QRCodeMadeMode=1
  309. unsigned char TotalConnectorCount; //Connector count
  310. /**************Charging***************/
  311. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  312. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW"
  313. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp"
  314. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  315. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  316. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  317. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  318. struct BillingConfigData BillingData;
  319. /**************Network***************/
  320. unsigned char FtpServer[256]; //the ftp server for Phihong server to do data transimission
  321. struct EthConfigData Eth0Interface;
  322. struct EthConfigData Eth1Interface;
  323. struct WifiConfigData AthInterface;
  324. struct TeleConfigData TelecomInterface;
  325. struct BtConfigData Bluetooth;
  326. /**************Backend***************/
  327. unsigned int BackendConnTimeout; //default : 300s
  328. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  329. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  330. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  331. 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"
  332. unsigned char ChargeBoxId[128];
  333. unsigned char chargePointVendor[20]; //the Vendor of the ChargePoint
  334. unsigned int Checksum; //4 bytes checksum
  335. };
  336. struct ChargingInfoData
  337. {
  338. unsigned char Index;
  339. unsigned char slotsIndex;
  340. unsigned char Type; // 0 : Chademo, 1 : CCS, 2: GB
  341. unsigned char type_index;
  342. unsigned char Evboard_id; // for EV board
  343. unsigned char StopChargeFlag; // for EV board
  344. unsigned char SystemStatus; //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  345. unsigned char PreviousSystemStatus; // 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  346. int ReservationId;
  347. unsigned char IsAvailable;
  348. float MaximumChargingVoltage; //0~6553.5 volt
  349. float AvailableChargingCurrent; //0~6553.5 amp
  350. float AvailableChargingPower; //0~6553.5 kW
  351. float DeratingChargingCurrent; //0~6553.5 amp
  352. float DeratingChargingPower; //0~6553.5 kW
  353. float FuseChargingVoltage; //0~6553.5 volt
  354. float FireChargingVoltage; //0~6553.5 volt
  355. float PresentChargingVoltage; //0~6553.5 volt
  356. float PresentChargingCurrent; //0~6553.5 amp
  357. float PresentChargingPower; //0~6553.5 kW
  358. float PresentChargedEnergy; //0~6553.5 kWh
  359. int PresentChargedDuration; // second
  360. int RemainChargingDuration; // second
  361. float EvBatteryMaxVoltage; // 0~6553.5 volt
  362. float EvBatterytargetVoltage; // 0~6553.5 volt
  363. float EvBatterytargetCurrent; //102.3 0~200(A) (unit:1A)
  364. int EvBatterySoc; // 0~100%
  365. unsigned char ConnectorPlugIn; //0: unplug, 1: Plug-in
  366. unsigned char GunLocked; //0: unlocked 1: locked
  367. float PilotVoltage;
  368. 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
  369. unsigned char PilotDuty; // 0~100%
  370. unsigned char StartUserId[32]; // This ID is trigger start charging event user by RFID、back-end、BLE.
  371. unsigned char StartDateTime[32]; // Charging cycle start date time
  372. unsigned char StopDateTime[32]; // Charging cycle stop date time
  373. unsigned char StartMethod;
  374. // Connector Temp
  375. unsigned char ConnectorTemp; //0x00: -60¢XC ~ 0xFE: 194
  376. // Charging Status
  377. unsigned char GroundFaultStatus; // for GFD result => 0x00 : None, 0x01 : Can Start Charging, 0x02 : Stop Charging
  378. unsigned char PrechargeStatus; // for ccs precharge => 0x00 : None defined, 0x01 : Accepted
  379. float OutputEnergy; // output energy by per charging
  380. unsigned char RelayK1K2Status; // 0x00 : open, 0x01 : close
  381. unsigned char RelayKPK2Status; // 0x00 : open, 0x01 : close
  382. unsigned char TimeoutFlag; // 0 : none,
  383. struct timeval TimeoutTimer;
  384. unsigned char MaxChargeEnable;
  385. unsigned char IsReadyToCharging;
  386. unsigned char CcsAuthentication; // 0:EIM, 1:EIM & PnC mixed
  387. unsigned char AcCcsChargingMode; // 0:BC (PWM) only, 1:BC & PLC mixed
  388. unsigned short SampleChargingCur[2];
  389. };
  390. struct SysInfoData
  391. {
  392. /**************System***************/
  393. unsigned char BootingStatus; // 0 : booting, 1 : Initializing Complete.
  394. unsigned char AuthorizeFlag; // 0 : None, 1 : Authorizing
  395. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  396. float InputVoltageR; //0~655.35 volt
  397. float InputVoltageS; //0~655.35 volt
  398. float InputVoltageT; //0~655.35 volt
  399. unsigned int SystemFanRotaSpeed; //0 ~ 65535 RPM
  400. unsigned int PsuFanRotaSpeed; //0 ~ 65535 RPM
  401. unsigned char AuxPower5V; //0 ~ 255 volt
  402. unsigned char AuxPower12V; //0 ~ 255 volt
  403. unsigned char AuxPower24V; //0 ~ 255 volt
  404. unsigned char AuxPower48V; //0 ~ 255 volt
  405. unsigned char CsuHwRev[32]; //CSU board hardware version
  406. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  407. unsigned char CsuKernelFwRev[32];//CSU board OS kernel firmware version
  408. unsigned char CsuRootFsFwRev[32];//CSU board root file system firmware version
  409. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  410. unsigned char LcmHwRev[32]; //LCM module hardware version
  411. unsigned char LcmFwRev[32]; //LCM module firmware version
  412. unsigned char PsuHwRev[32]; //PSU hardware version
  413. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  414. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  415. unsigned char AuxPwrHwRev[32]; //Aux. power module hardware version
  416. unsigned char AuxPwrFwRev[32]; //Aux. power module firmware version
  417. unsigned char FanModuleHwRev[32]; //Fan module hardware version
  418. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  419. unsigned char RelayModuleHwRev[32]; //Relay control module hardware version
  420. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  421. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  422. int SystemAmbientTemp; // -40 ~ 215 degree C
  423. int SystemCriticalTemp; // -40 ~ 215 degree C
  424. int CcsConnectorTemp; // -40 ~ 215 degree C
  425. int PsuAmbientTemp; // -40 ~ 215 degree C
  426. /**************Charging***************/
  427. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  428. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  429. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  430. struct ChargingInfoData AcChargingData[AC_QUANTITY];
  431. unsigned char CurGunSelected;
  432. /**************Network***************/
  433. unsigned char InternetConn; //0: disconnected, 1: connected
  434. /**************Backend***************/
  435. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  436. char OrderCharging;
  437. /**************Alston***************/
  438. unsigned char WaitForPlugit; //0: none scan, 1: scanning
  439. unsigned char PageIndex; //0 : Initialize
  440. //1 : idle
  441. //4 : Authorizing
  442. //5 : Authorizing complete
  443. //6 : Authorizing fail
  444. //7 : Wait for Plug
  445. //8 : Pre-charge
  446. //9 : Charging
  447. unsigned char SelfTestSeq; //
  448. unsigned char ReAssignedFlag; //
  449. unsigned char MainChargingMode; // 0 : Max, 1 : Average
  450. unsigned char BridgeRelayStatus;
  451. unsigned char FirmwareUpdate; // 0 : none, 1 : update.
  452. unsigned char AcContactorStatus; // 0: disconnected, 1: connected
  453. unsigned char SystemTimeoutFlag; // 0 : none, 1 : self test
  454. struct timeval SystemTimeoutTimer;
  455. unsigned char SystemPage;
  456. unsigned char ConnectorPage;
  457. unsigned char IsAlternatvieConf; // 0 : normal, 1 : alternative
  458. unsigned char StartToChargingFlag; // 0 : Stop, 1 : Start
  459. };
  460. struct WARNING_CODE_INFO
  461. {
  462. unsigned char WarningCount;
  463. unsigned char PageIndex;
  464. unsigned char WarningCode[10][7];
  465. unsigned char Level;
  466. unsigned char ExtraErrProcess; // 0 : none, 1 : input uvp..
  467. };
  468. struct SysConfigAndInfo
  469. {
  470. struct SysConfigData SysConfig;
  471. struct SysInfoData SysInfo;
  472. struct WARNING_CODE_INFO SysWarningInfo;
  473. };
  474. /**************************************************************************************/
  475. /**************************Alarm Share memory**************************************/
  476. /***************************************************************************************
  477. Status Code A B C D E F
  478. 0: Issue 1: From EVSE 1: Fault (unrecoverable) 001 ~ 999 serial number
  479. e.g., hardware broken, system latch
  480. 1: Recovered 2: From EV 2: Alarm (recoverable)
  481. e.g., OTP, OVP
  482. 3: From Backend 3: Information
  483. e.g., swipe card to stop charging
  484. according to XXX.Revxx
  485. ***************************************************************************************/
  486. /**************************************************************************************/
  487. char FaultStatusCode[32][6]=
  488. {
  489. "011001", //CHAdeMO output fuse blew
  490. "011002", //CCS output fuse blew
  491. "011003", //GB output fuse blew
  492. "011004", //RCD/CCID self-test fail
  493. "011005", //AC input contactor 1 welding
  494. "011006", //AC input contactor 1 driving fault
  495. "011007", //AC input contactor 2 welding
  496. "011008", //AC input contactor 2 driving fault
  497. "011009", //AC output relay welding
  498. "011010", //AC output relay driving fault
  499. "011011", //CHAdeMO output relay welding
  500. "011012", //CHAdeMO output relay driving fault
  501. "011013", //CCS output relay welding
  502. "011014", //CCS output relay driving fault
  503. "011015", //GB output relay welding
  504. "011016", //GB output relay driving fault
  505. "011017", //AC connector temperature sensor broken
  506. "011018", //CHAdeMO connector temperature sensor broken
  507. "011019", //CCS connector temperature sensor broken
  508. "011020", //GB connector temperature sensor broken
  509. "011021", //WiFi module broken
  510. "011022", //3G/4G module broken
  511. "011023", //Aux. power module broken
  512. "011024", //Relay control module /smart box broken
  513. "011025", //CHAdeMO connector lock fail
  514. "011026", //GB connector lock fail
  515. "011027", //AC connector lock fail
  516. "011028", //CHAdeMO module broken
  517. "011029", //CCS module broken
  518. "011030", //GBT module broken
  519. "011031", //PSU module broken
  520. "011032" //Reserved
  521. };
  522. struct FaultCodeData
  523. {
  524. unsigned char PreviousFaultVal[4];
  525. union
  526. {
  527. unsigned char FaultVal[4];
  528. struct
  529. {
  530. //FaultVal[0]
  531. unsigned char ChademoOutputFuseBlew:1; //bit 0
  532. unsigned char CcsOutputFuseBlew:1; //bit 1
  533. unsigned char GbOutputFuseBlew:1; //bit 2
  534. unsigned char RcdSelfTestFail:1; //bit 3
  535. unsigned char AcInputContactor1Welding:1; //bit 4
  536. unsigned char AcInputContactor1DrivingFault:1; //bit 5
  537. unsigned char AcInputContactor2Welding:1; //bit 6
  538. unsigned char AcInputContactor2DrivingFault:1; //bit 7
  539. //FaultVal[1]
  540. unsigned char AcOutputRelayWelding:1; //bit 0
  541. unsigned char AcOutputRelayDrivingFault:1; //bit 1
  542. unsigned char ChademoOutputRelayWelding:1; //bit 2
  543. unsigned char ChademoOutputRelayDrivingFault :1; //bit 3
  544. unsigned char CcsOutputRelayWelding:1; //bit 4
  545. unsigned char CcsOutputRelayDrivingFault:1; //bit 5
  546. unsigned char GbOutputRelayWelding:1; //bit 6
  547. unsigned char GbOutputRelayDrivingFault:1; //bit 7
  548. //FaultVal[2]
  549. unsigned char AcConnectorTempSensorBroken:1; //bit 0
  550. unsigned char ChademoConnectorTempSensorBroken:1; //bit 1
  551. unsigned char CcsConnectorTempSensorBroken:1; //bit 2
  552. unsigned char GbConnectorTempSensorBroken:1; //bit 3
  553. unsigned char WiFiModuleBroken:1; //bit 4
  554. unsigned char Telecom4GModuleBroken:1; //bit 5
  555. unsigned char AuxPowerModuleBroken:1; //bit 6
  556. unsigned char RelayControlModuleBroken :1; //bit 7
  557. //FaultVal[3]
  558. unsigned char ChademoConnectorLockFail:1; //bit 0
  559. unsigned char GbConnectorLockFail:1; //bit 1
  560. unsigned char AcConnectorLockFail:1; //bit 2
  561. unsigned char ChademoModuleBroken:1; //bit 3
  562. unsigned char CcsModuleBroken:1; //bit 4
  563. unsigned char GbModuleBroken:1; //bit 5
  564. unsigned char PsuModuleBroken:1; //bit 6
  565. unsigned char :1; //bit 7 reserved
  566. }bits;
  567. }FaultEvents;
  568. };
  569. char AlarmStatusCode[128][6]=
  570. {
  571. "012200", //System L1 input OVP
  572. "012201", //System L2 input OVP
  573. "012202", //System L3 input OVP
  574. "012203", //System L1 input UVP
  575. "012204", //System L2 input UVP
  576. "012205", //System L3 input UVP
  577. "012206", //PSU L1 input OVP
  578. "012207", //PSU L2 input OVP
  579. "012208", //PSU L3 input OVP
  580. "012209", //PSU L1 input UVP
  581. "012210", //PSU L2 input UVP
  582. "012211", //PSU L3 input UVP
  583. "012212", //System L1 input drop
  584. "012213", //System L2 input drop
  585. "012214", //System L3 input drop
  586. "012215", //System AC output OVP
  587. "012216", //System AC output OCP
  588. "012217", //System CHAdeMO output OVP
  589. "012218", //System CHAdeMO output OCP
  590. "012219", //System CCS output OVP
  591. "012220", //System CCS output OCP
  592. "012221", //System GB output OVP
  593. "012222", //System GB output OCP
  594. "012223", //System ambient/inlet OTP
  595. "012224", //System critical point OTP
  596. "012225", //PSU ambient/inlet OTP
  597. "012226", //PSU critical point OTP
  598. "012227", //Aux. power module OTP
  599. "012228", //Relay board/smart box OTP
  600. "012229", //CHAdeMO connector OTP
  601. "012230", //CCS connector OTP
  602. "012231", //GB connector OTP
  603. "012232", //AC connector OTP
  604. "012233", //RCD/CCID trip
  605. "012234", //CHAdeMO GFD trip
  606. "012235", //CCS GFD trip
  607. "012236", //GB GFD trip
  608. "012237", //SPD trip
  609. "012238", //Main power breaker trip
  610. "012239", //Aux. power breaker trip
  611. "012240", //PSU communication fail
  612. "012241", //WiFi module communication fail
  613. "012242", //3G/4G module communication fail
  614. "012243", //RFID module communication fail
  615. "012244", //Bluetooth module communication fail
  616. "012245", //LCM module communication fail
  617. "012246", //Aux. power module communication fail
  618. "012247", //Relay control boaed/smart box communication fail
  619. "012248", //CCS module communication fail
  620. "012249", //CHAdeMO module communication fail
  621. "012250", //GBT module communication fail
  622. "012251", //Emergency stop
  623. "012252", //Door open
  624. "012253", //System fan decay
  625. "012254", //Fail to create share memory
  626. "012255", //CSU initialization failed
  627. "012256", //AC Ground Fault
  628. "012257", //MCU self-test Fault
  629. "012258", //Relay self-test Fault
  630. "012259", //CHAdeMO groundfault detection timeout (GFD)
  631. "012260", //CCS groundfault detection timeout (GFD)
  632. "012261", //GB groundfault detection timeout (GFD)
  633. "012262", //Circuit Short
  634. "012263", // PSU Duplicate ID
  635. "012264", // PSU Output Short Circuit
  636. "012265", // PSU Discharge Abnormal
  637. "012266", // PSU Dc Side ShutDown
  638. "012267", // PSU Failure Alarm
  639. "012268", // PSU Protection Alarm
  640. "012269", // PSU FanFailure Alarm
  641. "012270", // PSU Input UVP
  642. "012271", // PSU Input OVP
  643. "012272", // PSU WalkIn State
  644. "012273", // PSU Power Limited State
  645. "012274", // PSU Id Repeat
  646. "012275", // PSU Severe Uneven Current
  647. "012276", // PSU Three Phase Input Inadequate
  648. "012277", // PSU Three Phase Onput Imbalance
  649. "012278", // PSU Ffc Side ShutDown
  650. "012279", // NO PSU Resource
  651. "012280", // Self test Failed due to communication of Relayboard failure
  652. "012281", // Self test Failed due to communication of Fanboard failure
  653. "012282", // Self test Failed due to communication of Primary failure
  654. "012283", // Self test Failed due to communication of Chademoboard failure
  655. "012284", // Self test Failed due to communication of CCSboard failure
  656. "012285", // Self test Failed due to AC Contact failure
  657. "012286", // Self test Failed due to communication of PSU failure
  658. "012287", // Self test Failed due to Model name is none match
  659. "012288", // CCS output UVP
  660. "012289", // Chademo output UVP
  661. "012290", // GBT output UVP
  662. "012291", // Self test Failed due to communication of GBTboard failure
  663. };
  664. struct AlarmCodeData
  665. {
  666. unsigned char PreviousAlarmVal[12];
  667. union
  668. {
  669. unsigned char AlarmVal[12];
  670. struct
  671. {
  672. //AlarmVal[0]
  673. unsigned char SystemL1InputOVP:1; //bit 0
  674. unsigned char SystemL2InputOVP:1; //bit 1
  675. unsigned char SystemL3InputOVP:1; //bit 2
  676. unsigned char SystemL1InputUVP:1; //bit 3
  677. unsigned char SystemL2InputUVP:1; //bit 4
  678. unsigned char SystemL3InputUVP:1; //bit 5
  679. unsigned char PsuL1InputOVP:1; //bit 6
  680. unsigned char PsuL2InputOVP:1; //bit 7
  681. //AlarmVal[1]
  682. unsigned char PsuL3InputOVP:1; //bit 0
  683. unsigned char PsuL1InputUVP:1; //bit 1
  684. unsigned char PsuL2InputUVP:1; //bit 2
  685. unsigned char PsuL3InputUVP :1; //bit 3
  686. unsigned char SystemL1InputDrop:1; //bit 4
  687. unsigned char SystemL2InputDrop:1; //bit 5
  688. unsigned char SystemL3InputDrop:1; //bit 6
  689. unsigned char SystemAcOutputOVP:1; //bit 7
  690. //AlarmVal[2]
  691. unsigned char SystemAcOutputOCP:1; //bit 0
  692. unsigned char SystemChademoOutputOVP:1; //bit 1
  693. unsigned char SystemChademoOutputOCP:1; //bit 2
  694. unsigned char SystemCcsOutputOVP:1; //bit 3
  695. unsigned char SystemCcsOutputOCP:1; //bit 4
  696. unsigned char SystemGbOutputOVP:1; //bit 5
  697. unsigned char SystemGbOutputOCP:1; //bit 6
  698. unsigned char SystemAmbientOTP :1; //bit 7
  699. //AlarmVal[3]
  700. unsigned char SystemCriticalPointOTP:1; //bit 0
  701. unsigned char PsuAmbientOTP:1; //bit 1
  702. unsigned char PsuCriticalPointOTP:1; //bit 2
  703. unsigned char AuxPowerModuleOTP:1; //bit 3
  704. unsigned char RelayBoardOTP:1; //bit 4
  705. unsigned char ChademoConnectorOTP:1; //bit 5
  706. unsigned char CcsConnectorOTP:1; //bit 6
  707. unsigned char GbConnectorOTP:1; //bit 7
  708. //AlarmVal[4]
  709. unsigned char AcConnectorOTP:1; //bit 0
  710. unsigned char RcdTrip:1; //bit 1
  711. unsigned char ChademoGfdTrip:1; //bit 2
  712. unsigned char CcsGfdTrip:1; //bit 3
  713. unsigned char GbGfdTrip:1; //bit 4
  714. unsigned char SpdTrip:1; //bit 5
  715. unsigned char MainPowerBreakerTrip:1; //bit 6
  716. unsigned char AuxPowerBreakerTrip:1; //bit 7
  717. //AlarmVal[5]
  718. unsigned char PsuCommunicationFail:1; //bit 0
  719. unsigned char WiFiModuleCommFail:1; //bit 1
  720. unsigned char Telecom4GModuleCommFail:1; //bit 2
  721. unsigned char RfidModuleCommFail:1; //bit 3
  722. unsigned char BluetoothModuleCommFail:1; //bit 4
  723. unsigned char LcmModuleCommFail:1; //bit 5
  724. unsigned char AuxPowerModuleCommFail:1; //bit 6
  725. unsigned char RelayBoardCommFail:1; //bit 7
  726. //AlarmVal[6]
  727. unsigned char CcsModuleCommFail:1; //bit 0
  728. unsigned char ChademoModuleCommFail:1; //bit 1
  729. unsigned char GbModuleCommFail:1; //bit 2
  730. unsigned char EmergencyStopTrip:1; //bit 3
  731. unsigned char DoorOpen:1; //bit 4
  732. unsigned char SystemFanDecay:1; //bit 5
  733. unsigned char FailToCreateShareMemory:1; //bit 6
  734. unsigned char CsuInitFailed:1; //bit 7
  735. //AlarmVal[7]
  736. unsigned char AcGroundfaultFail:1; //bit 0
  737. unsigned char McuSelftestFail:1; //bit 1
  738. unsigned char RelaySelftestFail:1; //bit 2
  739. unsigned char ChademoGroundfaultTimeout:1; //bit 3
  740. unsigned char CcsGroundfaultTimeout:1; //bit 4
  741. unsigned char GbGroundfaultTimeout:1; //bit 5
  742. unsigned char CircuitShort:1; //bit 6
  743. unsigned char PsuDuplicateID:1; //bit 7
  744. //AlarmVal[8]
  745. unsigned char PsuOutputShortCircuit :1; //bit 0
  746. unsigned char PsuDischargeAbnormal :1; //bit 1
  747. unsigned char PsuDcSideShutDown :1; //bit 2
  748. unsigned char PsuFailureAlarm :1; //bit 3
  749. unsigned char PsuProtectionAlarm :1; //bit 4
  750. unsigned char PsuFanFailureAlarm :1; //bit 5
  751. unsigned char PsuInputUVP:1; //bit 6
  752. unsigned char PsuInputOVP:1; //bit 7
  753. //AlarmVal[9]
  754. unsigned char PsuWalkInState :1; //bit 0
  755. unsigned char PsuPowerLimitedState :1; //bit 1
  756. unsigned char PsuIdRepeat :1; //bit 2
  757. unsigned char PsuSevereUnevenCurrent :1; //bit 3
  758. unsigned char PsuThreePhaseInputInadequate :1; //bit 4
  759. unsigned char PsuThreePhaseOnputImbalance :1; //bit 5
  760. unsigned char PsuFfcSideShutDown :1; //bit 6
  761. unsigned char PsuNoResource:1;
  762. //AlarmVal[10]
  763. unsigned char RelayboardStestFail :1; //bit 0
  764. unsigned char FanboardStestFail :1; //bit 1
  765. unsigned char PrimaryStestFail :1; //bit 2
  766. unsigned char ChademoboardStestFail :1; //bit 3
  767. unsigned char CCSboardStestFail :1; //bit 4
  768. unsigned char AcContactStestFail :1; //bit 5
  769. unsigned char PsuModuleStestFail :1; //bit 6
  770. unsigned char ModelNameNoneMatchStestFail:1; //bit 7
  771. //AlarmVal[11]
  772. unsigned char CcsOutputUVPFail :1; //bit 0
  773. unsigned char ChademoOutputUVPFail :1; //bit 1
  774. unsigned char GbtOutputUVPFail :1; //bit 2
  775. unsigned char GbtboardStestFail :1; //bit 3
  776. unsigned char :4; //bit 4 ~ 7
  777. }bits;
  778. }AlarmEvents;
  779. };
  780. char InfoStatusCode[256][6]=
  781. {
  782. //Information comes from EVSE
  783. "013600", //Normal stop charging by user
  784. "013601", //Charging Time's up
  785. "013602", //Replace system air filter
  786. "013603", //Reach to CHAdeMO max. plugging times.
  787. "013604", //Reach to CCS max. plugging times.
  788. "013605", //Reach to GB max. plugging times.
  789. "013606", //Reach to AC max. plugging times.
  790. "013607", //CSU fimrware update fail
  791. "013608", //CHAdeMO Module fimrware update fail
  792. "013609", //CCS Module fimrware update fail
  793. "013610", //GB Module fimrware update fail
  794. "013611", //Aux. power module fimrware update fail
  795. "013612", //Relay control module fimrware update fail
  796. "013613", //LCM module fimrware update fail
  797. "013614", //Bluetooth module fimrware update fail
  798. "013615", //WiFi module fimrware update fail
  799. "013616", //3G/4G module fimrware update fail
  800. "013617", //SMR fimrware update fail
  801. "013618", //RFID module fimrware update fail
  802. "013619", //configured by USB flash drive
  803. "013620", //configured by backend
  804. "013621", //configured by webpage
  805. "013622", //disconnected from Internet through Ethernet
  806. "013623", //disconnected from Internet through WiFi
  807. "013624", //disconnected from Internet through 3G/4G
  808. "013625", //disconnected from AP through WiFi
  809. "013626", //disconnected from APN through 3G/4G
  810. "013627", //Reserved
  811. "013628", //Reserved
  812. "013629", //Reserved
  813. "013630", //Reserved
  814. "013631", //Reserved
  815. //Information comes from EV
  816. "023700", //CHAdeMO EV communication Fail
  817. "023701", //CCS EV communication Fail
  818. "023702", //GB EV communication Fail
  819. "023703", //AC: pilot fault
  820. "023704", //CHAdeMO: battery malfunction
  821. "023705", //CHAdeMO: no charging permission
  822. "023706", //CHAdeMO: battery incompatibility
  823. "023707", //CHAdeMO: battery OVP
  824. "023708", //CHAdeMO: battery UVP
  825. "023709", //CHAdeMO: battery OTP
  826. "023710", //CHAdeMO: battery current difference
  827. "023711", //CHAdeMO: battery voltage difference
  828. "023712", //CHAdeMO: shift position
  829. "023713", //CHAdeMO: battery other fault
  830. "023714", //CHAdeMO: charging system error
  831. "023715", //CHAdeMO: EV normal stop
  832. "023716", //CHAdeMO: connector temperature sensor broken
  833. "023717", //CHAdeMO: connector lock fail
  834. "023718", //CHAdeMO: D1 ON No Receive
  835. "023719", //CHAdeMO: BMS K to J Timeout
  836. "023720", //CHAdeMO: BMS Charge Allow Timeout
  837. "023721", //CHAdeMO: Wait GroundFault Timeout
  838. "023722", //CHAdeMO: BMS EV Relay Timeout
  839. "023723", //CHAdeMO: BMS Request Current Timeout
  840. "023724", //CHAdeMO: BMS K to J OFF Timeout
  841. "023725", //CHAdeMO: BMS EV Relay OFF Timeout
  842. "023726", //CHAdeMO: ADC More Than 10V
  843. "023727", //CHAdeMO: ADC More Than 20V
  844. "023728", //CHAdeMO: BMS Charge Before Stop
  845. "023729", //CHAdeMO: Charger Get Normal Stop
  846. "023730", //CHAdeMO: Charger Get Emergency Stop
  847. "023731", //CHAdeMO: Isolation Result Fail
  848. "023732", //CHAdeMO: Miss Link With MotherBoard
  849. "023733", //CHAdeMO: Output Voltage More Than Limit
  850. "023734", //CHAdeMO: Request Current More Than Limit
  851. "023735", //CHAdeMO: Re Cap BMS Eqr Current Exceed
  852. "023736", //CHAdeMO: Charge Remain Count Down
  853. "023737", //CCS:CCS_EVCC_EVErrorCode_FAILED_RESSTemperatureInhibit
  854. "023738", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVShiftPosition
  855. "023739", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargerConnectorLockFault
  856. "023740", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVRESSMalfunction
  857. "023741", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingCurrentdifferential
  858. "023742", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingVoltageOutOfRange
  859. "023743", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingSystemIncompatibility
  860. "023744", //CCS:CCS_EVCC_EVErrorCode_FAILED_EmergencyEvent
  861. "023745", //CCS:CCS_EVCC_EVErrorCode_FAILED_Breaker
  862. "023746", //CCS:CCS_EVCC_EVErrorCode_FAILED_NoData
  863. "023747", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_A
  864. "023748", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_B
  865. "023749", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_C
  866. "023750", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_1
  867. "023751", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_2
  868. "023752", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_3
  869. "023753", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_1
  870. "023754", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_2
  871. "023755", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_3
  872. "023756", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_4
  873. "023757", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_5
  874. "023758", //CCS:CCS_SECC_ResponseCode_FAILED_SequenceError
  875. "023759", //CCS:CCS_SECC_ResponseCode_FAILED_SignatureError
  876. "023760", //CCS:CCS_SECC_ResponseCode_FAILED_UnknownSession
  877. "023761", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceIDInvalid
  878. "023762", //CCS:CCS_SECC_ResponseCode_FAILED_Payment SelectionInvalid
  879. "023763", //CCS:CCS_SECC_ResponseCode_FAILED_IdentificationSelectionInvalid
  880. "023764", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceSelectionInvalid
  881. "023765", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateExpired
  882. "023766", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotYetValid
  883. "023767", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateRevoked
  884. "023768", //CCS:CCS_SECC_ResponseCode_FAILED_NoCertificateAvailable
  885. "023769", //CCS:CCS_SECC_ResponseCode_FAILED_CertChainError
  886. "023770", //CCS:CCS_SECC_ResponseCode_FAILED_CertValidationError
  887. "023771", //CCS:CCS_SECC_ResponseCode_FAILED_CertVerificationError
  888. "023772", //CCS:CCS_SECC_ResponseCode_FAILED_ContractCanceled
  889. "023773", //CCS:CCS_SECC_ResponseCode_FAILED_ChallengeInvalid
  890. "023774", //CCS:CCS_SECC_ResponseCode_FAILED_WrongEnergyTransferMode
  891. "023775", //CCS:CCS_SECC_ResponseCode_FAILED_WrongChargeParameter
  892. "023776", //CCS:CCS_SECC_ResponseCode_FAILED_ChargingProfileInvalid
  893. "023777", //CCS:CCS_SECC_ResponseCode_FAILED_TariffSelectionInvalid
  894. "023778", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEPresentVoltageToLow
  895. "023779", //CCS:CCS_SECC_ResponseCode_FAILED_PowerDeliveryNotApplied
  896. "023780", //CCS:CCS_SECC_ResponseCode_FAILED_MeteringSignatureNotValid
  897. "023781", //CCS:CCS_SECC_ResponseCode_FAILED_NoChargeServiceSelected
  898. "023782", //CCS:CCS_SECC_ResponseCode_FAILED_ContactorError
  899. "023783", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotAllowedAtThisEVSE
  900. "023784", //CCS:CCS_SECC_ResponseCode_FAILED_GAChargeStop
  901. "023785", //CCS:CCS_SECC_ResponseCode_FAILED_AlignmentError
  902. "023786", //CCS:CCS_SECC_ResponseCode_FAILED_ACDError
  903. "023787", //CCS:CCS_SECC_ResponseCode_FAILED_AssociationError
  904. "023788", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEChargeAbort
  905. "023789", //CCS:CCS_SECC_ResponseCode_FAILED_NoSupportedApp-Protocol-Protocol
  906. "023790", //CCS:CCS_SECC_ResponseCode_FAILED_ContractNotAccepted
  907. "023791", //CCS:CCS_SECC_ResponseCode_FAILED_MOUnknown
  908. "023792", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_Prov_CertificateRevoke
  909. "023793", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA1_CertificateRevoked
  910. "023794", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA2_CertificateRevoked
  911. "023795", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_RootCA_CertificateRevoked
  912. "023796", //CCS:CCS_SECC_ResponseCode_FAILED_MO_Prov_CertificateRevoked
  913. "023797", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA1_CertificateRevoked
  914. "023798", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA2_CertificateRevoked
  915. "023799", //CCS:CCS_SECC_ResponseCode_FAILED_MO_RootCA_CertificateRevoked
  916. "023800", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_Prov_CertificateRevoked
  917. "023801", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA1_CertificateRevoked
  918. "023802", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA2_CertificateRevoked
  919. "023803", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_RootCA_CertificateRevoked
  920. "023804", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_1
  921. "023805", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_2
  922. "023806", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_3
  923. "023807", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_4
  924. "023808", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_5
  925. "023809", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_SLAC_init
  926. "023810", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_match_response
  927. "023811", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_match_sequence
  928. "023812", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_match_MNBC
  929. "023813", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_EVSE_avg_atten_calc
  930. "023814", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_match_response
  931. "023815", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_EVSE_match_session
  932. "023816", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_assoc_session
  933. "023817", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_vald_toggle
  934. "023818", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_1
  935. "023819", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_2
  936. "023820", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_3
  937. "023821", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_4
  938. "023822", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_5
  939. "023823", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_UDP_TT_match_join
  940. "023824", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TCP_TT_match_join
  941. "023825", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_amp_map_exchange
  942. "023826", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_link_ready_notification
  943. "023827", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_1
  944. "023828", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_2
  945. "023829", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_3
  946. "023830", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_4
  947. "023831", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_5
  948. "023832", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SupportedAppProtocolRes
  949. "023833", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionSetupRes
  950. "023834", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServiceDiscoveryRes
  951. "023835", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServicePaymentSelectionRes
  952. "023836", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ContractAuthenticationRes
  953. "023837", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ChargeParameterDiscoveryRes
  954. "023838", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PowerDeliveryRes
  955. "023839", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CableCheckRes
  956. "023840", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PreChargeRes
  957. "023841", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CurrentDemandRes
  958. "023842", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_WeldingDetectionRes
  959. "023843", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionStopRes
  960. "023844", //CCS:CCS_SECC_TIMEOUT_V2G_Sequence_Time
  961. "023845", //CCS:CCS_SECC_TIMEOUT_V2G_ReadyToCharge_Performance_Time
  962. "023846", //CCS:CCS_SECC_TIMEOUT_V2G_CommunicationSetup_Performance_Time
  963. "023847", //CCS:CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time
  964. "023848", //CCS:CCS_SECC_TIMEOUT_V2G_CPState_Detection_Time
  965. "023849", //CCS:CCS_SECC_TIMEOUT_V2G_CPOscillator_Retain_Time
  966. "023850", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_1
  967. "023851", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_2
  968. "023852", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_3
  969. "023853", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_4
  970. "023854", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_5
  971. "023855", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_TARGET_INFO
  972. "023856", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_TARGET_INFO
  973. "023857", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_BATTERY_INFO
  974. "023858", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_BATTERY_INFO
  975. "023859", //CCS:CCS_CAN_TIMEOUT_TP_EV_STOP_EVENT
  976. "023860", //CCS:CCS_CAN_TIMEOUT_TT_EV_STOP_EVENT
  977. "023861", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_STOP_EVENT
  978. "023862", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_STOP_EVENT
  979. "023863", //CCS:CCS_CAN_TIMEOUT_TP_GET_MISC_INFO
  980. "023864", //CCS:CCS_CAN_TIMEOUT_TT_GET_MISC_INFO
  981. "023865", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_REQUEST
  982. "023866", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_REQUEST
  983. "023867", //CCS:CCS_CAN_TIMEOUT_TP_START_BLOCK_TRANSFER
  984. "023868", //CCS:CCS_CAN_TIMEOUT_TT_START_BLOCK_TRANSFER
  985. "023869", //CCS:CCS_CAN_TIMEOUT_TP_DATA_TRANSFER
  986. "023870", //CCS:CCS_CAN_TIMEOUT_TT_DATA_TRANSFER
  987. "023871", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_FINISH
  988. "023872", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_FINISH
  989. "023873", //CCS:CCS_CAN_TIMEOUT_TP_ISOLATION_STATUS
  990. "023874", //CCS:CCS_CAN_TIMEOUT_TT_ISOLATION_STATUS
  991. "023875", //CCS:CCS_CAN_TIMEOUT_TP_CONNECTOR_INFO
  992. "023876", //CCS:CCS_CAN_TIMEOUT_TT_CONNECTOR_INFO
  993. "023877", //CCS:CCS_CAN_TIMEOUT_TT_RTC_INFO
  994. "023878", //CCS:CCS_CAN_TIMEOUT_TP_RTC_INFO
  995. "023879", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_PRECHARGE_INFO
  996. "023880", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_PRECHARGE_INFO
  997. "023881", //CCS:CCS_CAN_TIMEOUT_MSG_Sequence
  998. "023882", //CCS:CCS_CAN_MSG_Unrecognized_CMD_ID
  999. "023883", //CCS:CCS_SECC_DIN_Msg_Decode_Error
  1000. "023884", //CCS:CCS_SECC_DIN_Msg_Encode_Error
  1001. "023885", //CCS:CCS_SECC_ISO1_Msg_Decode_Error
  1002. "023886", //CCS:CCS_SECC_ISO1_Msg_Encode_Error
  1003. "023887", //CCS:CCS_SECC_ISO2_Msg_Decode_Error
  1004. "023888", //CCS:CCS_SECC_ISO2_Msg_Encode_Error
  1005. "023889", //CCS:CCS_SECC_CP_STATUS_Error
  1006. "013890", //Reserved
  1007. "013891", //Reserved
  1008. "013892", //Reserved
  1009. "013893", //Reserved
  1010. "013894", //Reserved
  1011. "013895", //Reserved
  1012. "013896", //Reserved
  1013. "013897", //Reserved
  1014. "013898", //Reserved
  1015. "013899", //Reserved
  1016. "033900", //disconnected from backend through Ethernet
  1017. "033901", //disconnected from backend through WiFi
  1018. "033902", //disconnected from backend through 3G/4G
  1019. "033903", //Remote start charging by backend
  1020. "033904", //Remote stop charging by backend
  1021. "033905", //Remote reset by backend
  1022. "033906", //Reserved
  1023. "033907", //Reserved
  1024. };
  1025. struct InfoCodeData
  1026. {
  1027. unsigned char PreviousInfoVal[30];
  1028. union
  1029. {
  1030. unsigned char InfoVal[30];
  1031. struct
  1032. {
  1033. //InfoVal[0]
  1034. unsigned char NormalStopChargingByUser:1; //bit 0
  1035. unsigned char ChargingTimesUp:1; //bit 1
  1036. unsigned char ReplaceSystemAirFilter:1; //bit 2
  1037. unsigned char ReachChademoMaxPluggingTimes:1; //bit 3
  1038. unsigned char ReachCcsMaxPluggingTimes:1; //bit 4
  1039. unsigned char ReachGbMaxPluggingTimes:1; //bit 5
  1040. unsigned char ReachAcMaxPluggingTimes:1; //bit 6
  1041. unsigned char CsuFimrwareUpdateFail:1; //bit 7
  1042. //InfoVal[1]
  1043. unsigned char ChademoModuleFimrwareUpdateFail:1; //bit 0
  1044. unsigned char CcsModuleFimrwareUpdateFail:1; //bit 1
  1045. unsigned char GbModuleFimrwareUpdateFail:1; //bit 2
  1046. unsigned char AuxPowerModuleFimrwareUpdateFail:1; //bit 3
  1047. unsigned char RelayBoardFimrwareUpdateFail:1; //bit 4
  1048. unsigned char LcmModuleFimrwareUpdateFail:1; //bit 5
  1049. unsigned char BluetoothModuleFimrwareUpdateFail:1; //bit 6
  1050. unsigned char WiFiModuleFimrwareUpdateFail:1; //bit 7
  1051. //InfoVal[2]
  1052. unsigned char Telocom4GModuleFimrwareUpdateFail:1; //bit 0
  1053. unsigned char PsuFimrwareUpdateFail:1; //bit 1
  1054. unsigned char RfidModuleFimrwareUpdateFail:1; //bit 2
  1055. unsigned char ConfiguredByUsbFlashDrive:1; //bit 3
  1056. unsigned char ConfiguredByBackend:1; //bit 4
  1057. unsigned char ConfiguredByWebpage:1; //bit 5
  1058. unsigned char InternetDisconnectViaEthernet:1; //bit 6
  1059. unsigned char InternetDisconnectViaWiFi :1; //bit 7
  1060. //InfoVal[3]
  1061. unsigned char InternetDisconnectVia4Gi:1; //bit 0
  1062. unsigned char ApDisconnectViaWiFi:1; //bit 1
  1063. unsigned char ApnDisconnectVia4Gi:1; //bit 2
  1064. unsigned char :5; //bit 3~7 reserved
  1065. //InfoVal[4]
  1066. unsigned char ChademoEvCommFail:1; //bit 0
  1067. unsigned char CcsEvCommFail:1; //bit 1
  1068. unsigned char GbEvCommFail:1; //bit 2
  1069. unsigned char PilotFault:1; //bit 3
  1070. unsigned char ChademoBatteryMalfun:1; //bit 4
  1071. unsigned char ChademoNoPermission:1; //bit 5
  1072. unsigned char ChademoBatteryIncompatibility:1; //bit 6
  1073. unsigned char ChademoBatteryOVP:1; //bit 7
  1074. //InfoVal[5]
  1075. unsigned char ChademoBatteryUVP:1; //bit 0
  1076. unsigned char ChademoBatteryOTP:1; //bit 1
  1077. unsigned char ChademoBatteryCurrentDiff:1; //bit 2
  1078. unsigned char ChademoBatteryVoltageDiff:1; //bit 3
  1079. unsigned char ChademoShiftPosition:1; //bit 4
  1080. unsigned char ChademoBatteryOtherFault:1; //bit 5
  1081. unsigned char ChademoChargingSystemError:1; //bit 6
  1082. unsigned char ChademoEvNormalStop:1; //bit 7
  1083. //InfoVal[6]
  1084. unsigned char ChademoTempSensorBroken:1; //bit 0
  1085. unsigned char ChademoConnectorLockFail:1; //bit 1
  1086. unsigned char ChademoD1OnNoReceive:1; //bit 2
  1087. unsigned char ChademoBmsKtoJTimeout:1; //bit 3
  1088. unsigned char ChademoBmsChargeAllowTimeout:1; //bit 4
  1089. unsigned char ChademoWaitGfdTimeout:1; //bit 5
  1090. unsigned char ChademoBmsEvRelayTimeout:1; //bit 6
  1091. unsigned char ChademoBmsReqCurrentTimeout:1; //bit 7
  1092. //InfoVal[7]
  1093. unsigned char ChademoBmsKtoJOffTimeout :1; //bit 0
  1094. unsigned char ChademoBmsEvRelayOffTimeout :1; //bit 1
  1095. unsigned char ChademoAdcMoreThan10V :1; //bit 2
  1096. unsigned char ChademoAdcMoreThan20V :1; //bit 3
  1097. unsigned char ChademoBmsChargeBeforeStop :1; //bit 4
  1098. unsigned char ChademoChargerGetNormalStop :1; //bit 5
  1099. unsigned char ChademoChargerGetEmergencyStop :1; //bit 6
  1100. unsigned char ChademoIsolationResultFail :1; //bit 7
  1101. //InfoVal[8]
  1102. unsigned char ChademoMissLinkWithMotherBoard :1; //bit 0
  1103. unsigned char ChademoOutputVolMoreThanLimit :1; //bit 1
  1104. unsigned char ChademoReqCurrentMoreThanLimit :1; //bit 2
  1105. unsigned char ChademoReCapBmsEqrCurrentExceed :1; //bit 3
  1106. unsigned char ChademoChargeRemainCountDown :1; //bit 4
  1107. unsigned char CcsRESTemperatureInhibit:1; //bit 5
  1108. unsigned char CcsEVShiftPosition:1; //bit 6
  1109. unsigned char CcsChargerConnectorLockFault:1; //bit 7
  1110. //InfoVal[9]
  1111. unsigned char CcsEVRESSMalfunction:1; //bit 0
  1112. unsigned char CcsChargingCurrentdifferential:1; //bit 1
  1113. unsigned char CcsChargingVoltageOutOfRange:1; //bit 2
  1114. unsigned char CcsChargingSystemIncompatibility:1; //bit 3
  1115. unsigned char CcsEmergencyEvent:1; //bit 4
  1116. unsigned char CcsBreaker:1; //bit 5
  1117. unsigned char CcsNoData:1; //bit 6
  1118. unsigned char Ccsreserved_by_DIN_A:1; //bit 7
  1119. //InfoVal[10]
  1120. unsigned char Ccsreserved_by_DIN_B:1; //bit 0
  1121. unsigned char Ccsreserved_by_DIN_C:1; //bit 1
  1122. unsigned char Ccsreserved_by_ISO_1:1; //bit 2
  1123. unsigned char Ccsreserved_by_ISO_2:1; //bit 3
  1124. unsigned char Ccsreserved_by_ISO_3:1; //bit 4
  1125. unsigned char Ccsreserved_by_OEM_1:1; //bit 5
  1126. unsigned char Ccsreserved_by_OEM_2:1; //bit 6
  1127. unsigned char Ccsreserved_by_OEM_3:1; //bit 7
  1128. //InfoVal[11]
  1129. unsigned char Ccsreserved_by_OEM_4:1; //bit 0
  1130. unsigned char Ccsreserved_by_OEM_5:1; //bit 1
  1131. unsigned char CcsSequenceError:1; //bit 2
  1132. unsigned char CcsSignatureError:1; //bit 3
  1133. unsigned char CcsUnknownSession:1; //bit 4
  1134. unsigned char CcsServiceIDInvalid:1; //bit 5
  1135. unsigned char CcsPaymentSelectionInvalid:1; //bit 6
  1136. unsigned char CcsIdentificationSelectionInvalid:1; //bit 7
  1137. //InfoVal[12]
  1138. unsigned char CcsServiceSelectionInvalid:1; //bit 0
  1139. unsigned char CcsCertificateExpired:1; //bit 1
  1140. unsigned char CcsCertificateNotYetValid:1; //bit 2
  1141. unsigned char CcsCertificateRevoked:1; //bit 3
  1142. unsigned char CcsNoCertificateAvailable:1; //bit 4
  1143. unsigned char CcsCertChainError:1; //bit 5
  1144. unsigned char CcsCertValidationError:1; //bit 6
  1145. unsigned char CcsCertVerificationError:1; //bit 7
  1146. //InfoVal[13]
  1147. unsigned char CcsContractCanceled:1; //bit 0
  1148. unsigned char CcsChallengeInvalid:1; //bit 1
  1149. unsigned char CcsWrongEnergyTransferMode:1; //bit 2
  1150. unsigned char CcsWrongChargeParameter:1; //bit 3
  1151. unsigned char CcsChargingProfileInvalid:1; //bit 4
  1152. unsigned char CcsTariffSelectionInvalid:1; //bit 5
  1153. unsigned char CcsEVSEPresentVoltageToLow:1; //bit 6
  1154. unsigned char CcsPowerDeliveryNotApplied:1; //bit 7
  1155. //InfoVal[14]
  1156. unsigned char CcsMeteringSignatureNotValid:1; //bit 0
  1157. unsigned char CcsNoChargeServiceSelected:1; //bit 1
  1158. unsigned char CcsContactorError:1; //bit 2
  1159. unsigned char CcsCertificateNotAllowedAtThisEVSE:1; //bit 3
  1160. unsigned char CcsGAChargeStop:1; //bit 4
  1161. unsigned char CcsAlignmentError:1; //bit 5
  1162. unsigned char CcsACDError:1; //bit 6
  1163. unsigned char CcsAssociationError:1; //bit 7
  1164. //InfoVal[15]
  1165. unsigned char CcsEVSEChargeAbort:1; //bit 0
  1166. unsigned char CcsNoSupportedAppProtocol:1; //bit 1
  1167. unsigned char CcsContractNotAccepted:1; //bit 2
  1168. unsigned char CcsMOUnknown:1; //bit 3
  1169. unsigned char CcsOEM_Prov_CertificateRevoke:1; //bit 4
  1170. unsigned char CcsOEM_SubCA1_CertificateRevoked:1; //bit 5
  1171. unsigned char CcsOEM_SubCA2_CertificateRevoked:1; //bit 6
  1172. unsigned char CcsOEM_RootCA_CertificateRevoked:1; //bit 7
  1173. //InfoVal[16]
  1174. unsigned char CcsMO_Prov_CertificateRevoked:1; //bit 0
  1175. unsigned char CcsMO_SubCA1_CertificateRevoked:1; //bit 1
  1176. unsigned char CcsMO_SubCA2_CertificateRevoked:1; //bit 2
  1177. unsigned char CcsMO_RootCA_CertificateRevoked:1; //bit 3
  1178. unsigned char CcsCPS_Prov_CertificateRevoked:1; //bit 4
  1179. unsigned char CcsCPS_SubCA1_CertificateRevoked:1; //bit 5
  1180. unsigned char CcsCPS_SubCA2_CertificateRevoked:1; //bit 6
  1181. unsigned char CcsCPS_RootCA_CertificateRevoked:1; //bit 7
  1182. //InfoVal[17]
  1183. unsigned char :5; //bit 0~4 reserved
  1184. unsigned char CcsTT_EVSE_SLAC_init:1; //bit 5
  1185. unsigned char CcsTP_match_response:1; //bit 6
  1186. unsigned char CcsTT_match_sequence:1; //bit 7
  1187. //InfoVal[18]
  1188. unsigned char CcsTT_EVSE_match_MNBC:1; //bit 0
  1189. unsigned char CcsTP_EVSE_avg_atten_calc:1; //bit 1
  1190. unsigned char CcsTT_match_response:1; //bit 2
  1191. unsigned char CcsTP_EVSE_match_session:1; //bit 3
  1192. unsigned char CcsTT_EVSE_assoc_session:1; //bit 4
  1193. unsigned char CcsTT_EVSE_vald_toggle:1; //bit 5
  1194. unsigned char :2; //bit 6~7 reserved
  1195. //InfoVal[19]
  1196. unsigned char :3; //bit 0~2 reserved
  1197. unsigned char CcsUDP_TT_match_join:1; //bit 3
  1198. unsigned char CcsTCP_TT_match_join:1; //bit 4
  1199. unsigned char CcsTP_amp_map_exchange:1; //bit 5
  1200. unsigned char CcsTP_link_ready_notification:1; //bit 6
  1201. unsigned char :1; //bit 7 resetved
  1202. //InfoVal[20]
  1203. unsigned char :4; //bit 0~3 reserved
  1204. unsigned char CcsSupportedAppProtocolRes:1; //bit 4
  1205. unsigned char CcsSessionSetupRes:1; //bit 5
  1206. unsigned char CcsServiceDiscoveryRes:1; //bit 6
  1207. unsigned char CcsServicePaymentSelectionRes:1; //bit 7
  1208. //InfoVal[21]
  1209. unsigned char CcsContractAuthenticationRes:1; //bit 0
  1210. unsigned char CcsChargeParameterDiscoveryRes:1; //bit 1
  1211. unsigned char CcsPowerDeliveryRes:1; //bit 2
  1212. unsigned char CcsCableCheckRes:1; //bit 3
  1213. unsigned char CcsPreChargeRes:1; //bit 4
  1214. unsigned char CcsCurrentDemandRes:1; //bit 5
  1215. unsigned char CcsWeldingDetectionRes:1; //bit 6
  1216. unsigned char CcsSessionStopRes:1; //bit 7
  1217. //InfoVal[22]
  1218. unsigned char CcsSequence_Time:1; //bit 0
  1219. unsigned char CcsReadyToCharge_Performance_Time:1; //bit 1
  1220. unsigned char CcsCommunicationSetup_Performance_Time:1; //bit 2
  1221. unsigned char CcsCableCheck_Performance_Time:1; //bit 3
  1222. unsigned char CcsCPState_Detection_Time:1; //bit 4
  1223. unsigned char CcsCPOscillator_Retain_Time:1; //bit 5
  1224. unsigned char :2; //bit 6~7 reserved
  1225. //InfoVal[23]
  1226. unsigned char :3; //bit 0~2 reserved
  1227. unsigned char CcsTP_GET_EV_TARGET_INFO:1; //bit 3
  1228. unsigned char CcsTT_GET_EV_TARGET_INFO:1; //bit 4
  1229. unsigned char CcsTP_GET_EV_BATTERY_INFO:1; //bit 5
  1230. unsigned char CcsTT_GET_EV_BATTERY_INFO:1; //bit 6
  1231. unsigned char CcsTP_EV_STOP_EVENT:1; //bit 7
  1232. //InfoVal[24]
  1233. unsigned char CcsTT_EV_STOP_EVENT:1; //bit 0
  1234. unsigned char CcsTP_EVSE_STOP_EVENT:1; //bit 1
  1235. unsigned char CcsTT_EVSE_STOP_EVENT:1; //bit 2
  1236. unsigned char CcsTP_GET_MISC_INFO:1; //bit 3
  1237. unsigned char CcsTT_GET_MISC_INFO:1; //bit 4
  1238. unsigned char CcsTP_DOWNLOAD_REQUEST:1; //bit 5
  1239. unsigned char CcsTT_DOWNLOAD_REQUEST:1; //bit 6
  1240. unsigned char CcsTP_START_BLOCK_TRANSFER:1; //bit 7
  1241. //InfoVal[25]
  1242. unsigned char CcsTT_START_BLOCK_TRANSFER:1; //bit 0
  1243. unsigned char CcsTP_DATA_TRANSFER:1; //bit 1
  1244. unsigned char CcsTT_DATA_TRANSFER:1; //bit 2
  1245. unsigned char CcsTP_DOWNLOAD_FINISH:1; //bit 3
  1246. unsigned char CcsTT_DOWNLOAD_FINISH:1; //bit 4
  1247. unsigned char CcsTP_ISOLATION_STATUS:1; //bit 5
  1248. unsigned char CcsTT_ISOLATION_STATUS:1; //bit 6
  1249. unsigned char CcsTP_CONNECTOR_INFO:1; //bit 7
  1250. //InfoVal[26]
  1251. unsigned char CcsTT_CONNECTOR_INFO:1; //bit 0
  1252. unsigned char CcsTT_RTC_INFO:1; //bit 1
  1253. unsigned char CcsTP_RTC_INFO:1; //bit 2
  1254. unsigned char CcsTP_EVSE_PRECHARGE_INFO:1; //bit 3
  1255. unsigned char CcsTT_EVSE_PRECHARGE_INFO:1; //bit 4
  1256. unsigned char CcsMSG_Sequence:1; //bit 5
  1257. unsigned char CcsCAN_MSG_Unrecognized_CMD_ID:1; //bit 6
  1258. unsigned char CcsDIN_Msg_Decode_Error:1; //bit 7
  1259. //InfoVal[27]
  1260. unsigned char CcsDIN_Msg_Encode_Error:1; //bit 0
  1261. unsigned char CcsISO1_Msg_Decode_Error:1; //bit 1
  1262. unsigned char CcsISO1_Msg_Encode_Error:1; //bit 2
  1263. unsigned char CcsISO2_Msg_Decode_Error:1; //bit 3
  1264. unsigned char CcsISO2_Msg_Encode_Error:1; //bit 4
  1265. unsigned char CcsCpStatus_Error:1; //bit 5
  1266. unsigned char :2; //bit 6~7 reserved
  1267. //InfoVal[28]
  1268. unsigned char :8; //bit 0~8 reserved
  1269. //InfoVal[29]
  1270. unsigned char BackendDisconnectedViaEthernet:1; //bit 0
  1271. unsigned char BackendDisconnectViaWiFi:1; //bit 1
  1272. unsigned char BackendDisconnectVia4G:1; //bit 2
  1273. unsigned char BackendRemoteStart:1; //bit 3
  1274. unsigned char BackendRemoteStop:1; //bit 4
  1275. unsigned char BackendRemoteReset:1; //bit 5
  1276. unsigned char :2; //bit 6~7 reserved
  1277. }bits;
  1278. }InfoEvents;
  1279. };
  1280. struct StatusCodeData
  1281. {
  1282. struct FaultCodeData FaultCode;
  1283. struct AlarmCodeData AlarmCode;
  1284. struct InfoCodeData InfoCode;
  1285. };
  1286. /**************************************************************************************/
  1287. /**************************PSU Share memory***************************************/
  1288. /**************************************************************************************/
  1289. /*Following are the information for each PSU module*/
  1290. struct PsuModuleData
  1291. {
  1292. unsigned char AssignID;
  1293. unsigned char PhysicalID;
  1294. unsigned char GroupID;
  1295. unsigned char Address;
  1296. unsigned char FireWireIndex;
  1297. unsigned char FwVersion[16];
  1298. unsigned char SerialNumber[32];
  1299. unsigned char StateMachine; //0: Identification, 1:Operation, 2: Alarm, 3: Failure, s4:Upgrade
  1300. unsigned char OutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  1301. unsigned short FanSpeed_1; //RPM
  1302. unsigned short FanSpeed_2; //RPM
  1303. unsigned short FanSpeed_3; //RPM
  1304. unsigned short FanSpeed_4; //RPM
  1305. unsigned short InputVoltage_Type; //0x00 = Line to Line Vol, 0x01 = Line to Neutral Vol
  1306. unsigned short InputVoltageL1; //abcd=abc.d volt
  1307. unsigned short InputVoltageL2; //abcd=abc.d volt
  1308. unsigned short InputVoltageL3; //abcd=abc.d volt
  1309. unsigned short InputCurrentL1; //abcd=abc.d amp
  1310. unsigned short InputCurrentL2; //abcd=abc.d amp
  1311. unsigned short InputCurrentL3; //abcd=abc.d amp
  1312. unsigned short PresentOutputVoltage; //abcd=abc.d volt
  1313. unsigned short PresentOutputCurrent; //abcd=abc.d amp
  1314. unsigned short AvailableCurrent; //abcd=abc.d amp
  1315. unsigned int AvailablePower; //Watt
  1316. char CriticalTemp1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1317. char CriticalTemp2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1318. char CriticalTemp3; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1319. char ExletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1320. char InletTemp_1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1321. char InletTemp_2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1322. char InletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1323. char OutletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1324. unsigned int AlarmCode;
  1325. unsigned int FaultCode; //
  1326. unsigned int IAvailableCurrent; //abcd=abc.d amp
  1327. };
  1328. /*Following are the information for each PSU Group*/
  1329. struct PsuGroupData
  1330. {
  1331. unsigned char GroupPresentPsuQuantity;
  1332. unsigned char GroupOutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  1333. unsigned short GroupTargetOutputVoltage; //abcd=abc.d volt
  1334. unsigned short GroupTargetOutputCurrent; //abcd=abc.d amp
  1335. unsigned short GroupAvailableCurrent; //abcd=abc.d amp
  1336. unsigned int GroupAvailablePower; //Watt
  1337. unsigned short GroupPresentOutputVoltage; //abcd=abc.d volt
  1338. unsigned short GroupPresentOutputCurrent; //abcd=abc.d Amps
  1339. struct PsuModuleData PsuModule[MAX_PSU_QUANTITY];
  1340. };
  1341. /*Following is the information for system all PSU*/
  1342. struct PsuData
  1343. {
  1344. unsigned char SystemPresentPsuQuantity;
  1345. unsigned short SystemAvailableCurrent; //abcd=abc.d amp
  1346. unsigned int SystemAvailablePower; //Watt
  1347. struct PsuGroupData PsuGroup[4];
  1348. unsigned char GroupCount;
  1349. unsigned char Work_Step;
  1350. };
  1351. /************************************************************************************/
  1352. /**************************CHAdeMO protocol Share memory*********************/
  1353. /**************************************************************************************/
  1354. struct CHAdeMOEvData
  1355. {
  1356. unsigned char SupportDynamicControl; //110.0
  1357. // bit0=1:supported
  1358. unsigned char SupportHighCurrent; //110.0
  1359. // bit1=1:supported
  1360. unsigned char MiniChargeCurrent; //100.0 0~200(A) (unit:1A)
  1361. // 0x00: request for current equivalent to 1.5kW
  1362. // 0x01: no request
  1363. // 0x02: request of 1A and following are the same rule
  1364. unsigned short MaxiBatteryVoltage; //100.5,100.4 0~600(V) (unit:1V)
  1365. unsigned short MaxiChargingTime; //101.2,101.1 10(sec.)~255(min.) (Unit:sec)
  1366. // Set 0xFF to 101.1 (Unit: 10sec) in case 101.2 (Unit: 1min) is used
  1367. unsigned char EstimatChargingTime; //101.3 0~254(min.) (Unit:sec)
  1368. // Display Only
  1369. unsigned short TotalBatteryCapacity; //101.6,101.5 0.1~6553.5(kWh) (unit:0.1 kWh)
  1370. unsigned char ProtocolVersion; //102.0 0~255
  1371. // 0x02: CHAdeMO specification ver.1.2
  1372. unsigned short TargetBatteryVoltage; //102.2,102.1 0~600(V) (unit:1V)
  1373. unsigned short ChargingCurrentRequest; //102.3 0~200(A) (unit:1A)
  1374. //110.2,110.1 0~1023(A) (unit:1A)
  1375. unsigned char BatteryAlarm; //102.4 >0:alarm
  1376. // bit0=1:Battery overvoltage
  1377. // bit1=1:Battery undervoltage
  1378. // bit2=1:Battery current deviation error
  1379. // bit3=1:High battery temperature
  1380. // bit4=1:Battery voltage deviation error
  1381. unsigned char EvDetection; //102.5
  1382. // bit0=0:Vehicle charging disabled, (stop charging)
  1383. // bit0=1:Vehicle charging enabled,
  1384. // bit1=0:¡§Parking¡¨ position
  1385. // bit1=1:other position (stop charging)
  1386. // bit2=0:Charging system normal
  1387. // bit2=1:Charging system error (stop charging)
  1388. // bit3=0:EV contactor close or during welding detection
  1389. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  1390. // bit4=0:No stop request before charging
  1391. // bit4=1:Normal stop request before charging (stop charging)
  1392. unsigned char SOC; //102.6 0~100(%) (unit:%)
  1393. // Display Only
  1394. unsigned char Communicating; // it is true if receive EV CAN message within every 1500ms
  1395. unsigned char PresentMsgFlowStatus; //
  1396. };
  1397. struct CHAdeMOEvseData
  1398. {
  1399. unsigned char SelfTest_Comp;
  1400. unsigned char version[16]; //Chademo firmware version
  1401. unsigned char SupportDynamicControl; //118.0
  1402. // bit0=1:supported
  1403. unsigned char SupportHighCurrent; //118.0
  1404. // bit1=1:supported
  1405. unsigned short AvailableOutputVoltage; //108.2,108.1 0~600(V) (unit:1V)
  1406. unsigned short AvailableOutputCurrent; //108.3 0~255(A) (unit:1A)
  1407. //118.2,118.1 0~1023(A) (unit:1A)
  1408. unsigned short ThresholdVoltage; //108.5,108.4 0~600(V) (unit:1V)
  1409. unsigned char ConnectorTemperatureP; //108.6 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1410. unsigned char ConnectorTemperatureN; //108.7 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1411. unsigned char ProtocolVersion; //109.0 0~255
  1412. // 0x00: CHAdeMO specification 0.9 and earlier
  1413. // 0x01: CHAdeMO specification 0.9 and 0.9.1
  1414. // 0x02: CHAdeMO specification 1.0.0, 1.0.1, 1.1 and 1.2
  1415. unsigned short PresentOutputVoltage; //109.2,109.1 0~600(V) (unit:1V)
  1416. unsigned short PresentOutputCurrent; //109.3 0~255(A) (unit:1A)
  1417. //118.4,118.3 0~1023(A) (unit:1A)
  1418. unsigned char EvseDetection; //109.5
  1419. // bit0=0:not charging state now
  1420. // bit0=1:charging state now
  1421. // bit1=0:EVSE normal
  1422. // bit1=1:EVSE error
  1423. // bit2=0:Not Energizing state
  1424. // bit2=1:Energizing state
  1425. // bit3=0:No Battery incompatibility
  1426. // bit3=1:Battery incompatibility
  1427. // bit4=0:No Charging system error
  1428. // bit4=1:Charging system error
  1429. // bit5=0:No Charging stop control
  1430. // bit5=1:Charging stop control
  1431. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  1432. // Set 0xFF to 109.6 (Unit: 10sec) in case 109.7 (Unit: 1min) is used
  1433. unsigned char HighPowerCondition; //118.5
  1434. // bit0=0:Present charging current H¡¦118.3,H¡¦118.4¡¨ is less than or equal to rated current of a charging cable
  1435. // bit0=1:Present charging current H¡¦118.3,H¡¦118.4¡¨ is exceeds to rated current of a charging cable
  1436. // bit1=1:charging cable Cooling function Operating Installed
  1437. // bit2=1:charging cable Current limiting function
  1438. // bit3=1:charging connector Cooling function Operating
  1439. // bit4=1:charging connector Current limiting function Installed
  1440. // bit5=1:charging connector Over-temperature protection Installed
  1441. // bit6=1:Functional safety Applied
  1442. unsigned int MaxiGroupPower; // XXXXXXXX (Unit:Watt)depend on which group to be used
  1443. unsigned int MaxiGroupCurrent; // XXXXXXXX (unit:1A)depend on which group to be used
  1444. unsigned short ApplyOutputVoltage; // 0~600(V) (unit:1V)
  1445. unsigned short ElapseChargingTime; // (Unit:sec)
  1446. unsigned short ElapseEnergy; // (Unit:10xkWh)
  1447. unsigned char EvboardStatus; // 0 : init
  1448. };
  1449. struct CHAdeMOData
  1450. {
  1451. struct CHAdeMOEvData ev[CHAdeMO_QUANTITY];
  1452. struct CHAdeMOEvseData evse[CHAdeMO_QUANTITY];
  1453. };
  1454. /************************************************************************************/
  1455. /**************************GBT protocol Share memory*********************/
  1456. /**************************************************************************************/
  1457. struct GBTEvData
  1458. {
  1459. unsigned short MaxiBatteryVoltage; // 0~600(V) (unit:1V)
  1460. unsigned short MaxiChargingTime; // 10(sec.)~255(min.) (Unit:sec)
  1461. unsigned char EstimatChargingTime; // 0~254(min.) (Unit:sec)
  1462. unsigned short TotalBatteryCapacity; // 0.1~6553.5(kWh) (unit:0.1 kWh)
  1463. unsigned char ProtocolVersion; // 0~255
  1464. unsigned short TargetBatteryVoltage; // 0~600(V) (unit:1V)
  1465. unsigned short ChargingCurrentRequest; // 0~200(A) (unit:1A)
  1466. // 0~1023(A) (unit:1A)
  1467. unsigned char EvDetection; //102.5
  1468. // bit0=0:Vehicle charging disabled, (stop charging)
  1469. // bit0=1:Vehicle charging enabled,
  1470. // bit1=0:¡§Parking¡¨ position
  1471. // bit1=1:other position (stop charging)
  1472. // bit2=0:Charging system normal
  1473. // bit2=1:Charging system error (stop charging)
  1474. // bit3=0:EV contactor close or during welding detection
  1475. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  1476. // bit4=0:No stop request before charging
  1477. // bit4=1:Normal stop request before charging (stop charging)
  1478. unsigned char SOC; //102.6 0~100(%) (unit:%)
  1479. // Display Only
  1480. unsigned char PresentMsgFlowStatus; //
  1481. };
  1482. struct GBTEvseData
  1483. {
  1484. unsigned char SelfTest_Comp;
  1485. unsigned char version[16]; // GBT firmware version
  1486. unsigned short AvailableOutputVoltage; // 0~600(V) (unit:1V)
  1487. unsigned short AvailableOutputCurrent; // 0~255(A) (unit:1A)
  1488. unsigned char ConnectorTemperatureP; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1489. unsigned char ConnectorTemperatureN; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1490. unsigned short PresentOutputVoltage; // 0~600(V) (unit:1V)
  1491. unsigned short PresentOutputCurrent; // 0~255(A) (unit:1A)
  1492. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  1493. unsigned char EvboardStatus; // 0 : init
  1494. };
  1495. struct GBTData
  1496. {
  1497. struct GBTEvData ev[GB_QUANTITY];
  1498. struct GBTEvseData evse[GB_QUANTITY];
  1499. };
  1500. /************************************************************************************/
  1501. /**************************CCS protocol Share memory***************************/
  1502. /**************************DIN70121: 201412***************************************/
  1503. /**************************ISO15118_2014: 2014************************************/
  1504. /**************************ISO15118_2018: 2018************************************/
  1505. /************************************************************************************/
  1506. typedef enum boolean { FALSE, TRUE } BOOL;
  1507. enum ResponseCodeType_DIN70121 { OK_DIN70121 = 0, OK_NewSessionEstablished_DIN70121 = 1, OK_OldSessionJoined_DIN70121 = 2, OK_CertificateExpiresSoon_DIN70121 = 3,
  1508. FAILED_DIN70121 = 4, FAILED_SequenceError_DIN70121 = 5, FAILED_ServiceIDInvalid_DIN70121 = 6, FAILED_UnknownSession_DIN70121 = 7,
  1509. FAILED_ServiceSelectionInvalid_DIN70121 = 8, FAILED_PaymentSelectionInvalid_DIN70121 = 9, FAILED_CertificateExpired_DIN70121 = 10,
  1510. FAILED_SignatureError_DIN70121 = 11, FAILED_NoCertificateAvailable_DIN70121 = 12, FAILED_CertChainError_DIN70121 = 13, FAILED_ChallengeInvalid_DIN70121 = 14,
  1511. FAILED_ContractCanceled_DIN70121 = 15, FAILED_WrongChargeParameter_DIN70121 = 16, FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  1512. FAILED_TariffSelectionInvalid_DIN70121 = 18, FAILED_ChargingProfileInvalid_DIN70121 = 19, FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  1513. FAILED_MeteringSignatureNotValid_DIN70121 = 21, FAILED_WrongEnergyTransferType_DIN70121 = 22};
  1514. enum ResponseCodeType_ISO15118_2014 { OK_ISO15118_2014 = 0, OK_NewSessionEstablished_ISO15118_2014 = 1, OK_OldSessionJoined_ISO15118_2014 = 2, OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  1515. FAILED_ISO15118_2014 = 4, FAILED_SequenceError_ISO15118_2014 = 5, FAILED_ServiceIDInvalid_ISO15118_2014 = 6, FAILED_UnknownSession_ISO15118_2014 = 7,
  1516. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8, FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9, FAILED_CertificateExpired_ISO15118_2014 = 10,
  1517. FAILED_SignatureError_ISO15118_2014 = 11, FAILED_NoCertificateAvailable_ISO15118_2014 = 12, FAILED_CertChainError_ISO15118_2014 = 13, FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  1518. FAILED_ContractCanceled_ISO15118_2014 = 15, FAILED_WrongChargeParameter_ISO15118_2014 = 16, FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  1519. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18, FAILED_ChargingProfileInvalid_ISO15118_2014 = 19, FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  1520. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21, FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22, FAILED_ContactorError_ISO15118_2014 = 23,
  1521. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24, FAILED_CertificateRevoked_ISO15118_2014 = 25 };
  1522. enum ResponseCodeType_ISO15118_2018 { OK_ISO15118_2018 = 0, OK_NewSessionEstablished_ISO15118_2018 = 1, OK_OldSessionJoined_ISO15118_2018 = 2, OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  1523. OK_IsolationValid_ISO15118_2018 = 4, OK_IsolationWarning_ISO15118_2018 = 5, WARNING_CertificateExpired_ISO15118_2018 = 6, WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  1524. WARNING_CertValidationError_ISO15118_2018 = 8, WARNING_CertVerificationError_ISO15118_2018 = 9, WARNING_ContractCanceled_ISO15118_2018 = 10,
  1525. FAILED_ISO15118_2018 = 11, FAILED_SequenceError_ISO15118_2018 = 12, FAILED_ServiceIDInvalid_ISO15118_2018 = 13, FAILED_UnknownSession_ISO15118_2018 = 14,
  1526. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15, FAILED_SignatureError_ISO15118_2018 = 16, FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  1527. FAILED_ChallengeInvalid_ISO15118_2018 = 18, FAILED_WrongChargeParameter_ISO15118_2018 = 19, FAILED_IsolationFault_ISO15118_2018 = 20,
  1528. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21, FAILED_TariffSelectionInvalid_ISO15118_2018 = 22, FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  1529. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24, FAILED_NoChargeServiceSelected_ISO15118_2018 = 25, FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  1530. FAILED_ContactorError_ISO15118_2018 = 27, FAILED_CertificateRevoked_ISO15118_2018 = 28, FAILED_CertificateNotYetValid_ISO15118_2018 = 29 };
  1531. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  1532. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  1533. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  1534. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  1535. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  1536. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  1537. enum EnergyTransferModeType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  1538. DC_combo_core = 4, DC_unique = 5};
  1539. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  1540. 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};
  1541. 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};
  1542. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  1543. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  1544. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  1545. enum DC_EVErrorCodeType { NO_ERROR = 0, FAILED_RESSTemperatureInhibit = 1, FAILED_EVShiftPosition = 2, FAILED_ChargerConnectorLockFault = 3,
  1546. FAILED_EVRESSMalfunction = 4, FAILED_ChargingCurrentdifferential = 5, FAILED_ChargingVoltageOutOfRange = 6,
  1547. Reserved_A = 7, Reserved_B = 8, Reserved_C = 9, FAILED_ChargingSystemIncompatibility = 10, NoData = 11};
  1548. enum IsolationLevelType_DIN70121 { Invalid_DIN70121 = 0, Valid_DIN70121 = 1, Warning_DIN70121 = 2, Fault_DIN70121 = 3};
  1549. 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};
  1550. enum DC_EVSEStatusCodeType { EVSE_NotReady = 0, EVSE_Ready = 1, EVSE_Shutdown = 2, EVSE_UtilityInterruptEvent = 3,
  1551. EVSE_IsolationMonitoringActive = 4, EVSE_EmergencyShutdown = 5, EVSE_Malfunction = 6,
  1552. Reserved_8 = 7, Reserved_9 = 8};
  1553. enum ScheduleOriginType { EV = 0, SA = 1};
  1554. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  1555. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  1556. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  1557. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  1558. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  1559. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  1560. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  1561. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  1562. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  1563. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  1564. enum ChargingSessionType { Terminate = 0, Pause = 1};
  1565. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  1566. struct PhysicalValueType_DIN70121 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  1567. {
  1568. int Multiplier; //range: -3..+3
  1569. enum unitSymbolType_DIN70121 Unit;
  1570. short Value;
  1571. };
  1572. struct PhysicalValueType_ISO15118_2014 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  1573. {
  1574. int Multiplier; //range: -3..+3
  1575. enum unitSymbolType_ISO15118_2014 Unit;
  1576. short Value;
  1577. };
  1578. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  1579. {
  1580. int Exponent; //range: -3..+3
  1581. short Value;
  1582. };
  1583. struct AppProtocolType
  1584. {
  1585. unsigned char ProtocolNamespace[100];
  1586. unsigned int VersionNumberMajor;
  1587. unsigned int VersionNumberMinor;
  1588. unsigned char SchemaID;
  1589. unsigned char Priority; //range 1..20
  1590. };
  1591. struct ACD_SSEnergyTransferModeType
  1592. {
  1593. unsigned char EVID[20];
  1594. };
  1595. struct EVSEStatusType
  1596. {
  1597. unsigned short NotificationMaxDelay; //in seconds
  1598. enum EVSENotificationType EVSENotification;
  1599. };
  1600. struct ServiceIDListType
  1601. {
  1602. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  1603. };
  1604. struct PaymentOptionListType
  1605. {
  1606. enum PaymentOptionType PaymentOption[2];
  1607. };
  1608. struct ServiceTagType
  1609. {
  1610. unsigned short ServiceID;
  1611. unsigned char ServiceName[32];//Optional Element
  1612. enum ServiceCategoryType ServiceCategory;
  1613. unsigned char ServiceScope[32];//Optional Element
  1614. };
  1615. struct ServiceType_DIN70121
  1616. {
  1617. struct ServiceTagType ServiceTag;
  1618. BOOL FreeService;
  1619. };
  1620. struct ServiceType_ISO15118_2014
  1621. {
  1622. unsigned short ServiceID;
  1623. unsigned char ServiceName[32]; //Optional
  1624. enum ServiceCategoryType ServiceCategory;
  1625. unsigned char ServiceScope[64]; //Optional
  1626. BOOL FreeService;
  1627. };
  1628. /*struct ServiceType_ISO15118_2018
  1629. {
  1630. unsigned short ServiceID;
  1631. BOOL FreeService;
  1632. }; */
  1633. struct SupportedEnergyTransferModeType
  1634. {
  1635. enum EnergyTransferModeType EnergyTransferMode[6];
  1636. };
  1637. struct ServiceChargeType
  1638. {
  1639. struct ServiceType_DIN70121 Services;
  1640. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  1641. enum EnergyTransferModeType EnergyTransferType;
  1642. };
  1643. struct ChargeServiceType
  1644. {
  1645. struct ServiceType_ISO15118_2014 Services;
  1646. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  1647. };
  1648. struct ServiceListType
  1649. {
  1650. struct ServiceType_ISO15118_2014 Service[8];
  1651. };
  1652. struct IdentificationOptionListType
  1653. {
  1654. enum PaymentOptionType IdentificationOption[2];
  1655. };
  1656. struct ParameterType
  1657. {
  1658. unsigned char Name[32];
  1659. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  1660. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  1661. };
  1662. struct ParameterSetType
  1663. {
  1664. short ParameterSetID;
  1665. struct ParameterType Parameter[16];
  1666. };
  1667. struct ServiceParameterListType
  1668. {
  1669. struct ParameterSetType ParameterSet[255];
  1670. };
  1671. struct WPT_SDlEnergyTransferModeType
  1672. {
  1673. struct ServiceParameterListType ServiceParameterList;
  1674. };
  1675. struct SelectedServiceType
  1676. {
  1677. unsigned short ServiceID;
  1678. short ParameterSetID;
  1679. };
  1680. struct SelectedServiceListType
  1681. {
  1682. struct SelectedServiceType SelectedService[16];
  1683. };
  1684. struct CertificateChainType
  1685. {
  1686. unsigned char Id[32]; //Optional
  1687. unsigned char Certificate[800]; //check size again
  1688. unsigned char SubCertificates[4][800]; //Optional, check size again
  1689. };
  1690. struct PNC_AReqIdentificationModeType
  1691. {
  1692. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  1693. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  1694. };
  1695. struct AC_EVChargeParameterType
  1696. {
  1697. unsigned int DepartureTime; //Optional
  1698. struct PhysicalValueType_ISO15118_2014 EAmount;
  1699. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  1700. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  1701. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  1702. };
  1703. struct DC_EVStatusType_DIN70121
  1704. {
  1705. BOOL EVReady;
  1706. BOOL EVCabinConditioning;
  1707. BOOL EVRESSConiditioning;
  1708. enum DC_EVErrorCodeType EVErrorCode;
  1709. unsigned char EVRESSSOC; /*0-100 percentage*/
  1710. };
  1711. struct DC_EVChargeParameterType_DIN70121
  1712. {
  1713. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1714. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  1715. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  1716. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  1717. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  1718. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  1719. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  1720. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  1721. };
  1722. struct DC_EVStatusType_ISO15118_2014
  1723. {
  1724. BOOL EVReady;
  1725. enum DC_EVErrorCodeType EVErrorCode;
  1726. unsigned char EVRESSSOC; /*0-100 percentage*/
  1727. };
  1728. struct DC_EVChargeParameterType_ISO15118_2014
  1729. {
  1730. unsigned int DepartureTime; //Optional
  1731. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1732. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  1733. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  1734. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  1735. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  1736. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  1737. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  1738. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  1739. };
  1740. struct Dynamic_CPDReqControlModeType
  1741. {
  1742. unsigned int DepartureTime;
  1743. };
  1744. struct RelativeTimeIntervalType
  1745. {
  1746. unsigned int duration; //Optional
  1747. unsigned int start;
  1748. };
  1749. struct PMaxScheduleEntryType
  1750. {
  1751. struct RelativeTimeIntervalType RelativeTimeInterval;
  1752. unsigned short PMax;
  1753. };
  1754. struct PMaxScheduleType
  1755. {
  1756. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  1757. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  1758. };
  1759. struct CostType
  1760. {
  1761. unsigned int amount;
  1762. enum CostKindType costKind;
  1763. int amountMultiplier; //Optional , range: -3..+3
  1764. };
  1765. struct ConsumptionCostType
  1766. {
  1767. struct CostType Cost[3];
  1768. struct PhysicalValueType_ISO15118_2014 startValue;
  1769. };
  1770. struct SalesTariffEntryType
  1771. {
  1772. struct RelativeTimeIntervalType RelativeTimeInterval;
  1773. unsigned char EPriceLevel; //Optional
  1774. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  1775. };
  1776. struct SalesTariffType
  1777. {
  1778. unsigned char Id[32]; //Optional
  1779. short SalesTariffID;
  1780. unsigned char SalesTariffDescription[32]; //Optional
  1781. unsigned char NumEPriceLevels; //Optional
  1782. struct SalesTariffEntryType SalesTariffEntry[1024];
  1783. };
  1784. struct SAScheduleTupleType
  1785. {
  1786. short SAScheduleTupleID;
  1787. struct PMaxScheduleType PMaxSchedule;
  1788. struct SalesTariffType SalesTariff; //Optional
  1789. };
  1790. struct ScheduleListType
  1791. {
  1792. enum ScheduleOriginType ScheduleOrigin;
  1793. struct SAScheduleTupleType ScheduleTuple[3];
  1794. };
  1795. struct Scheduled_CPDReqControlModeType
  1796. {
  1797. enum ProcessingType EVProcessing;
  1798. unsigned int DepartureTime; //Optional
  1799. unsigned short MaxSupportingPoints;
  1800. struct ScheduleListType ScheduleList; //Optional
  1801. };
  1802. struct AC_CPDReqEnergyTransferModeType
  1803. {
  1804. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1805. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1806. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1807. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1808. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1809. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1810. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1811. };
  1812. struct DC_CPDReqEnergyTransferModeType
  1813. {
  1814. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  1815. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  1816. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1817. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1818. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1819. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1820. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1821. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1822. unsigned char TargetSOC; //Optional
  1823. unsigned char BulkSOC; //Optional
  1824. };
  1825. struct BPT_AC_CPDReqEnergyTransferModeType
  1826. {
  1827. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1828. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  1829. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  1830. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1831. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  1832. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1833. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  1834. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1835. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1836. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1837. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1838. };
  1839. struct BPT_DC_CPDReqEnergyTransferModeType
  1840. {
  1841. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1842. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  1843. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  1844. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  1845. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1846. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1847. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  1848. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  1849. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1850. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  1851. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  1852. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  1853. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  1854. unsigned char TargetSOC; //Optional
  1855. unsigned char BulkSOC; //Optional
  1856. };
  1857. struct WPT_CPDReqEnergyTransferModeType
  1858. {
  1859. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  1860. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  1861. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1862. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1863. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1864. };
  1865. struct ACD_CPDReqEnergyTransferModeType
  1866. {
  1867. //cannot be found in standard
  1868. };
  1869. struct SAScheduleListType
  1870. {
  1871. struct SAScheduleTupleType SAScheduleTuple[3];
  1872. };
  1873. struct DC_EVSEStatusType_DIN70121
  1874. {
  1875. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  1876. enum DC_EVSEStatusCodeType EVSEStatusCode;
  1877. unsigned int NotificationMaxDelay;
  1878. enum EVSENotificationType EVSENotification;
  1879. };
  1880. struct DC_EVSEChargeParameterType_DIN70121
  1881. {
  1882. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1883. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  1884. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  1885. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  1886. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  1887. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  1888. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  1889. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  1890. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  1891. };
  1892. struct AC_EVSEStatusType
  1893. {
  1894. BOOL RCD;
  1895. unsigned short NotificationMaxDelay;
  1896. enum EVSENotificationType EVSENotification; //need to be confirmed
  1897. };
  1898. struct AC_EVSEChargeParameterType
  1899. {
  1900. struct AC_EVSEStatusType AC_EVSEStatus;
  1901. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  1902. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  1903. };
  1904. struct DC_EVSEStatusType_ISO15118_2014
  1905. {
  1906. unsigned short NotificationMaxDelay;
  1907. enum EVSENotificationType EVSENotification;
  1908. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  1909. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  1910. };
  1911. struct DC_EVSEChargeParameterType_ISO15118_2014
  1912. {
  1913. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1914. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  1915. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  1916. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  1917. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  1918. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  1919. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  1920. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  1921. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  1922. };
  1923. struct Scheduled_CPDResControlModeType
  1924. {
  1925. struct ScheduleListType ScheduleList;
  1926. };
  1927. struct AC_CPDResEnergyTransferModeType
  1928. {
  1929. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1930. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1931. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1932. };
  1933. struct DC_CPDResEnergyTransferModeType
  1934. {
  1935. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1936. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1937. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1938. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1939. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1940. };
  1941. struct BPT_AC_CPDResEnergyTransferModeType
  1942. {
  1943. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1944. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  1945. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1946. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1947. };
  1948. struct BPT_DC_CPDResEnergyTransferModeType
  1949. {
  1950. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1951. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  1952. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1953. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  1954. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1955. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  1956. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1957. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1958. };
  1959. struct WPT_CPDResEnergyTransferModeType
  1960. {
  1961. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  1962. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  1963. };
  1964. struct ACD_CPDResEnergyTransferModeType
  1965. {
  1966. //not found in ISO15118_2018
  1967. };
  1968. struct ProfileEntryType_DIN70121
  1969. {
  1970. unsigned int ChargingProfileEntryStart;
  1971. short ChargingProfileEntryMaxPower;
  1972. };
  1973. struct ChargingProfileType_DIN70121
  1974. {
  1975. short SAScheduleTupleID;
  1976. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  1977. };
  1978. struct DC_EVPowerDeliveryParameterType_DIN70121
  1979. {
  1980. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1981. BOOL BulkChargingComplete; //Optional
  1982. BOOL ChargingComplete;
  1983. };
  1984. struct ProfileEntryType_ISO15118_2014
  1985. {
  1986. unsigned int ChargingProfileEntryStart;
  1987. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  1988. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  1989. };
  1990. struct ChargingProfileType_ISO15118_2014
  1991. {
  1992. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  1993. };
  1994. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  1995. {
  1996. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1997. BOOL BulkChargingComplete; //Optional
  1998. BOOL ChargingComplete;
  1999. };
  2000. struct TimeInterval
  2001. {
  2002. unsigned int start;
  2003. unsigned int duration; //Optional
  2004. };
  2005. struct PowerScheduleEntryType
  2006. {
  2007. struct TimeInterval TimeInterval;
  2008. struct PhysicalValueType_ISO15118_2018 Power[3];
  2009. };
  2010. struct EVPowerProfileType
  2011. {
  2012. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  2013. };
  2014. struct Scheduled_PDReqControlModeType
  2015. {
  2016. unsigned char ScheduleTupleID;
  2017. struct EVPowerProfileType EVPowerProfile;
  2018. };
  2019. struct BPT_Scheduled_PDReqControlModeType
  2020. {
  2021. unsigned char ScheduleTupleID;
  2022. struct EVPowerProfileType EVPowerProfile; //Optional
  2023. enum evOperationType EVOperation;
  2024. };
  2025. struct ListOfRootCertificateIDsType
  2026. {
  2027. unsigned char RootCertificateID[20][40];
  2028. };
  2029. struct ContractSignatureEncryptedPrivateKeyType
  2030. {
  2031. unsigned char Id[32];
  2032. };
  2033. struct DiffieHellmanPublickeyType
  2034. {
  2035. unsigned char Id[32];
  2036. };
  2037. struct ContractCertificateEncryptedPrivateKeyType
  2038. {
  2039. unsigned char Id[32];
  2040. };
  2041. struct EVTechnicalStatusType
  2042. {
  2043. BOOL EV_Status_ReadyToCharge;
  2044. BOOL EV_Status_ImmobilizationRequest; //Optional
  2045. BOOL EV_Status_Immobilized;
  2046. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  2047. enum EV_CP_StatusType EV_CP_Status;
  2048. unsigned char EV_Status_RESSSOC; //0~100%
  2049. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  2050. BOOL EVSE_Timeout;
  2051. };
  2052. struct MeterInfoType_ISO15118_2014
  2053. {
  2054. unsigned char MeterID[32];
  2055. unsigned long MeterReading; //Optional
  2056. unsigned char SigMeterReading[64]; //Optional
  2057. short MeterStatus; //Optional
  2058. short TMeter; //Optional
  2059. };
  2060. struct Scheduled_MRReqControlModeType
  2061. {
  2062. unsigned char ScheduleTupleID;
  2063. };
  2064. struct MeterInfoType_ISO15118_2018
  2065. {
  2066. unsigned char MeterID[32];
  2067. unsigned long MeterReadingWhCharged; //Optional
  2068. unsigned long MeterReadingWhDischarged; //Optional
  2069. unsigned long MeterReadingVARhLeading; //Optional
  2070. unsigned long MeterReadingVARhLagging; //Optional
  2071. unsigned char SignatureMeterReading[64]; //Optional
  2072. short MeterStatus; //Optional
  2073. short TimeStampMeter; //Optional
  2074. BOOL ReceiptRequired; //Optional
  2075. };
  2076. struct PnC_CLReqIdentificationModeType
  2077. {
  2078. BOOL MeteringReceiptRequested;
  2079. };
  2080. struct Dynamic_CSReqControlModeType
  2081. {
  2082. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  2083. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  2084. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  2085. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2086. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2087. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2088. };
  2089. struct Scheduled_CSReqControlModeType
  2090. {
  2091. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2092. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2093. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2094. BOOL Standby;
  2095. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  2096. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  2097. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  2098. };
  2099. struct DisplayParametersType
  2100. {
  2101. unsigned short CurrentRange;
  2102. unsigned char CurrentSOC; //0~100%
  2103. unsigned char MinimumSOC; //0~100%
  2104. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  2105. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  2106. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  2107. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  2108. BOOL ChargingComplete;
  2109. BOOL BulkChargingComplete;
  2110. BOOL InletHot;
  2111. };
  2112. struct PnC_CLResIdentificationModeType
  2113. {
  2114. struct MeterInfoType_ISO15118_2018 MeterInfo;
  2115. };
  2116. struct Dynamic_CSResControlModeType
  2117. {
  2118. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  2119. };
  2120. struct Scheduled_CDResControlModeType
  2121. {
  2122. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  2123. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  2124. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  2125. };
  2126. struct LFA_EVFinePositioningSetupParametersType
  2127. {
  2128. unsigned char NumberOfSensors;
  2129. //NOT complete yet, to be continue.....
  2130. };
  2131. /****SupportedAppProtocolRequest****/
  2132. struct SupportedAppProtocolRequest_DIN70121
  2133. {
  2134. struct AppProtocolType AppProtocol[20];
  2135. };
  2136. struct SupportedAppProtocolRequest_ISO15118_2014
  2137. {
  2138. struct AppProtocolType AppProtocol[20];
  2139. };
  2140. struct SupportedAppProtocolRequest_ISO15118_2018
  2141. {
  2142. struct AppProtocolType AppProtocol[20];
  2143. };
  2144. /****SupportedAppProtocolResponse****/
  2145. struct SupportedAppProtocolResponse_DIN70121
  2146. {
  2147. enum ResponseCodeType_DIN70121 ResponseCode;
  2148. unsigned char SchemaID; //Optional
  2149. };
  2150. struct SupportedAppProtocolResponse_ISO15118_2014
  2151. {
  2152. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2153. unsigned char SchemaID; //Optional
  2154. };
  2155. struct SupportedAppProtocolResponse_ISO15118_2018
  2156. {
  2157. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2158. unsigned char SchemaID; //Optional
  2159. };
  2160. /****SessionSetupRequest****/
  2161. struct SessionSetupRequest_DIN70121
  2162. {
  2163. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2164. };
  2165. struct SessionSetupRequest_ISO15118_2014
  2166. {
  2167. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2168. };
  2169. struct SessionSetupRequest_ISO15118_2018
  2170. {
  2171. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2172. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  2173. };
  2174. /****SessionSetupResponse****/
  2175. struct SessionSetupResponse_DIN70121
  2176. {
  2177. enum ResponseCodeType_DIN70121 ResponseCode;
  2178. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2179. unsigned int EVSETimeStamp; //EPOCH format, Optional
  2180. };
  2181. struct SessionSetupResponse_ISO15118_2014
  2182. {
  2183. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2184. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2185. unsigned int EVSETimeStamp; //EPOCH format, Optional
  2186. };
  2187. struct SessionSetupResponse_ISO15118_2018
  2188. {
  2189. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2190. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2191. struct EVSEStatusType EVSEStatus; //Optional
  2192. };
  2193. /****ServiceDiscoveryRequest****/
  2194. struct ServiceDiscoveryRequest_DIN70121
  2195. {
  2196. unsigned char ServiceScope[32]; //Optional
  2197. enum ServiceCategoryType ServiceCategory; //Optional
  2198. };
  2199. struct ServiceDiscoveryRequest_ISO15118_2014
  2200. {
  2201. unsigned char ServiceScope[32]; //Optional
  2202. enum ServiceCategoryType ServiceCategory; //Optional
  2203. };
  2204. struct ServiceDiscoveryRequest_ISO15118_2018
  2205. {
  2206. struct ServiceIDListType SupportedServiceIDs; //Optional
  2207. };
  2208. /****ServiceDiscoveryResponse****/
  2209. struct ServiceDiscoveryResponse_DIN70121
  2210. {
  2211. enum ResponseCodeType_DIN70121 ResponseCode;
  2212. struct PaymentOptionListType PaymentOptions;
  2213. struct ServiceChargeType ChargeService_DIN70121;
  2214. };
  2215. struct ServiceDiscoveryResponse_ISO15118_2014
  2216. {
  2217. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2218. struct PaymentOptionListType PaymentOptions;
  2219. struct ChargeServiceType ChargeService;
  2220. struct ServiceListType ServiceList; //Optional
  2221. };
  2222. struct ServiceDiscoveryResponse_ISO15118_2018
  2223. {
  2224. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2225. struct EVSEStatusType EVSEStatus; //Optional
  2226. struct IdentificationOptionListType IdentificationOptionList;
  2227. struct ServiceListType EnergyTransferServiceList;
  2228. struct ServiceListType VASList; //Optional
  2229. };
  2230. /****ServiceDetailRequest****/
  2231. //Only in ISO15118_2014 and ISO15118_2018
  2232. struct ServiceDetailRequest_ISO15118_2014
  2233. {
  2234. unsigned short ServiceID;
  2235. };
  2236. struct ServiceDetailRequest_ISO15118_2018
  2237. {
  2238. unsigned short ServiceID;
  2239. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  2240. };
  2241. /****ServiceDetailResponse****/
  2242. struct ServiceDetailResponse_ISO15118_2014
  2243. {
  2244. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2245. unsigned short ServiceID;
  2246. struct ServiceParameterListType ServiceParameterList;
  2247. };
  2248. struct ServiceDetailResponse_ISO15118_2018
  2249. {
  2250. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2251. unsigned short ServiceID;
  2252. struct ServiceParameterListType ServiceParameterList;
  2253. struct EVSEStatusType EVSEStatus; //Optional
  2254. };
  2255. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  2256. struct ServiceAndPaymentSelectionRequest_DIN70121
  2257. {
  2258. enum PaymentOptionType SelectedPaymentOption;
  2259. struct SelectedServiceListType SelectedServiceList;
  2260. };
  2261. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  2262. {
  2263. enum PaymentOptionType SelectedPaymentOption;
  2264. struct SelectedServiceListType SelectedServiceList;
  2265. };
  2266. struct ServiceSelectionRequest_ISO15118_2018
  2267. {
  2268. enum PaymentOptionType SelectedPaymentOption;
  2269. struct SelectedServiceType SelectedEnergyTransferService;
  2270. struct SelectedServiceListType SelectedVASList;
  2271. enum ProcessingType EVProcessing;
  2272. };
  2273. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  2274. struct ServiceAndPaymentSelectionResponse_DIN70121
  2275. {
  2276. enum ResponseCodeType_DIN70121 ResponseCode;
  2277. };
  2278. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  2279. {
  2280. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2281. };
  2282. struct ServiceSelectionResponse_ISO15118_2018
  2283. {
  2284. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2285. struct EVSEStatusType EVSEStatus; //Optional
  2286. };
  2287. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  2288. struct PaymentDetailsRequest_ISO15118_2014
  2289. {
  2290. unsigned char eMAID[16];
  2291. struct CertificateChainType ContractSignatureCertChain;
  2292. };
  2293. struct IdentificationDetailsRequest_ISO15118_2018
  2294. {
  2295. struct CertificateChainType ContractSignatureCertChain;
  2296. };
  2297. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  2298. struct PaymentDetailsResponse_ISO15118_2014
  2299. {
  2300. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2301. unsigned char GenChallenge[16];
  2302. long EVSETimeStamp;
  2303. };
  2304. struct IdentificationDetailsResponse_ISO15118_2018
  2305. {
  2306. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2307. struct EVSEStatusType EVSEStatus; //Optional
  2308. unsigned char GenChallenge[16];
  2309. enum ProcessingType EVSEProcessing;
  2310. };
  2311. /****ContractAuthenticationRequest / AuthorizationRequest****/
  2312. struct ContractAuthenticationRequest_DIN70121
  2313. {
  2314. //None
  2315. };
  2316. struct AuthorizationRequest_ISO15118_2014
  2317. {
  2318. unsigned char GenChallenge[16]; //Optional
  2319. unsigned char Id[32]; //Optional
  2320. };
  2321. struct AuthorizationRequest_ISO15118_2018
  2322. {
  2323. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  2324. };
  2325. /****ContractAuthenticationResponse / AuthorizationResponse****/
  2326. struct ContractAuthenticationResponse_DIN70121
  2327. {
  2328. enum ResponseCodeType_DIN70121 ResponseCode;
  2329. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  2330. };
  2331. struct AuthorizationResponse_ISO15118_2014
  2332. {
  2333. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2334. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  2335. };
  2336. struct AuthorizationResponse_ISO15118_2018
  2337. {
  2338. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2339. enum ProcessingType EVSEProcessing;
  2340. struct EVSEStatusType EVSEStatus; //Optional
  2341. };
  2342. /****ChargeParameterDiscoveryRequest****/
  2343. struct ChargeParameterDiscoveryRequest_DIN70121
  2344. {
  2345. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  2346. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  2347. };
  2348. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  2349. {
  2350. unsigned short MaxEntriesSAScheduleTuple; //Optional
  2351. enum EnergyTransferModeType RequestedEnergyTransferMode;
  2352. struct AC_EVChargeParameterType AC_EVChargeParameter;
  2353. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  2354. };
  2355. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  2356. {
  2357. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  2358. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  2359. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  2360. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  2361. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  2362. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  2363. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  2364. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  2365. };
  2366. /****ChargeParameterDiscoveryResponse****/
  2367. struct ChargeParameterDiscoveryResponse_DIN70121
  2368. {
  2369. enum ResponseCodeType_DIN70121 ResponseCode;
  2370. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  2371. struct SAScheduleListType SAScheduleList;
  2372. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  2373. };
  2374. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  2375. {
  2376. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  2377. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2378. struct SAScheduleListType SAScheduleList;
  2379. struct AC_EVSEChargeParameterType AC_EVSEChargeParameter;
  2380. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  2381. };
  2382. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  2383. {
  2384. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2385. struct EVSEStatusType EVSEStatus; //Optional
  2386. enum ProcessingType EVSEProcessing;
  2387. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  2388. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  2389. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  2390. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  2391. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  2392. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  2393. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  2394. };
  2395. /****PowerDeliveryRequest****/
  2396. struct PowerDeliveryRequest_DIN70121
  2397. {
  2398. BOOL ReadyToChargeState;
  2399. struct ChargingProfileType_DIN70121 ChargingProfile;
  2400. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  2401. };
  2402. struct PowerDeliveryRequest_ISO15118_2014
  2403. {
  2404. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  2405. short SAScheduleTupleID;
  2406. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  2407. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  2408. };
  2409. struct PowerDeliveryRequest_ISO15118_2018
  2410. {
  2411. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  2412. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  2413. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  2414. };
  2415. /****PowerDeliveryResponse****/
  2416. struct PowerDeliveryResponse_DIN70121
  2417. {
  2418. enum ResponseCodeType_DIN70121 ResponseCode;
  2419. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2420. };
  2421. struct PowerDeliveryResponse_ISO15118_2014
  2422. {
  2423. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2424. struct AC_EVSEStatusType AC_EVSEStatus;
  2425. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2426. };
  2427. struct PowerDeliveryResponse_ISO15118_2018
  2428. {
  2429. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2430. struct EVSEStatusType EVSEStatus; //Optional
  2431. };
  2432. /****CertificateUpdateRequest****/
  2433. struct CertificateUpdateRequest_ISO15118_2014
  2434. {
  2435. unsigned char Id[32];
  2436. struct CertificateChainType ContractSignatureCertChain;
  2437. unsigned char eMAID[16];
  2438. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  2439. };
  2440. /****CertificateUpdateResponse****/
  2441. struct CertificateUpdateResponse_ISO15118_2014
  2442. {
  2443. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2444. struct CertificateChainType SAProvisioningCertificateChain;
  2445. struct CertificateChainType ContractSignatureCertChain;
  2446. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  2447. struct DiffieHellmanPublickeyType DHpublickey;
  2448. unsigned char eMAID[16];
  2449. short RetryCounter; //Optional
  2450. };
  2451. /****CertificateInstallationRequest****/
  2452. struct CertificateInstallationRequest_ISO15118_2014
  2453. {
  2454. unsigned char Id[32];
  2455. unsigned char OEMProvisioningCert[800];
  2456. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  2457. };
  2458. struct CertificateInstallationRequest_ISO15118_2018
  2459. {
  2460. unsigned char Id[32];
  2461. struct CertificateChainType OEMProvisioningCertChain;
  2462. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  2463. unsigned short MaxSupportedCerts;
  2464. };
  2465. /****CertificateInstallationResponse****/
  2466. struct CertificateInstallationResponse_ISO15118_2014
  2467. {
  2468. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2469. struct CertificateChainType SAProvisioningCertificateChain;
  2470. struct CertificateChainType ContractSignatureCertChain;
  2471. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  2472. struct DiffieHellmanPublickeyType DHpublickey;
  2473. unsigned char eMAID[16];
  2474. };
  2475. struct CertificateInstallationResponse_ISO15118_2018
  2476. {
  2477. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2478. struct EVSEStatusType EVSEStatus; //Optional
  2479. struct CertificateChainType SAProvisioningCertificateChain;
  2480. struct CertificateChainType ContractCertificateChain;
  2481. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  2482. struct DiffieHellmanPublickeyType DHpublickey;
  2483. enum ProcessingType EVSEProcessing;
  2484. unsigned short RemainingContractCertificateChains;
  2485. };
  2486. /****SystemStatusRequest****/
  2487. struct SystemStatusRequest_ISO15118_2018
  2488. {
  2489. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  2490. struct EVTechnicalStatusType EVTechnicalStatus;
  2491. unsigned char EV_OEMStatus[800]; //Optional
  2492. };
  2493. /****SystemStatusResponse****/
  2494. struct SystemStatusResponse_ISO15118_2018
  2495. {
  2496. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2497. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  2498. BOOL EVSE_ReadyToCharge;
  2499. enum IsolationStatusType EVSE_IsolationStatus;
  2500. BOOL EVSE_Disabled;
  2501. BOOL EVSE_UtilityInterruptEvent;
  2502. BOOL EVSE_EmergencyShutdown;
  2503. BOOL EVSE_Malfunction;
  2504. BOOL EV_InChargePosition;
  2505. BOOL EV_AssociationStatus;
  2506. };
  2507. /****SessionStopRequest****/
  2508. struct SessionStopRequest_DIN70121
  2509. {
  2510. //No member in standard
  2511. };
  2512. struct SessionStopRequest_ISO15118_2014
  2513. {
  2514. enum ChargingSessionType ChargingSession;
  2515. };
  2516. struct SessionStopRequest_ISO15118_2018
  2517. {
  2518. enum ChargingSessionType ChargingSession;
  2519. };
  2520. /****SessionStopResponse****/
  2521. struct SessionStopResponse_DIN70121
  2522. {
  2523. enum ResponseCodeType_DIN70121 ResponseCode;
  2524. };
  2525. struct SessionStopResponse_ISO15118_2014
  2526. {
  2527. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2528. };
  2529. struct SessionStopResponse_ISO15118_2018
  2530. {
  2531. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2532. struct EVSEStatusType EVSEStatus; //Optional
  2533. };
  2534. /****MeteringReceiptRequest****/
  2535. struct MeteringReceiptRequest_ISO15118_2014
  2536. {
  2537. unsigned char Id[32]; //Optional
  2538. unsigned char SessionID[8];
  2539. short SAScheduleTupleID; //Optional
  2540. struct MeterInfoType_ISO15118_2014 MeterInfo;
  2541. };
  2542. struct MeteringReceiptRequest_ISO15118_2018
  2543. {
  2544. unsigned char Id[32]; //Optional
  2545. unsigned char SessionID[8];
  2546. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  2547. struct MeterInfoType_ISO15118_2018 MeterInfo;
  2548. };
  2549. /****MeteringReceiptResponse****/
  2550. struct MeteringReceiptResponse_ISO15118_2014
  2551. {
  2552. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2553. struct AC_EVSEStatusType AC_EVSEStatus;
  2554. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2555. };
  2556. struct MeteringReceiptResponse_ISO15118_2018
  2557. {
  2558. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2559. struct EVSEStatusType EVSEStatus; //Optional
  2560. };
  2561. /****ChargingStatusRequest (AC Only)****/
  2562. struct ChargingStatusRequest_ISO15118_2014
  2563. {
  2564. //No member in standard
  2565. };
  2566. struct ChargingStatusRequest_ISO15118_2018
  2567. {
  2568. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  2569. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  2570. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  2571. struct DisplayParametersType DisplayParameters;
  2572. };
  2573. /****ChargingStatusResponse (AC Only)****/
  2574. struct ChargingStatusResponse_ISO15118_2014
  2575. {
  2576. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2577. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2578. short SAScheduleTupleID;
  2579. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  2580. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  2581. BOOL ReceiptRequired; //Optional
  2582. struct AC_EVSEStatusType AC_EVSEStatus;
  2583. };
  2584. struct ChargingStatusResponse_ISO15118_2018
  2585. {
  2586. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2587. struct EVSEStatusType EVSEStatus; //Optional
  2588. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2589. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  2590. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  2591. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  2592. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  2593. };
  2594. /****CableCheckRequest (DC Only)****/
  2595. struct CableCheckRequest_DIN70121
  2596. {
  2597. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2598. };
  2599. struct CableCheckRequest_ISO15118_2014
  2600. {
  2601. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2602. };
  2603. struct CableCheckRequest_ISO15118_2018
  2604. {
  2605. //No member in standard
  2606. };
  2607. /****CableCheckResponse (DC Only)****/
  2608. struct CableCheckResponse_DIN70121
  2609. {
  2610. enum ResponseCodeType_DIN70121 ResponseCode;
  2611. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2612. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  2613. };
  2614. struct CableCheckResponse_ISO15118_2014
  2615. {
  2616. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2617. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2618. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  2619. };
  2620. struct CableCheckResponse_ISO15118_2018
  2621. {
  2622. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2623. struct EVSEStatusType EVSEStatus; //Optional
  2624. enum ProcessingType EVSEProcessing;
  2625. };
  2626. /****PreChargeRequest (DC Only)****/
  2627. struct PreChargeRequest_DIN70121
  2628. {
  2629. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2630. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  2631. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  2632. };
  2633. struct PreChargeRequest_ISO15118_2014
  2634. {
  2635. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2636. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  2637. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  2638. };
  2639. struct PreChargeRequest_ISO15118_2018
  2640. {
  2641. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  2642. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  2643. };
  2644. /****PreChargeResponse (DC Only)****/
  2645. struct PreChargeResponse_DIN70121
  2646. {
  2647. enum ResponseCodeType_DIN70121 ResponseCode;
  2648. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2649. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  2650. };
  2651. struct PreChargeResponse_ISO15118_2014
  2652. {
  2653. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2654. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2655. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2656. };
  2657. struct PreChargeResponse_ISO15118_2018
  2658. {
  2659. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2660. struct EVSEStatusType EVSEStatus; //Optional
  2661. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2662. };
  2663. /****CurrentDemandRequest (DC Only)****/
  2664. struct CurrentDemandRequest_DIN70121
  2665. {
  2666. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2667. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  2668. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  2669. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  2670. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  2671. BOOL BulkChargingComplete; //Optional
  2672. BOOL ChargingComplete;
  2673. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  2674. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  2675. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  2676. };
  2677. struct CurrentDemandRequest_ISO15118_2014
  2678. {
  2679. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2680. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  2681. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  2682. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  2683. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  2684. BOOL BulkChargingComplete; //Optional
  2685. BOOL ChargingComplete;
  2686. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  2687. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  2688. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  2689. };
  2690. struct CurrentDemandRequest_ISO15118_2018
  2691. {
  2692. struct DisplayParametersType DisplayParameters; //Optional
  2693. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  2694. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  2695. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  2696. };
  2697. /****CurrentDemandResponse (DC Only)****/
  2698. struct CurrentDemandResponse_DIN70121
  2699. {
  2700. enum ResponseCodeType_DIN70121 ResponseCode;
  2701. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2702. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  2703. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  2704. BOOL EVSECurrentLimitAchieved;
  2705. BOOL EVSEVoltageLimitAchieved;
  2706. BOOL EVSEPowerLimitAchieved;
  2707. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  2708. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  2709. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  2710. };
  2711. struct CurrentDemandResponse_ISO15118_2014
  2712. {
  2713. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2714. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2715. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2716. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  2717. BOOL EVSECurrentLimitAchieved;
  2718. BOOL EVSEVoltageLimitAchieved;
  2719. BOOL EVSEPowerLimitAchieved;
  2720. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  2721. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  2722. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  2723. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2724. short SAScheduleTupleID;
  2725. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  2726. BOOL ReceiptRequired; //Optional
  2727. };
  2728. struct CurrentDemandResponse_ISO15118_2018
  2729. {
  2730. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2731. struct EVSEStatusType EVSEStatus; //Optional
  2732. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2733. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  2734. BOOL EVSECurrentLimitAchieved;
  2735. BOOL EVSEVoltageLimitAchieved;
  2736. BOOL EVSEPowerLimitAchieved;
  2737. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  2738. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  2739. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  2740. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2741. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  2742. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  2743. };
  2744. /****WeldingDetectionRequest (DC Only)*****/
  2745. struct WeldingDetectionRequest_DIN70121
  2746. {
  2747. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2748. };
  2749. struct WeldingDetectionRequest_ISO15118_2014
  2750. {
  2751. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2752. };
  2753. struct WeldingDetectionRequest_ISO15118_2018
  2754. {
  2755. //No member in Standard
  2756. };
  2757. /****WeldingDetectionResponse (DC Only)****/
  2758. struct WeldingDetectionResponse_DIN70121
  2759. {
  2760. enum ResponseCodeType_DIN70121 ResponseCode;
  2761. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2762. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  2763. };
  2764. struct WeldingDetectionResponse_ISO15118_2014
  2765. {
  2766. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2767. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2768. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2769. };
  2770. struct WeldingDetectionResponse_ISO15118_2018
  2771. {
  2772. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2773. struct EVSEStatusType EVSEStatus; //Optional
  2774. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2775. };
  2776. /****FinePositioningSetupRequest (WPT Only)****/
  2777. struct FinePositioningSetupRequest_ISO15118_2018
  2778. {
  2779. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  2780. };
  2781. /****FinePositioningSetupResponse (WPT Only)****/
  2782. struct FinePositioningSetupResponse_ISO15118_2018
  2783. {
  2784. //NOT complete yet, to be continue.....
  2785. };
  2786. struct V2GMessageType_DIN70121
  2787. {
  2788. unsigned char SelfTest_Comp;
  2789. unsigned char version[16];
  2790. unsigned char PresentMsgFlowStatus;
  2791. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2792. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2793. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2794. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2795. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2796. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2797. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2798. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2799. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2800. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2801. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2802. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2803. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2804. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2805. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2806. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2807. 52: SessionStopRequest, 53: SessionStopResponse
  2808. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2809. */
  2810. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  2811. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  2812. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  2813. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  2814. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  2815. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  2816. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  2817. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  2818. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  2819. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  2820. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  2821. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  2822. struct CableCheckRequest_DIN70121 CableCheckRequest;
  2823. struct CableCheckResponse_DIN70121 CableCheckResponse;
  2824. struct PreChargeRequest_DIN70121 PreChargeRequest;
  2825. struct PreChargeResponse_DIN70121 PreChargeResponse;
  2826. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  2827. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  2828. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  2829. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  2830. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  2831. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  2832. struct SessionStopRequest_DIN70121 SessionStopRequest;
  2833. struct SessionStopResponse_DIN70121 SessionStopResponse;
  2834. };
  2835. struct V2GMessageType_ISO15118_2014
  2836. {
  2837. unsigned char PresentMsgFlowStatus;
  2838. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2839. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2840. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2841. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2842. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2843. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2844. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2845. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2846. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2847. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2848. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2849. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2850. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2851. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2852. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2853. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2854. 52: SessionStopRequest, 53: SessionStopResponse
  2855. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2856. */
  2857. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  2858. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  2859. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  2860. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  2861. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  2862. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  2863. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  2864. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  2865. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  2866. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  2867. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  2868. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  2869. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  2870. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  2871. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  2872. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  2873. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  2874. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  2875. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  2876. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  2877. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  2878. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  2879. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  2880. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  2881. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  2882. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  2883. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  2884. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  2885. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  2886. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  2887. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  2888. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  2889. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  2890. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  2891. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  2892. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  2893. };
  2894. struct V2GMessageType_ISO15118_2018
  2895. {
  2896. unsigned char PresentMsgFlowStatus;
  2897. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2898. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2899. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2900. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2901. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2902. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2903. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2904. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2905. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2906. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2907. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2908. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2909. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2910. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2911. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2912. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2913. 52: SessionStopRequest, 53: SessionStopResponse
  2914. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2915. */
  2916. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  2917. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  2918. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  2919. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  2920. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  2921. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  2922. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  2923. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  2924. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  2925. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  2926. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  2927. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  2928. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  2929. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  2930. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  2931. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  2932. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  2933. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  2934. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  2935. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  2936. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  2937. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  2938. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  2939. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  2940. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  2941. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  2942. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  2943. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  2944. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  2945. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  2946. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  2947. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  2948. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  2949. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  2950. };
  2951. struct CcsData
  2952. {
  2953. unsigned char CommProtocol; // 1: V2GMessage_DIN70121, 2:V2GMessage_ISO15118_2014, 3:V2GMessage_ISO15118_2018
  2954. struct V2GMessageType_DIN70121 V2GMessage_DIN70121[CCS_QUANTITY];
  2955. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014[CCS_QUANTITY];
  2956. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018[CCS_QUANTITY];
  2957. };
  2958. /**************************************************************************************/
  2959. /***************STM32F407 Communication Share memory**************************/
  2960. /**************************************************************************************/
  2961. struct PrimaryMcuData
  2962. {
  2963. unsigned char SelfTest_Comp;
  2964. unsigned char version[16]; //STM32F407 firmware version
  2965. unsigned int InputVoltage; //value comes from external meter
  2966. unsigned int InputCurrent; //value comes from external meter
  2967. union
  2968. {
  2969. unsigned char OutputDrvValue[1];
  2970. struct
  2971. {
  2972. //OutputDrvValue[0]
  2973. unsigned char AcContactorDrv:1; //bit 0, H: ON, L:OFF
  2974. unsigned char Button1LedDrv:1; //bit 1, H: ON, L:OFF
  2975. unsigned char Button2LedDrv:1; //bit 2, H: ON, L:OFF
  2976. unsigned char SystemLed1Drv:1; //bit 3, H: ON, L:OFF
  2977. unsigned char SystemLed2Drv:1; //bit 4, H: ON, L:OFF
  2978. unsigned char SystemLed3Drv:1; //bit 5, H: ON, L:OFF
  2979. unsigned char SystemLed4Drv:1; //bit 6, H: ON, L:OFF
  2980. unsigned char:1; //bit 7 reserved
  2981. }bits;
  2982. }OutputDrv;
  2983. union
  2984. {
  2985. unsigned char InputDetValue[2];
  2986. struct
  2987. {
  2988. //InputDetValue[0]
  2989. unsigned char AcContactorDetec:1; //bit 0, H: ON, L:OFF
  2990. unsigned char AcMainBreakerDetec:1; //bit 1, H: ON, L:OFF
  2991. unsigned char SpdDetec:1; //bit 2, H: ON, L:OFF
  2992. unsigned char DoorOpen:1; //bit 3, H: Open, L:Close
  2993. unsigned char Gfd1:1; //bit 4, H: Trigger, L:Normal
  2994. unsigned char Gfd2:1; //bit 5, H: Trigger, L:Normal
  2995. unsigned char Button1:1; //bit 6 , H: Push, L:Release
  2996. unsigned char Button2:1; //bit 7, H: Push, L:Release
  2997. //InputDetValue[1]
  2998. unsigned char EmergencyButton:1; //bit 0, H: Push, L:Release
  2999. unsigned char :7; //bit 1~7, Reserved
  3000. }bits;
  3001. }InputDet;
  3002. };
  3003. /**************************************************************************************/
  3004. /*************Fan power module Communication Share memory******************/
  3005. /**************************************************************************************/
  3006. struct FanModuleData
  3007. {
  3008. unsigned char SelfTest_Comp;
  3009. unsigned char version[16]; //fan power module firmware version
  3010. unsigned short PresentFan1Speed; //RPM
  3011. unsigned short PresentFan2Speed; //RPM
  3012. unsigned short PresentFan3Speed; //RPM
  3013. unsigned short PresentFan4Speed; //RPM
  3014. unsigned short SetFan1Speed; //RPM
  3015. unsigned short SetFan2Speed; //RPM
  3016. unsigned short SetFan3Speed; //RPM
  3017. unsigned short SetFan4Speed; //RPM
  3018. unsigned short TestFanSpeed; //RPM
  3019. unsigned char DiffOfAirPressure; //pa
  3020. unsigned char UpdateFW; //1:do update
  3021. };
  3022. /**************************************************************************************/
  3023. /***********Relay control module Communication Share memory******************/
  3024. /**************************************************************************************/
  3025. struct RelayModuleData
  3026. {
  3027. unsigned char SelfTest_Comp;
  3028. unsigned char version[16]; //fan power module firmware version
  3029. unsigned short InputL1Volt; //XXXXX.x volt
  3030. unsigned short InputL2Volt; //XXXXX.x volt
  3031. unsigned short InputL3Volt; //XXXXX.x volt
  3032. unsigned short Gun1FuseOutputVolt; //XXXXX.x volt
  3033. unsigned short Gun2FuseOutputVolt; //XXXXX.x volt
  3034. unsigned short Gun1RelayOutputVolt; //XXXXX.x volt
  3035. unsigned short Gun2RelayOutputVolt; //XXXXX.x volt
  3036. unsigned short Gun1OutputCurrent; //XXXXX.x amp
  3037. unsigned short Gun2OutputCurrent; //XXXXX.x amp
  3038. unsigned char UpdateFW; //1:do update
  3039. };
  3040. /**************************************************************************************/
  3041. /************************OCPP Share memory***************************************/
  3042. /**************************************************************************************/
  3043. struct StructIdTagInfo
  3044. {
  3045. unsigned char ExpiryDate[28];
  3046. unsigned char ParentIdTag[20];
  3047. unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
  3048. };
  3049. struct StructLocalAuthorizationList
  3050. {
  3051. unsigned char IdTag[20];
  3052. struct StructIdTagInfo IdTagInfo;
  3053. };
  3054. struct StructSampledValue
  3055. {
  3056. unsigned char Value[128];
  3057. unsigned char Context[30];//Interruption.Begin, Interruption.End, Sample.Clock, Sample.Periodic, Transaction.Begin, Transaction.End, Trigger, Other
  3058. unsigned char Format[16];//Raw,SignedData
  3059. unsigned char Measurand[40];/* "Energy.Active.Export.Register",
  3060. "Energy.Active.Import.Register",
  3061. "Energy.Reactive.Export.Register",
  3062. "Energy.Reactive.Import.Register",
  3063. "Energy.Active.Export.Interval",
  3064. "Energy.Active.Import.Interval",
  3065. "Energy.Reactive.Export.Interval",
  3066. "Energy.Reactive.Import.Interval",
  3067. "Power.Active.Export",
  3068. "Power.Active.Import",
  3069. "Power.Offered",
  3070. "Power.Reactive.Export",
  3071. "Power.Reactive.Import",
  3072. "Power.Factor",
  3073. "Current.Import",
  3074. "Current.Export",
  3075. "Current.Offered",
  3076. "Voltage",
  3077. "Frequency",
  3078. "Temperature",
  3079. "SoC",
  3080. "RPM"
  3081. */
  3082. unsigned char Phase[10]; /* "L1",
  3083. "L2",
  3084. "L3",
  3085. "N",
  3086. "L1-N",
  3087. "L2-N",
  3088. "L3-N",
  3089. "L1-L2",
  3090. "L2-L3",
  3091. "L3-L1"
  3092. */
  3093. unsigned char Location[10]; //Cable,EV,Inlet,Outlet,Body
  3094. unsigned char Unit[20]; /* "Wh",
  3095. "kWh",
  3096. "varh",
  3097. "kvarh",
  3098. "W",
  3099. "kW",
  3100. "VA",
  3101. "kVA",
  3102. "var",
  3103. "kvar",
  3104. "A",
  3105. "V",
  3106. "K",
  3107. "Celcius",
  3108. "Fahrenheit",
  3109. "Percent"
  3110. */
  3111. };
  3112. struct StructMeterValue
  3113. {
  3114. unsigned char TimeStamp[28];
  3115. struct StructSampledValue SampledValue[10];
  3116. };
  3117. struct StructConfigurationKeyItems
  3118. {
  3119. unsigned char Item[50];
  3120. };
  3121. struct StructConfigurationKey
  3122. {
  3123. unsigned char Key[50];
  3124. unsigned char ReadOnly[8]; //boolean
  3125. unsigned char Value[500];
  3126. };
  3127. struct StructChargingSchedulePeriod
  3128. {
  3129. int StartPeriod;
  3130. float Limit;//0.1;
  3131. int NumberPhases;
  3132. };
  3133. struct StructChargingSchedule
  3134. {
  3135. int Duration;
  3136. unsigned char StartSchedule[28];
  3137. unsigned char ChargingRateUnit[4]; //A, W
  3138. struct StructChargingSchedulePeriod ChargingSchedulePeriod[10];
  3139. float MinChargingRate; //0.1;
  3140. };
  3141. struct StructChargingProfile
  3142. {
  3143. int ChargingProfileId;
  3144. int TransactionId;
  3145. int StackLevel;
  3146. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  3147. unsigned char ChargingProfileKind[12]; //Absolute, Recurring, Relative
  3148. unsigned char RecurrencyKind[8]; //Daily, Weekly
  3149. unsigned char ValidFrom[28];
  3150. unsigned char ValidTo[28];
  3151. struct StructChargingSchedule ChargingSchedule;
  3152. };
  3153. struct StructBootNotification
  3154. {
  3155. unsigned char CpVendor[20]; //chargePointVendor //mandatory
  3156. unsigned char CpModel[20]; //chargePointModel //mandatory
  3157. unsigned char CpSN[25]; //chargePointSerialNumber
  3158. unsigned char CbSN[25]; //chargeBoxSerialNumber
  3159. unsigned char CpFwVersion[50]; //firmwareVersion
  3160. unsigned char CpIccid[22]; //iccid
  3161. unsigned char CpImsi[20]; //imsi
  3162. unsigned char CpMeterType[25]; //meterType
  3163. unsigned char CpMeterSerialNumber[25]; //meterSerialNumber
  3164. unsigned char ResponseStatus[16]; //Accepted, Pending, Rejected
  3165. unsigned char ResponseCurrentTime[28]; //currentTime //mandatory
  3166. int ResponseHeartbeatInterval; //interval //mandatory
  3167. };
  3168. struct StructHeartbeat
  3169. {
  3170. unsigned char ResponseCurrentTime[28];
  3171. };
  3172. struct StructAuthorize
  3173. {
  3174. unsigned char IdTag[20];
  3175. struct StructIdTagInfo ResponseIdTagInfo;
  3176. };
  3177. struct StructStartTransaction
  3178. {
  3179. int ConnectorId;
  3180. unsigned char IdTag[20];
  3181. int MeterStart;
  3182. int ReservationId;
  3183. unsigned char Timestamp[28];
  3184. struct StructIdTagInfo ResponseIdTagInfo;
  3185. int ResponseTransactionId;
  3186. };
  3187. struct StructStopTransaction
  3188. {
  3189. unsigned char IdTag[20];
  3190. int MeterStop;
  3191. unsigned char Timestamp[28];
  3192. int TransactionId;
  3193. unsigned char StopReason[20]; /* "EmergencyStop",
  3194. "EVDisconnected",
  3195. "HardReset",
  3196. "Local",
  3197. "Other",
  3198. "PowerLoss",
  3199. "Reboot",
  3200. "Remote",
  3201. "SoftReset",
  3202. "UnlockCommand",
  3203. "DeAuthorized"
  3204. */
  3205. struct StructMeterValue TransactionData[1];
  3206. struct StructIdTagInfo ResponseIdTagInfo;
  3207. };
  3208. struct StructStatusNotification
  3209. {
  3210. int ConnectorId;
  3211. unsigned char ErrorCode[25]; /* "ConnectorLockFailure",
  3212. "EVCommunicationError",
  3213. "GroundFailure",
  3214. "HighTemperature",
  3215. "InternalError",
  3216. "LocalListConflict",
  3217. "NoError",
  3218. "OtherError",
  3219. "OverCurrentFailure",
  3220. "PowerMeterFailure",
  3221. "PowerSwitchFailure",
  3222. "ReaderFailure",
  3223. "ResetFailure",
  3224. "UnderVoltage",
  3225. "OverVoltage",
  3226. "WeakSignal"
  3227. */
  3228. unsigned char Info[50];
  3229. unsigned char Status[20]; /* "Available",
  3230. "Preparing",
  3231. "Charging",
  3232. "SuspendedEVSE",
  3233. "SuspendedEV",
  3234. "Finishing",
  3235. "Reserved",
  3236. "Unavailable",
  3237. "Faulted"
  3238. */
  3239. unsigned char Timestamp[28];
  3240. unsigned char VendorId[256];
  3241. unsigned char VendorErrorCode[50];
  3242. };
  3243. struct StructCancelReservation
  3244. {
  3245. int ReservationId;
  3246. unsigned char ResponseStatus[16]; //Accepted, Rejected
  3247. unsigned char guid[37];
  3248. };
  3249. struct StructChangeAvailability
  3250. {
  3251. int ConnectorId;
  3252. unsigned char Type[16]; //Inoperative, Operative
  3253. unsigned char ResponseStatus[16]; //Accepted, Rejected, Scheduled
  3254. unsigned char guid[37];
  3255. };
  3256. struct StructChangeConfiguration
  3257. {
  3258. unsigned char Key[50];
  3259. unsigned char Value[500];
  3260. unsigned char ResponseStatus[16]; //Accepted, Rejected, RebootRequired, NotSupported
  3261. };
  3262. struct StructClearCache
  3263. {
  3264. unsigned char ResponseStatus[16]; //Accepted, Rejected
  3265. };
  3266. struct StructClearChargingProfile
  3267. {
  3268. int Id;
  3269. int ConnectorId;
  3270. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  3271. int StackLevel;
  3272. unsigned char ResponseStatus[16]; //Accepted, Unknown
  3273. };
  3274. struct StructDataTransfer
  3275. {
  3276. unsigned char VendorId[256];
  3277. unsigned char MessageId[52];
  3278. unsigned char Data[512];
  3279. unsigned char ResponseStatus[18]; //Accepted, Rejected,UnknownMessageId,UnknownVendorId
  3280. unsigned char ResponseData[256];
  3281. };
  3282. struct StructDiagnosticsStatusNotification
  3283. {
  3284. unsigned char Status[16]; //Idle,Uploaded,UploadFailed,Uploading
  3285. };
  3286. struct StructFirmwareStatusNotification
  3287. {
  3288. unsigned char Status[20]; //Downloaded,DownloadFailed,Downloading,Idle,InstallationFailed,Installing,Installed
  3289. };
  3290. struct StructGetCompositeSchedule
  3291. {
  3292. int ConnectorId;
  3293. int Duration;
  3294. unsigned char ChargingRateUnit[4]; //A,W
  3295. unsigned char ResponseStatus[12]; //Accepted,Rejected
  3296. int ResponseConnectorId;
  3297. unsigned char ResponseScheduleStart[28];
  3298. struct StructChargingSchedule ResponseChargingSchedule;
  3299. };
  3300. struct StructGetConfiguration
  3301. {
  3302. struct StructConfigurationKeyItems *Key;
  3303. struct StructConfigurationKey *ResponseConfigurationKey;
  3304. struct StructConfigurationKeyItems *ResponseUnknownKey;
  3305. };
  3306. struct StructGetDiagnostics
  3307. {
  3308. unsigned char Location[256];
  3309. int Retries;
  3310. int RetryInterval;
  3311. unsigned char StartTime[28];
  3312. unsigned char StopTime[28];
  3313. unsigned char ResponseFileName[256];
  3314. };
  3315. struct StructGetLocalListVersion
  3316. {
  3317. int ResponseListVersion;
  3318. };
  3319. struct StructMeterValues
  3320. {
  3321. int ConnectorId;
  3322. int TransactionId;
  3323. struct StructMeterValue MeterValue[0];
  3324. };
  3325. struct StructRemoteStartTransaction
  3326. {
  3327. int ConnectorId;
  3328. unsigned char IdTag[20];
  3329. struct StructChargingProfile ChargingProfile;
  3330. unsigned char ResponseStatus[10]; //Accepted, Rejected
  3331. unsigned char guid[37];
  3332. };
  3333. struct StructRemoteStopTransaction
  3334. {
  3335. int TransactionId;
  3336. unsigned char ResponseStatus[10]; //Accepted, Rejected
  3337. };
  3338. struct StructReserveNow
  3339. {
  3340. int ConnectorId;
  3341. unsigned char ExpiryDate[28];
  3342. unsigned char IdTag[20];
  3343. unsigned char ParentIdTag[20];
  3344. int ReservationId;
  3345. unsigned char ResponseStatus[12]; //Accepted, Faulted, Occupied, Rejected, Unavailable
  3346. unsigned char guid[37]; //OCPP Server request message uuid
  3347. };
  3348. struct StructReset
  3349. {
  3350. unsigned char Type[8]; //Hard, Soft
  3351. unsigned char ResponseStatus[10]; //Accepted, Rejected
  3352. unsigned char guid[37]; //OCPP Server request message uuid
  3353. };
  3354. struct StructSendLocalList
  3355. {
  3356. int ListVersion;
  3357. unsigned char UpdateType[16]; //Differential, Full
  3358. struct StructLocalAuthorizationList *LocalAuthorizationList;
  3359. unsigned char ResponseStatus[16]; //Accepted, Failed, NotSupported, VersionMismatch
  3360. };
  3361. struct StructSetChargingProfile
  3362. {
  3363. int ConnectorId;
  3364. struct StructChargingProfile ChargingProfile;
  3365. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotSupported
  3366. };
  3367. struct StructTriggerMessage
  3368. {
  3369. unsigned char RequestedMessage[32]; /*
  3370. "BootNotification",
  3371. "DiagnosticsStatusNotification",
  3372. "FirmwareStatusNotification",
  3373. "Heartbeat",
  3374. "MeterValues",
  3375. "StatusNotification"
  3376. */
  3377. int ConnectorId;
  3378. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotImplemented
  3379. };
  3380. struct StructUnlockConnector
  3381. {
  3382. int ConnectorId;
  3383. unsigned char ResponseStatus[16]; //Unlocked, UnlockFailed, NotSupported
  3384. unsigned char guid[37]; //OCPP Server request message uuid
  3385. };
  3386. struct StructUpdateFirmware
  3387. {
  3388. unsigned char Location[256];
  3389. int Retries;
  3390. unsigned char RetrieveDate[28];
  3391. int RetryInterval;
  3392. };
  3393. struct OCPP16ConfigurationItem
  3394. {
  3395. unsigned char ItemName[64];
  3396. unsigned char ItemAccessibility;//0:RO, 1:RW
  3397. unsigned char ItemData[128];
  3398. };
  3399. struct OCPP16ConfigurationTable
  3400. {
  3401. //please refer to OCPP 1.6 chapter 9
  3402. struct OCPP16ConfigurationItem CoreProfile[34];
  3403. struct OCPP16ConfigurationItem LocalAuthListManagementProfile[3];
  3404. struct OCPP16ConfigurationItem ReservationProfile[1];
  3405. struct OCPP16ConfigurationItem SmartChargingProfile[5];
  3406. };
  3407. struct OCPP16Data
  3408. {
  3409. 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"
  3410. unsigned char ChargeBoxId[128];
  3411. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  3412. unsigned int Timeout_Secs;
  3413. unsigned short Ping_Pong_Interval;
  3414. union
  3415. {
  3416. //Operations Initiated by Charge Point
  3417. unsigned char CpMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3418. struct
  3419. {
  3420. //CpMsgValue[0]
  3421. unsigned char DataTransferReq:1; //bit 0,
  3422. unsigned char DataTransferConf:1; //bit 1,
  3423. unsigned char StartTransactionReq:1; //bit 2,
  3424. unsigned char StartTransactionConf:1; //bit 3,
  3425. unsigned char StopTransactionReq:1; //bit 4,
  3426. unsigned char StopTransactionConf:1; //bit 5,
  3427. unsigned char :2; //bit 6,7 , reserved
  3428. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3429. }CpMsg;
  3430. union
  3431. {
  3432. //Operations Initiated by Sequence Point
  3433. unsigned char SpMsgValue[1];
  3434. struct
  3435. {
  3436. //SpMsgValue[0]
  3437. unsigned char BootNotificationReq :1; //bit 0,
  3438. unsigned char BootNotificationConf :1; //bit 1,
  3439. unsigned char AuthorizeReq :1; //bit 2,
  3440. unsigned char AuthorizeConf :1; //bit 3,
  3441. unsigned char DiagnosticsStatusNotificationReq :1; //bit 4,
  3442. unsigned char DiagnosticsStatusNotificationConf :1; //bit 5,
  3443. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  3444. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  3445. } bits;
  3446. } SpMsg;
  3447. union
  3448. {
  3449. //Operations Initiated by Central System
  3450. unsigned char CsMsgValue[3 * (CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY)];
  3451. struct
  3452. {
  3453. //CsMsgValue[0]
  3454. unsigned char CancelReservationReq :1; //bit 0,
  3455. unsigned char CancelReservationConf :1; //bit 1,
  3456. unsigned char ChangeAvailabilityReq :1; //bit 2,
  3457. unsigned char ChangeAvailabilityConf :1; //bit 3,
  3458. unsigned char ReserveNowReq :1; //bit 4,
  3459. unsigned char ReserveNowConf :1; //bit 5,
  3460. unsigned char SetChargingProfileReq :1; //bit 6,
  3461. unsigned char SetChargingProfileConf :1; //bit 7,
  3462. //CsMsgValue[1]
  3463. unsigned char TriggerMessageReq :1; //bit 0,
  3464. unsigned char TriggerMessageConf :1; //bit 1,
  3465. unsigned char UnlockConnectorReq :1; //bit 2,
  3466. unsigned char UnlockConnectorConf :1; //bit 3,
  3467. unsigned char RemoteStartTransactionReq :1; //bit 4,
  3468. unsigned char RemoteStartTransactionConf :1; //bit 5,
  3469. unsigned char RemoteStopTransactionReq :1; //bit 6,
  3470. unsigned char RemoteStopTransactionConf :1; //bit 7,
  3471. //CsMsgValue[2]
  3472. unsigned char ClearChargingProfileReq :1; //bit 0,
  3473. unsigned char ClearChargingProfileConf :1; //bit 1,
  3474. unsigned char DataTransferReq :1; //bit 2,
  3475. unsigned char DataTransferConf :1; //bit 3,
  3476. unsigned char GetCompositeScheduleReq :1; //bit 4,
  3477. unsigned char GetCompositeScheduleConf :1; //bit 5,
  3478. unsigned char :2; //bit 6,7
  3479. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3480. }CsMsg;
  3481. union
  3482. {
  3483. //Operations Initiated by Main System
  3484. unsigned char MsMsgValue[2];
  3485. struct
  3486. {
  3487. //CsMsgValue[0]
  3488. unsigned char ChangeConfigurationReq :1; //bit 0,
  3489. unsigned char ChangeConfigurationConf :1; //bit 1,
  3490. unsigned char ClearCacheReq :1; //bit 2,
  3491. unsigned char ClearCacheConf :1; //bit 3,
  3492. unsigned char GetConfigurationReq :1; //bit 4,
  3493. unsigned char GetConfigurationConf :1; //bit 5,
  3494. unsigned char UpdateFirmwareReq :1; //bit 6,
  3495. unsigned char UpdateFirmwareConf :1; //bit 7,
  3496. //CsMsgValue[1]
  3497. unsigned char GetDiagnosticsReq :1; //bit 0,
  3498. unsigned char GetDiagnosticsConf :1; //bit 1,
  3499. unsigned char GetLocalListVersionReq :1; //bit 2,
  3500. unsigned char GetLocalListVersionConf :1; //bit 3,
  3501. unsigned char ResetReq :1; //bit 4,
  3502. unsigned char ResetConf :1; //bit 5,
  3503. unsigned char SendLocalListReq :1; //bit 6,
  3504. unsigned char SendLocalListConf :1; //bit 7,
  3505. } bits;
  3506. } MsMsg;
  3507. union
  3508. {
  3509. //Operations triggered by CSU
  3510. unsigned char CSUMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3511. struct
  3512. {
  3513. //CSUMsgValue[0]
  3514. unsigned char ChargingProfileReq:1; //bit 0,
  3515. unsigned char ChargingProfileConf:1; //bit 0,
  3516. unsigned char :6; //bit 1,2,3,4,5,6,7 , reserved
  3517. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3518. }CSUMsg;
  3519. struct StructBootNotification BootNotification;
  3520. struct StructHeartbeat Heartbeat;
  3521. struct StructAuthorize Authorize;
  3522. struct StructStartTransaction StartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3523. struct StructStopTransaction StopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3524. struct StructStatusNotification StatusNotification[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3525. struct StructCancelReservation CancelReservation[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3526. struct StructChangeAvailability ChangeAvailability[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3527. struct StructChangeConfiguration ChangeConfiguration;
  3528. struct StructClearCache ClearCache;
  3529. struct StructClearChargingProfile ClearChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3530. struct StructDataTransfer DataTransfer[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3531. struct StructDiagnosticsStatusNotification DiagnosticsStatusNotification;
  3532. struct StructFirmwareStatusNotification FirmwareStatusNotification;
  3533. struct StructGetCompositeSchedule GetCompositeSchedule[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3534. struct StructGetConfiguration GetConfiguration;
  3535. struct StructGetDiagnostics GetDiagnostics;
  3536. struct StructGetLocalListVersion GetLocalListVersion;
  3537. struct StructMeterValues MeterValues[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3538. struct StructRemoteStartTransaction RemoteStartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3539. struct StructRemoteStopTransaction RemoteStopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3540. struct StructReserveNow ReserveNow[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3541. struct StructReset Reset;
  3542. struct StructSendLocalList SendLocalList;
  3543. struct StructSetChargingProfile SetChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3544. struct StructTriggerMessage TriggerMessage[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3545. struct StructUnlockConnector UnlockConnector[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3546. struct StructUpdateFirmware UpdateFirmware;
  3547. struct OCPP16ConfigurationTable ConfigurationTable;
  3548. struct StructChargingProfile SmartChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3549. };
  3550. #endif // DEFINE_H_