define.h 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116
  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 0x01800000-0x029FFFFF 24 MB
  23. Secondary root file system 0x03000000-0x047FFFFF 24 MB
  24. Primary user configuration 0x04800000-0x004DFFFF 6 MB
  25. Secondary user configuration 0x04E00000-0x0053FFFF 6 MB
  26. Factory default configuration 0x05400000-0x0059FFFF 6 MB
  27. Storage 0x05A00000-0x7FFFFFFF 1958 MB
  28. */
  29. /**************************************************************************************/
  30. /*********************************System Limitation**********************************/
  31. /**************************************************************************************/
  32. #define FirmwareVersion 0x00010201
  33. /*
  34. 0xAaBbCcDd
  35. Aa: main version
  36. Bb: minor version
  37. Cc:
  38. 0x01: UL
  39. 0x02: CE
  40. 0x03: JP
  41. 0x04: GB
  42. Dd:
  43. 0x01: CCS protocol
  44. 0x02: CHAdeMO protocol
  45. 0x03: GB Protocol
  46. */
  47. /*relevant to Quantity */
  48. #define CHAdeMO_QUANTITY 1
  49. #define CCS_QUANTITY 1
  50. #define GB_QUANTITY 1
  51. /*SystemLog message*/
  52. #define SystemLogMessage //for engineer to do analysis
  53. /**************************************************************************************/
  54. /**************************share memory key information***************************/
  55. /**************************************************************************************/
  56. #define ShmSysConfigAndInfoKey 1001
  57. #define ShmCcsCommKey 1004
  58. #define ShmStatusCodeKey 1005
  59. #define ShmInternalCommKey 1009
  60. /**************************************************************************************/
  61. /****structure SysConfigData => shall store the data to NAND flash****************/
  62. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  63. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  64. /**************************************************************************************/
  65. struct EthConfigData
  66. {
  67. unsigned char EthDhcpClient; //0: enable,1: disable
  68. unsigned char EthMacAddress[18]; //default: Null
  69. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  70. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  71. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  72. };
  73. struct WifiConfigData
  74. {
  75. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  76. unsigned char WifiSsid[256]; //default: Null
  77. unsigned char WifiPassword[256]; //default: Null
  78. int WifiRssi; //dbm
  79. unsigned char WifiDhcpServer; //0: enable, 1: disable
  80. unsigned char WifiDhcpClient; //0: enable, 1: disable
  81. unsigned char WifiMacAddress[18]; //default: Null
  82. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  83. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  84. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  85. };
  86. struct TeleConfigData
  87. {
  88. unsigned char TelcomApn[256]; //default: Null
  89. int TelcomRssi; //dbm
  90. unsigned char TelcomChapPapId[256]; //default: Null
  91. unsigned char TelcomChapPapPwd[256]; //default: Null
  92. unsigned char TelcomModemImei[16]; //default: Null
  93. unsigned char TelcomSimImsi[16]; //default: Null
  94. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  95. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
  96. unsigned char TelcomIpAddress[16]; //default: Null
  97. };
  98. struct SysConfigData
  99. {
  100. /**************System***************/
  101. unsigned char ModelName[64]; //charger model name
  102. unsigned char SerialNumber[64]; //charger system serial number
  103. unsigned char SystemId[128]; //charger system ID
  104. unsigned char SystemDateTime[32]; //charger system date and time
  105. unsigned char AuthorisationMode; //0: Phihong RFID tag, 1: OCPP backend, 2: Phihong backend, 3: free mode
  106. unsigned char DefaultLanguage; //
  107. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  108. unsigned short AcPlugInTimes; //0~65535
  109. unsigned short GbPlugInTimes; //0~65535
  110. unsigned short Ccs1PlugInTime; //0~65535
  111. unsigned short Ccs2PlugInTimes; //0~65535
  112. unsigned short ChademoPlugInTimes; //0~65535
  113. /**************Charging***************/
  114. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  115. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW"
  116. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp"
  117. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  118. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  119. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  120. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  121. /**************Network***************/
  122. unsigned char FtpServer[32]; //the ftp server for Phihong server to do data transimission
  123. struct EthConfigData Eth0Interface;
  124. struct EthConfigData Eth1Interface;
  125. struct WifiConfigData AthInterface;
  126. struct TeleConfigData TelecomInterface;
  127. /**************Backend***************/
  128. unsigned int BackendConnTimeout; //default : 300s
  129. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  130. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  131. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  132. 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"
  133. unsigned char ChargeBoxId[128];
  134. unsigned int Checksum; //4 bytes checksum
  135. };
  136. struct ChargingInfoData
  137. {
  138. float MaximumChargingVoltage; //0~6553.5 volt
  139. float AvailableChargingCurrent; //0~6553.5 amp
  140. float AvailableChargingPower; //0~6553.5 kW
  141. float PresentChargingVoltage ; //0~6553.5 volt
  142. float PresentChargingCurrent; //0~6553.5 amp
  143. float PresentChargingPower; //0~6553.5 kW
  144. float PresentChargedEnergy; //0~6553.5 kWh
  145. int PresentChargedDuration; // second
  146. int RemainChargingDuration; // second
  147. float EvBatteryMaxVoltage; // 0~6553.5 volt
  148. float EvBatterytargetVoltage; // 0~6553.5 volt
  149. int EvBatterySoc; // 0~100%
  150. unsigned char ConnectorPlugIn; //0: unplug, 1: Plug-in
  151. float PilotVoltage;
  152. 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
  153. unsigned char PilotDuty; // 0~100%
  154. };
  155. struct SysInfoData
  156. {
  157. /**************System***************/
  158. unsigned char SystemStatus; //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  159. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  160. float InputVoltageR; //0~655.35 volt
  161. float InputVoltageS; //0~655.35 volt
  162. float InputVoltageT; //0~655.35 volt
  163. unsigned int SystemFanRotaSpeed; //0 ~ 65535 RPM
  164. unsigned int PsuFanRotaSpeed; //0 ~ 65535 RPM
  165. unsigned char AuxPower5V; //0 ~ 255 volt
  166. unsigned char AuxPower12V; //0 ~ 255 volt
  167. unsigned char AuxPower24V; //0 ~ 255 volt
  168. unsigned char AuxPower48V; //0 ~ 255 volt
  169. unsigned char CsuHwRev[32]; //CSU board hardware version
  170. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  171. unsigned char CsuKernelFwRev[32]; //CSU board OS kernel firmware version
  172. unsigned char CsuRootFsFwRev[32]; //CSU board root file system firmware version
  173. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  174. unsigned char LcmHwRev[32]; //LCM module hardware version
  175. unsigned char LcmFwRev[32]; //LCM module firmware version
  176. unsigned char PsuHwRev[32]; //PSU hardware version
  177. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  178. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  179. unsigned char AuxPwrHwRev[32]; //Aux. power module hardware version
  180. unsigned char AuxPwrFwRev[32]; //Aux. power module firmware version
  181. unsigned char FanModuleHwRev[32]; //Fan module hardware version
  182. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  183. unsigned char RelayModuleHwRev[32]; //Relay control module hardware version
  184. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  185. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  186. int SystemAmbientTemp; // -40 ~ 215 degree C
  187. int SystemCriticalTemp; // -40 ~ 215 degree C
  188. int CcsConnectorTemp; // -40 ~ 215 degree C
  189. int PsuAmbientTemp; // -40 ~ 215 degree C
  190. /**************Charging***************/
  191. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  192. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  193. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  194. /**************Network***************/
  195. unsigned char InternetConn; //0: disconnected, 1: connected
  196. /**************Backend***************/
  197. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  198. };
  199. struct SysConfigAndInfo
  200. {
  201. struct SysConfigData SysConfig;
  202. struct SysInfoData SysInfo;
  203. };
  204. /**************************************************************************************/
  205. /**************************Alarm Share memory**************************************/
  206. /***************************************************************************************
  207. Status Code A B C D E F
  208. 0: Issue 1: From EVSE 1: Fault (unrecoverable) 001 ~ 999 serial number
  209. e.g., hardware broken, system latch
  210. 1: Recovered 2: From EV 2: Alarm (recoverable)
  211. e.g., OTP, OVP
  212. 3: From Backend 3: Information
  213. e.g., swipe card to stop charging
  214. according to XXX.Revxx
  215. ***************************************************************************************/
  216. /**************************************************************************************/
  217. char FaultStatusCode[32][6]=
  218. {
  219. "011001", //CHAdeMO output fuse blew
  220. "011002", //CCS output fuse blew
  221. "011003", //GB output fuse blew
  222. "011004", //RCD/CCID self-test fail
  223. "011005", //AC input contactor 1 welding
  224. "011006", //AC input contactor 1 driving fault
  225. "011007", //AC input contactor 2 welding
  226. "011008", //AC input contactor 2 driving fault
  227. "011009", //AC output relay welding
  228. "011010", //AC output relay driving fault
  229. "011011", //CHAdeMO output relay welding
  230. "011012", //CHAdeMO output relay driving fault
  231. "011013", //CCS output relay welding
  232. "011014", //CCS output relay driving fault
  233. "011015", //GB output relay welding
  234. "011016", //GB output relay driving fault
  235. "011017", //AC connector temperature sensor broken
  236. "011018", //CHAdeMO connector temperature sensor broken
  237. "011019", //CCS connector temperature sensor broken
  238. "011020", //GB connector temperature sensor broken
  239. "011021", //WiFi module broken
  240. "011022", //3G/4G module broken
  241. "011023", //Aux. power module broken
  242. "011024", //Relay control module /smart box broken
  243. "011025", //CHAdeMO connector lock fail
  244. "011026", //GB connector lock fail
  245. "011027", //AC connector lock fail
  246. "011028", //CHAdeMO module broken
  247. "011029", //CCS module broken
  248. "011030", //GBT module broken
  249. "011031", //PSU module broken
  250. "011032" //Reserved
  251. };
  252. struct FaultCodeData
  253. {
  254. unsigned char PreviousFaultVal[4];
  255. union
  256. {
  257. unsigned char FaultVal[4];
  258. struct
  259. {
  260. //FaultVal[0]
  261. unsigned char ChademoOutputFuseBlew:1; //bit 0
  262. unsigned char CcsOutputFuseBlew:1; //bit 1
  263. unsigned char GbOutputFuseBlew:1; //bit 2
  264. unsigned char RcdSelfTestFail:1; //bit 3
  265. unsigned char AcInputContactor1Welding:1; //bit 4
  266. unsigned char AcInputContactor1DrivingFault:1; //bit 5
  267. unsigned char AcInputContactor2Welding:1; //bit 6
  268. unsigned char AcInputContactor2DrivingFault:1; //bit 7
  269. //FaultVal[1]
  270. unsigned char AcOutputRelayWelding:1; //bit 0
  271. unsigned char AcOutputRelayDrivingFault:1; //bit 1
  272. unsigned char ChademoOutputRelayWelding:1; //bit 2
  273. unsigned char ChademoOutputRelayDrivingFault :1; //bit 3
  274. unsigned char CcsOutputRelayWelding:1; //bit 4
  275. unsigned char CcsOutputRelayDrivingFault:1; //bit 5
  276. unsigned char GbOutputRelayWelding:1; //bit 6
  277. unsigned char GbOutputRelayDrivingFault:1; //bit 7
  278. //FaultVal[2]
  279. unsigned char AcConnectorTempSensorBroken:1; //bit 0
  280. unsigned char ChademoConnectorTempSensorBroken:1; //bit 1
  281. unsigned char CcsConnectorTempSensorBroken:1; //bit 2
  282. unsigned char GbConnectorTempSensorBroken:1; //bit 3
  283. unsigned char WiFiModuleBroken:1; //bit 4
  284. unsigned char Telecom4GModuleBroken:1; //bit 5
  285. unsigned char AuxPowerModuleBroken:1; //bit 6
  286. unsigned char RelayControlModuleBroken :1; //bit 7
  287. //FaultVal[3]
  288. unsigned char ChademoConnectorLockFail:1; //bit 0
  289. unsigned char GbConnectorLockFail:1; //bit 1
  290. unsigned char AcConnectorLockFail:1; //bit 2
  291. unsigned char ChademoModuleBroken:1; //bit 3
  292. unsigned char CcsModuleBroken:1; //bit 4
  293. unsigned char GbModuleBroken:1; //bit 5
  294. unsigned char PsuModuleBroken:1; //bit 6
  295. unsigned char :1; //bit 7 reserved
  296. }bits;
  297. }FaultEvents;
  298. };
  299. char AlarmStatusCode[64][6]=
  300. {
  301. "012200", //System L1 input OVP
  302. "012201", //System L2 input OVP
  303. "012202", //System L3 input OVP
  304. "012203", //System L1 input UVP
  305. "012204", //System L2 input UVP
  306. "012205", //System L3 input UVP
  307. "012206", //PSU L1 input OVP
  308. "012207", //PSU L2 input OVP
  309. "012208", //PSU L3 input OVP
  310. "012209", //PSU L1 input UVP
  311. "012210", //PSU L2 input UVP
  312. "012211", //PSU L3 input UVP
  313. "012212", //System L1 input drop
  314. "012213", //System L2 input drop
  315. "012214", //System L3 input drop
  316. "012215", //System AC output OVP
  317. "012216", //System AC output OCP
  318. "012217", //System CHAdeMO output OVP
  319. "012218", //System CHAdeMO output OCP
  320. "012219", //System CCS output OVP
  321. "012220", //System CCS output OCP
  322. "012221", //System GB output OVP
  323. "012222", //System GB output OCP
  324. "012223", //System ambient/inlet OTP
  325. "012224", //System critical point OTP
  326. "012225", //PSU ambient/inlet OTP
  327. "012226", //PSU critical point OTP
  328. "012227", //Aux. power module OTP
  329. "012228", //Relay board/smart box OTP
  330. "012229", //CHAdeMO connector OTP
  331. "012230", //CCS connector OTP
  332. "012231", //GB connector OTP
  333. "012232", //AC connector OTP
  334. "012233", //RCD/CCID trip
  335. "012234", //CHAdeMO GFD trip
  336. "012235", //CCS GFD trip
  337. "012236", //GB GFD trip
  338. "012237", //SPD trip
  339. "012238", //Main power breaker trip
  340. "012239", //Aux. power breaker trip
  341. "012240", //PSU communication fail
  342. "012241", //WiFi module communication fail
  343. "012242", //3G/4G module communication fail
  344. "012243", //RFID module communication fail
  345. "012244", //Bluetooth module communication fail
  346. "012245", //LCM module communication fail
  347. "012246", //Aux. power module communication fail
  348. "012247", //Relay control boaed/smart box communication fail
  349. "012248", //CCS module communication fail
  350. "012249", //CHAdeMO module communication fail
  351. "012250", //GBT module communication fail
  352. "012251", //Emergency stop
  353. "012252", //Door open
  354. "012253", //System fan decay
  355. "012254", //Fail to create share memory
  356. "012255", //CSU initialization failed
  357. "012256", //Reserved
  358. "012257", //Reserved
  359. "012258", //Reserved
  360. "012259", //Reserved
  361. "012260", //Reserved
  362. "012261", //Reserved
  363. "012262", //Reserved
  364. "012263" //Reserved
  365. };
  366. struct AlarmCodeData
  367. {
  368. unsigned char PreviousAlarmVal[8];
  369. union
  370. {
  371. unsigned char AlarmVal[8];
  372. struct
  373. {
  374. //AlarmVal[0]
  375. unsigned char SystemL1InputOVP:1; //bit 0
  376. unsigned char SystemL2InputOVP:1; //bit 1
  377. unsigned char SystemL3InputOVP:1; //bit 2
  378. unsigned char SystemL1InputUVP:1; //bit 3
  379. unsigned char SystemL2InputUVP:1; //bit 4
  380. unsigned char SystemL3InputUVP:1; //bit 5
  381. unsigned char PsuL1InputOVP:1; //bit 6
  382. unsigned char PsuL2InputOVP:1; //bit 7
  383. //AlarmVal[1]
  384. unsigned char PsuL3InputOVP:1; //bit 0
  385. unsigned char PsuL1InputUVP:1; //bit 1
  386. unsigned char PsuL2InputUVP:1; //bit 2
  387. unsigned char PsuL3InputUVP :1; //bit 3
  388. unsigned char SystemL1InputDrop:1; //bit 4
  389. unsigned char SystemL2InputDrop:1; //bit 5
  390. unsigned char SystemL3InputDrop:1; //bit 6
  391. unsigned char SystemAcOutputOVP:1; //bit 7
  392. //AlarmVal[2]
  393. unsigned char SystemAcOutputOCP:1; //bit 0
  394. unsigned char SystemChademoOutputOVP:1; //bit 1
  395. unsigned char SystemChademoOutputOCP:1; //bit 2
  396. unsigned char SystemCcsOutputOVP:1; //bit 3
  397. unsigned char SystemCcsOutputOCP:1; //bit 4
  398. unsigned char SystemGbOutputOVP:1; //bit 5
  399. unsigned char SystemGbOutputOCP:1; //bit 6
  400. unsigned char SystemAmbientOTP :1; //bit 7
  401. //AlarmVal[3]
  402. unsigned char SystemCriticalPointOTP:1; //bit 0
  403. unsigned char PsuAmbientOTP:1; //bit 1
  404. unsigned char PsuCriticalPointOTP:1; //bit 2
  405. unsigned char AuxPowerModuleOTP:1; //bit 3
  406. unsigned char RelayBoardOTP:1; //bit 4
  407. unsigned char ChademoConnectorOTP:1; //bit 5
  408. unsigned char CcsConnectorOTP:1; //bit 6
  409. unsigned char GbConnectorOTP:1; //bit 7
  410. //AlarmVal[4]
  411. unsigned char AcConnectorOTP:1; //bit 0
  412. unsigned char RcdTrip:1; //bit 1
  413. unsigned char ChademoGfdTrip:1; //bit 2
  414. unsigned char CcsGfdTrip:1; //bit 3
  415. unsigned char GbGfdTrip:1; //bit 4
  416. unsigned char SpdTrip:1; //bit 5
  417. unsigned char MainPowerBreakerTrip:1; //bit 6
  418. unsigned char AuxPowerBreakerTrip:1; //bit 7
  419. //AlarmVal[5]
  420. unsigned char PsuCommunicationFail:1; //bit 0
  421. unsigned char WiFiModuleCommFail:1; //bit 1
  422. unsigned char Telecom4GModuleCommFail:1; //bit 2
  423. unsigned char RfidModuleCommFail:1; //bit 3
  424. unsigned char BluetoothModuleCommFail:1; //bit 4
  425. unsigned char LcmModuleCommFail:1; //bit 5
  426. unsigned char AuxPowerModuleCommFail:1; //bit 6
  427. unsigned char RelayBoardCommFail:1; //bit 7
  428. //AlarmVal[6]
  429. unsigned char CcsModuleCommFail:1; //bit 0
  430. unsigned char ChademoModuleCommFail:1; //bit 1
  431. unsigned char GbModuleCommFail:1; //bit 2
  432. unsigned char EmergencyStopTrip:1; //bit 3
  433. unsigned char DoorOpen:1; //bit 4
  434. unsigned char SystemFanDecay:1; //bit 5
  435. unsigned char FailToCreateShareMemory:1; //bit 6
  436. unsigned char CsuInitFailed:1; //bit 7
  437. //AlarmVal[7]
  438. unsigned char :8; //reserved
  439. }bits;
  440. }AlarmEvents;
  441. };
  442. char InfoStatusCode[64][6]=
  443. {
  444. //Information comes from EVSE
  445. "013600", //Normal stop charging by user
  446. "013601", //Charging Time's up
  447. "013602", //Replace system air filter
  448. "013603", //Reach to CHAdeMO max. plugging times.
  449. "013604", //Reach to CCS max. plugging times.
  450. "013605", //Reach to GB max. plugging times.
  451. "013606", //Reach to AC max. plugging times.
  452. "013607", //CSU fimrware update fail
  453. "013608", //CHAdeMO Module fimrware update fail
  454. "013609", //CCS Module fimrware update fail
  455. "013610", //GB Module fimrware update fail
  456. "013611", //Aux. power module fimrware update fail
  457. "013612", //Relay control module fimrware update fail
  458. "013613", //LCM module fimrware update fail
  459. "013614", //Bluetooth module fimrware update fail
  460. "013615", //WiFi module fimrware update fail
  461. "013616", //3G/4G module fimrware update fail
  462. "013617", //SMR fimrware update fail
  463. "013618", //RFID module fimrware update fail
  464. "013619", //configured by USB flash drive
  465. "013620", //configured by backend
  466. "013621", //configured by webpage
  467. "013622", //disconnected from Internet through Ethernet
  468. "013623", //disconnected from Internet through WiFi
  469. "013624", //disconnected from Internet through 3G/4G
  470. "013625", //disconnected from AP through WiFi
  471. "013626", //disconnected from APN through 3G/4G
  472. "013627", //Reserved
  473. "013628", //Reserved
  474. "013629", //Reserved
  475. "013630", //Reserved
  476. "013631", //Reserved
  477. //Information comes from EV
  478. "023700", //CHAdeMO EV communication Fail
  479. "023701", //CCS EV communication Fail
  480. "023702", //GB EV communication Fail
  481. "023703", //AC: pilot fault
  482. "023704", //CHAdeMO: battery malfunction
  483. "023705", //CHAdeMO: no charging permission
  484. "023706", //CHAdeMO: battery incompatibility
  485. "023707", //CHAdeMO: battery OVP
  486. "023708", //CHAdeMO: battery UVP
  487. "023709", //CHAdeMO: battery OTP
  488. "023710", //CHAdeMO: battery current difference
  489. "023711", //CHAdeMO: battery voltage difference
  490. "023712", //CHAdeMO: shift position
  491. "023713", //CHAdeMO: battery other fault
  492. "023714", //CHAdeMO: charging system error
  493. "023715", //CHAdeMO: EV normal stop
  494. "023716", //Reserved
  495. "023717", //Reserved
  496. "023718", //Reserved
  497. "023719", //Reserved
  498. "023720", //Reserved
  499. "023721", //Reserved
  500. "023722", //Reserved
  501. "023723", //Reserved
  502. //Information comes from Backend
  503. "033900", //disconnected from backend through Ethernet
  504. "033901", //disconnected from backend through WiFi
  505. "033902", //disconnected from backend through 3G/4G
  506. "033903", //Remote start charging by backend
  507. "033904", //Remote stop charging by backend
  508. "033905", //Remote reset by backend
  509. "033906", //Reserved
  510. "033907", //Reserved
  511. };
  512. struct InfoCodeData
  513. {
  514. unsigned char PreviousInfoVal[8];
  515. union
  516. {
  517. unsigned char InfoVal[8];
  518. struct
  519. {
  520. //InfoVal[0]
  521. unsigned char NormalStopChargingByUser:1; //bit 0
  522. unsigned char ChargingTimesUp:1; //bit 1
  523. unsigned char ReplaceSystemAirFilter:1; //bit 2
  524. unsigned char ReachChademoMaxPluggingTimes:1; //bit 3
  525. unsigned char ReachCcsMaxPluggingTimes:1; //bit 4
  526. unsigned char ReachGbMaxPluggingTimes:1; //bit 5
  527. unsigned char ReachAcMaxPluggingTimes:1; //bit 6
  528. unsigned char CsuFimrwareUpdateFail:1; //bit 7
  529. //InfoVal[1]
  530. unsigned char ChademoModuleFimrwareUpdateFail:1; //bit 0
  531. unsigned char CcsModuleFimrwareUpdateFail:1; //bit 1
  532. unsigned char GbModuleFimrwareUpdateFail:1; //bit 2
  533. unsigned char AuxPowerModuleFimrwareUpdateFail:1; //bit 3
  534. unsigned char RelayBoardFimrwareUpdateFail:1; //bit 4
  535. unsigned char LcmModuleFimrwareUpdateFail:1; //bit 5
  536. unsigned char BluetoothModuleFimrwareUpdateFail:1; //bit 6
  537. unsigned char WiFiModuleFimrwareUpdateFail:1; //bit 7
  538. //InfoVal[2]
  539. unsigned char Telocom4GModuleFimrwareUpdateFail:1; //bit 0
  540. unsigned char PsuFimrwareUpdateFail:1; //bit 1
  541. unsigned char RfidModuleFimrwareUpdateFail:1; //bit 2
  542. unsigned char ConfiguredByUsbFlashDrive:1; //bit 3
  543. unsigned char ConfiguredByBackend:1; //bit 4
  544. unsigned char ConfiguredByWebpage:1; //bit 5
  545. unsigned char InternetDisconnectViaEthernet:1; //bit 6
  546. unsigned char InternetDisconnectViaWiFi :1; //bit 7
  547. //InfoVal[3]
  548. unsigned char InternetDisconnectVia4Gi:1; //bit 0
  549. unsigned char ApDisconnectViaWiFi:1; //bit 1
  550. unsigned char ApnDisconnectVia4Gi:1; //bit 2
  551. unsigned char :5; //bit 3~7 reserved
  552. //InfoVal[4]
  553. unsigned char ChademoEvCommFail:1; //bit 0
  554. unsigned char CcsEvCommFail:1; //bit 1
  555. unsigned char GbEvCommFail:1; //bit 2
  556. unsigned char PilotFault:1; //bit 3
  557. unsigned char ChademoBatteryMalfun:1; //bit 4
  558. unsigned char ChademoNoPermission:1; //bit 5
  559. unsigned char ChademoBatteryIncompatibility:1; //bit 6
  560. unsigned char ChademoBatteryOVP:1; //bit 7
  561. //InfoVal[5]
  562. unsigned char ChademoBatteryUVP:1; //bit 0
  563. unsigned char ChademoBatteryOTP:1; //bit 1
  564. unsigned char ChademoBatteryCurrentDiff:1; //bit 2
  565. unsigned char ChademoBatteryVoltageDiff:1; //bit 3
  566. unsigned char ChademoShiftPosition:1; //bit 4
  567. unsigned char ChademoBatteryOtherFault:1; //bit 5
  568. unsigned char ChademoChargingSystemError:1; //bit 6
  569. unsigned char ChademoEvNormalStop:1; //bit 7
  570. //InfoVal[6]
  571. unsigned char :8; //bit 0~7 reserved
  572. //InfoVal[7]
  573. unsigned char BackendDisconnectedViaEthernet:1; //bit 0
  574. unsigned char BackendDisconnectViaWiFi:1; //bit 1
  575. unsigned char BackendDisconnectVia4G:1; //bit 2
  576. unsigned char BackendRemoteStart:1; //bit 3
  577. unsigned char BackendRemoteStop:1; //bit 4
  578. unsigned char BackendRemoteReset:1; //bit 5
  579. unsigned char :2; //bit 6~7 reserved
  580. }bits;
  581. }InfoEvents;
  582. };
  583. struct StatusCodeData
  584. {
  585. unsigned char PresentStatusCode[10][6];
  586. struct FaultCodeData FaultCode;
  587. struct AlarmCodeData AlarmCode;
  588. struct InfoCodeData InfoCode;
  589. };
  590. /************************************************************************************/
  591. /**************************CCS protocol Share memory***************************/
  592. /**************************DIN70121: 201412***************************************/
  593. /**************************ISO15118_2014: 2014************************************/
  594. /**************************ISO15118_2018: 2018************************************/
  595. /************************************************************************************/
  596. typedef enum boolean { FALSE, TRUE } BOOL;
  597. enum ResponseCodeType_DIN70121 { OK_DIN70121 = 0, OK_NewSessionEstablished_DIN70121 = 1, OK_OldSessionJoined_DIN70121 = 2, OK_CertificateExpiresSoon_DIN70121 = 3,
  598. FAILED_DIN70121 = 4, FAILED_SequenceError_DIN70121 = 5, FAILED_ServiceIDInvalid_DIN70121 = 6, FAILED_UnknownSession_DIN70121 = 7,
  599. FAILED_ServiceSelectionInvalid_DIN70121 = 8, FAILED_PaymentSelectionInvalid_DIN70121 = 9, FAILED_CertificateExpired_DIN70121 = 10,
  600. FAILED_SignatureError_DIN70121 = 11, FAILED_NoCertificateAvailable_DIN70121 = 12, FAILED_CertChainError_DIN70121 = 13, FAILED_ChallengeInvalid_DIN70121 = 14,
  601. FAILED_ContractCanceled_DIN70121 = 15, FAILED_WrongChargeParameter_DIN70121 = 16, FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  602. FAILED_TariffSelectionInvalid_DIN70121 = 18, FAILED_ChargingProfileInvalid_DIN70121 = 19, FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  603. FAILED_MeteringSignatureNotValid_DIN70121 = 21, FAILED_WrongEnergyTransferType_DIN70121 = 22};
  604. enum ResponseCodeType_ISO15118_2014 { OK_ISO15118_2014 = 0, OK_NewSessionEstablished_ISO15118_2014 = 1, OK_OldSessionJoined_ISO15118_2014 = 2, OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  605. FAILED_ISO15118_2014 = 4, FAILED_SequenceError_ISO15118_2014 = 5, FAILED_ServiceIDInvalid_ISO15118_2014 = 6, FAILED_UnknownSession_ISO15118_2014 = 7,
  606. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8, FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9, FAILED_CertificateExpired_ISO15118_2014 = 10,
  607. FAILED_SignatureError_ISO15118_2014 = 11, FAILED_NoCertificateAvailable_ISO15118_2014 = 12, FAILED_CertChainError_ISO15118_2014 = 13, FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  608. FAILED_ContractCanceled_ISO15118_2014 = 15, FAILED_WrongChargeParameter_ISO15118_2014 = 16, FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  609. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18, FAILED_ChargingProfileInvalid_ISO15118_2014 = 19, FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  610. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21, FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22, FAILED_ContactorError_ISO15118_2014 = 23,
  611. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24, FAILED_CertificateRevoked_ISO15118_2014 = 25 };
  612. enum ResponseCodeType_ISO15118_2018 { OK_ISO15118_2018 = 0, OK_NewSessionEstablished_ISO15118_2018 = 1, OK_OldSessionJoined_ISO15118_2018 = 2, OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  613. OK_IsolationValid_ISO15118_2018 = 4, OK_IsolationWarning_ISO15118_2018 = 5, WARNING_CertificateExpired_ISO15118_2018 = 6, WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  614. WARNING_CertValidationError_ISO15118_2018 = 8, WARNING_CertVerificationError_ISO15118_2018 = 9, WARNING_ContractCanceled_ISO15118_2018 = 10,
  615. FAILED_ISO15118_2018 = 11, FAILED_SequenceError_ISO15118_2018 = 12, FAILED_ServiceIDInvalid_ISO15118_2018 = 13, FAILED_UnknownSession_ISO15118_2018 = 14,
  616. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15, FAILED_SignatureError_ISO15118_2018 = 16, FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  617. FAILED_ChallengeInvalid_ISO15118_2018 = 18, FAILED_WrongChargeParameter_ISO15118_2018 = 19, FAILED_IsolationFault_ISO15118_2018 = 20,
  618. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21, FAILED_TariffSelectionInvalid_ISO15118_2018 = 22, FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  619. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24, FAILED_NoChargeServiceSelected_ISO15118_2018 = 25, FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  620. FAILED_ContactorError_ISO15118_2018 = 27, FAILED_CertificateRevoked_ISO15118_2018 = 28, FAILED_CertificateNotYetValid_ISO15118_2018 = 29 };
  621. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  622. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  623. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  624. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  625. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  626. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  627. enum EnergyTransferModeType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  628. DC_combo_core = 4, DC_unique = 5};
  629. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  630. 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};
  631. 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};
  632. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  633. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  634. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  635. enum DC_EVErrorCodeType { NO_ERROR = 0, FAILED_RESSTemperatureInhibit = 1, FAILED_EVShiftPosition = 2, FAILED_ChargerConnectorLockFault = 3,
  636. FAILED_EVRESSMalfunction = 4, FAILED_ChargingCurrentdifferential = 5, FAILED_ChargingVoltageOutOfRange = 6,
  637. Reserved_A = 7, Reserved_B = 8, Reserved_C = 9, FAILED_ChargingSystemIncompatibility = 10, NoData = 11};
  638. enum IsolationLevelType_DIN70121 { Invalid_DIN70121 = 0, Valid_DIN70121 = 1, Warning_DIN70121 = 2, Fault_DIN70121 = 3};
  639. 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};
  640. enum DC_EVSEStatusCodeType { EVSE_NotReady = 0, EVSE_Ready = 1, EVSE_Shutdown = 2, EVSE_UtilityInterruptEvent = 3,
  641. EVSE_IsolationMonitoringActive = 4, EVSE_EmergencyShutdown = 5, EVSE_Malfunction = 6,
  642. Reserved_8 = 7, Reserved_9 = 8};
  643. enum ScheduleOriginType { EV = 0, SA = 1};
  644. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  645. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  646. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  647. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  648. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  649. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  650. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  651. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  652. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  653. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  654. enum ChargingSessionType { Terminate = 0, Pause = 1};
  655. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  656. enum MsgFlowStatus { Idle = 0, CM_SLAC_PARM_REQ = 1, CM_SLAC_PARM_CONF = 2, CM_START_ATTEN_CHAR_IND = 3, CM_MNBC_SOUND_IND = 4, CM_ATTEN_CHAR_IND = 5,
  657. CM_ATTEN_CHAR_RSP = 6, CM_VALIDATE_REQ = 7, CM_VALIDATE_CNF = 8, CM_SLAC_MATCH_REQ = 9, CM_SLAC_MATCH_CNF = 10, CM_AMP_MAP_REQ = 11,
  658. CM_AMP_MAP_CNF = 12, CM_SET_KEY_REQ=13, CM_SET_KEY_CNF = 14, SLACC_SDP_UDP_Connection = 15,
  659. SLACC_SDP_TCP_Connection = 16, SupportedAppProtocolRequest = 17, SupportedAppProtocolResponse = 18, SessionSetupRequest = 19, SessionSetupResponse = 20,
  660. ServiceDiscoveryRequest = 21, ServiceDiscoveryResponse = 22, ServiceDetailRequest = 23, ServiceDetailResponse = 24, ServiceAndPaymentSelectionRequest = 25, ServiceAndPaymentSelectionResponse = 26,
  661. PaymentDetailsRequest = 27, PaymentDetailsResponse = 28, AuthorizationRequest = 29, AuthorizationResponse = 30, CertificateUpdateRequest = 31, CertificateUpdateResponse = 32,
  662. CertificateInstallationRequest = 33, CertificateInstallationResponse = 34, ChargeParameterDiscoveryRequest = 35, ChargeParameterDiscoveryResponse = 36, CableCheckRequest = 37, CableCheckResponse = 38,
  663. PreChargeRequest = 39, PreChargeResponse = 40, PowerDeliveryRequestStart = 41, PowerDeliveryResponsetStart = 42, ChargingStatusRequest = 43, ChargingStatusResponse = 44,
  664. CurrentDemandRequest = 45, CurrentDemandResponse = 46, MeteringReceiptRequest = 47, MeteringReceiptResponse = 48, PowerDeliveryRequestStop = 49, PowerDeliveryResponsetStop = 50,
  665. WeldingDetectionRequest = 51, WeldingDetectionResponse = 52, SessionStopRequest = 53, SessionStopResponse = 54,
  666. Performance_Timeout = 253, Sequence_Timeout = 254, Other_Fault=255 };
  667. struct PhysicalValueType_DIN70121 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  668. {
  669. int Multiplier; //range: -3..+3
  670. enum unitSymbolType_DIN70121 Unit;
  671. short Value;
  672. };
  673. struct PhysicalValueType_ISO15118_2014 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  674. {
  675. int Multiplier; //range: -3..+3
  676. enum unitSymbolType_ISO15118_2014 Unit;
  677. short Value;
  678. };
  679. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  680. {
  681. int Exponent; //range: -3..+3
  682. short Value;
  683. };
  684. struct AppProtocolType
  685. {
  686. unsigned char ProtocolNamespace[100];
  687. unsigned int VersionNumberMajor;
  688. unsigned int VersionNumberMinor;
  689. unsigned char SchemaID;
  690. unsigned char Priority; //range 1..20
  691. };
  692. struct ACD_SSEnergyTransferModeType
  693. {
  694. unsigned char EVID[20];
  695. };
  696. struct EVSEStatusType
  697. {
  698. unsigned short NotificationMaxDelay; //in seconds
  699. enum EVSENotificationType EVSENotification;
  700. };
  701. struct ServiceIDListType
  702. {
  703. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  704. };
  705. struct PaymentOptionListType
  706. {
  707. enum PaymentOptionType PaymentOption[2];
  708. };
  709. struct ServiceTagType
  710. {
  711. unsigned short ServiceID;
  712. unsigned char ServiceName[32];//Optional Element
  713. enum ServiceCategoryType ServiceCategory;
  714. unsigned char ServiceScope[32];//Optional Element
  715. };
  716. struct ServiceType_DIN70121
  717. {
  718. struct ServiceTagType ServiceTag;
  719. BOOL FreeService;
  720. };
  721. struct ServiceType_ISO15118_2014
  722. {
  723. unsigned short ServiceID;
  724. unsigned char ServiceName[32]; //Optional
  725. enum ServiceCategoryType ServiceCategory;
  726. unsigned char ServiceScope[64]; //Optional
  727. BOOL FreeService;
  728. };
  729. /*struct ServiceType_ISO15118_2018
  730. {
  731. unsigned short ServiceID;
  732. BOOL FreeService;
  733. }; */
  734. struct SupportedEnergyTransferModeType
  735. {
  736. enum EnergyTransferModeType EnergyTransferMode[6];
  737. };
  738. struct ServiceChargeType
  739. {
  740. struct ServiceType_DIN70121 Services;
  741. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  742. enum EnergyTransferModeType EnergyTransferType;
  743. };
  744. struct ChargeServiceType
  745. {
  746. struct ServiceType_ISO15118_2014 Services;
  747. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  748. };
  749. struct ServiceListType
  750. {
  751. struct ServiceType_ISO15118_2014 Service[8];
  752. };
  753. struct IdentificationOptionListType
  754. {
  755. enum PaymentOptionType IdentificationOption[2];
  756. };
  757. struct ParameterType
  758. {
  759. unsigned char Name[32];
  760. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  761. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  762. };
  763. struct ParameterSetType
  764. {
  765. short ParameterSetID;
  766. struct ParameterType Parameter[16];
  767. };
  768. struct ServiceParameterListType
  769. {
  770. struct ParameterSetType ParameterSet[255];
  771. };
  772. struct WPT_SDlEnergyTransferModeType
  773. {
  774. struct ServiceParameterListType ServiceParameterList;
  775. };
  776. struct SelectedServiceType
  777. {
  778. unsigned short ServiceID;
  779. short ParameterSetID;
  780. };
  781. struct SelectedServiceListType
  782. {
  783. struct SelectedServiceType SelectedService[16];
  784. };
  785. struct CertificateChainType
  786. {
  787. unsigned char Id[32]; //Optional
  788. unsigned char Certificate[800]; //check size again
  789. unsigned char SubCertificates[4][800]; //Optional, check size again
  790. };
  791. struct PNC_AReqIdentificationModeType
  792. {
  793. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  794. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  795. };
  796. struct AC_EVChargeParameterType
  797. {
  798. unsigned int DepartureTime; //Optional
  799. struct PhysicalValueType_ISO15118_2014 EAmount;
  800. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  801. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  802. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  803. };
  804. struct DC_EVStatusType_DIN70121
  805. {
  806. BOOL EVReady;
  807. BOOL EVCabinConditioning;
  808. BOOL EVRESSConiditioning;
  809. enum DC_EVErrorCodeType EVErrorCode;
  810. unsigned char EVRESSSOC; /*0-100 percentage*/
  811. };
  812. struct DC_EVChargeParameterType_DIN70121
  813. {
  814. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  815. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  816. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  817. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  818. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  819. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  820. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  821. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  822. };
  823. struct DC_EVStatusType_ISO15118_2014
  824. {
  825. BOOL EVReady;
  826. enum DC_EVErrorCodeType EVErrorCode;
  827. unsigned char EVRESSSOC; /*0-100 percentage*/
  828. };
  829. struct DC_EVChargeParameterType_ISO15118_2014
  830. {
  831. unsigned int DepartureTime; //Optional
  832. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  833. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  834. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  835. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  836. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  837. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  838. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  839. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  840. };
  841. struct Dynamic_CPDReqControlModeType
  842. {
  843. unsigned int DepartureTime;
  844. };
  845. struct RelativeTimeIntervalType
  846. {
  847. unsigned int duration; //Optional
  848. unsigned int start;
  849. };
  850. struct PMaxScheduleEntryType
  851. {
  852. struct RelativeTimeIntervalType RelativeTimeInterval;
  853. unsigned short PMax;
  854. };
  855. struct PMaxScheduleType
  856. {
  857. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  858. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  859. };
  860. struct CostType
  861. {
  862. unsigned int amount;
  863. enum CostKindType costKind;
  864. int amountMultiplier; //Optional , range: -3..+3
  865. };
  866. struct ConsumptionCostType
  867. {
  868. struct CostType Cost[3];
  869. struct PhysicalValueType_ISO15118_2014 startValue;
  870. };
  871. struct SalesTariffEntryType
  872. {
  873. struct RelativeTimeIntervalType RelativeTimeInterval;
  874. unsigned char EPriceLevel; //Optional
  875. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  876. };
  877. struct SalesTariffType
  878. {
  879. unsigned char Id[32]; //Optional
  880. short SalesTariffID;
  881. unsigned char SalesTariffDescription[32]; //Optional
  882. unsigned char NumEPriceLevels; //Optional
  883. struct SalesTariffEntryType SalesTariffEntry[1024];
  884. };
  885. struct SAScheduleTupleType
  886. {
  887. short SAScheduleTupleID;
  888. struct PMaxScheduleType PMaxSchedule;
  889. struct SalesTariffType SalesTariff; //Optional
  890. };
  891. struct ScheduleListType
  892. {
  893. enum ScheduleOriginType ScheduleOrigin;
  894. struct SAScheduleTupleType ScheduleTuple[3];
  895. };
  896. struct Scheduled_CPDReqControlModeType
  897. {
  898. enum ProcessingType EVProcessing;
  899. unsigned int DepartureTime; //Optional
  900. unsigned short MaxSupportingPoints;
  901. struct ScheduleListType ScheduleList; //Optional
  902. };
  903. struct AC_CPDReqEnergyTransferModeType
  904. {
  905. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  906. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  907. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  908. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  909. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  910. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  911. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  912. };
  913. struct DC_CPDReqEnergyTransferModeType
  914. {
  915. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  916. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  917. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  918. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  919. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  920. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  921. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  922. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  923. unsigned char TargetSOC; //Optional
  924. unsigned char BulkSOC; //Optional
  925. };
  926. struct BPT_AC_CPDReqEnergyTransferModeType
  927. {
  928. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  929. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  930. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  931. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  932. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  933. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  934. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  935. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  936. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  937. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  938. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  939. };
  940. struct BPT_DC_CPDReqEnergyTransferModeType
  941. {
  942. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  943. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  944. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  945. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  946. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  947. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  948. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  949. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  950. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  951. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  952. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  953. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  954. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  955. unsigned char TargetSOC; //Optional
  956. unsigned char BulkSOC; //Optional
  957. };
  958. struct WPT_CPDReqEnergyTransferModeType
  959. {
  960. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  961. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  962. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  963. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  964. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  965. };
  966. struct ACD_CPDReqEnergyTransferModeType
  967. {
  968. //cannot be found in standard
  969. };
  970. struct SAScheduleListType
  971. {
  972. struct SAScheduleTupleType SAScheduleTuple[3];
  973. };
  974. struct DC_EVSEStatusType_DIN70121
  975. {
  976. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  977. enum DC_EVSEStatusCodeType EVSEStatusCode;
  978. unsigned int NotificationMaxDelay;
  979. enum EVSENotificationType EVSENotification;
  980. };
  981. struct DC_EVSEChargeParameterType_DIN70121
  982. {
  983. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  984. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  985. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  986. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  987. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  988. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  989. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  990. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  991. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  992. };
  993. struct AC_EVSEStatusType
  994. {
  995. BOOL RCD;
  996. unsigned short NotificationMaxDelay;
  997. enum EVSENotificationType EVSENotification; //need to be confirmed
  998. };
  999. struct AC_EVSEChargeParameterType
  1000. {
  1001. struct AC_EVSEStatusType AC_EVSEStatus;
  1002. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  1003. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  1004. };
  1005. struct DC_EVSEStatusType_ISO15118_2014
  1006. {
  1007. unsigned short NotificationMaxDelay;
  1008. enum EVSENotificationType EVSENotification;
  1009. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  1010. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  1011. };
  1012. struct DC_EVSEChargeParameterType_ISO15118_2014
  1013. {
  1014. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1015. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  1016. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  1017. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  1018. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  1019. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  1020. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  1021. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  1022. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  1023. };
  1024. struct Scheduled_CPDResControlModeType
  1025. {
  1026. struct ScheduleListType ScheduleList;
  1027. };
  1028. struct AC_CPDResEnergyTransferModeType
  1029. {
  1030. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1031. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1032. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1033. };
  1034. struct DC_CPDResEnergyTransferModeType
  1035. {
  1036. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1037. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1038. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1039. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1040. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1041. };
  1042. struct BPT_AC_CPDResEnergyTransferModeType
  1043. {
  1044. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1045. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  1046. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1047. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1048. };
  1049. struct BPT_DC_CPDResEnergyTransferModeType
  1050. {
  1051. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1052. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  1053. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1054. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  1055. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1056. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  1057. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1058. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1059. };
  1060. struct WPT_CPDResEnergyTransferModeType
  1061. {
  1062. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  1063. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  1064. };
  1065. struct ACD_CPDResEnergyTransferModeType
  1066. {
  1067. //not found in ISO15118_2018
  1068. };
  1069. struct ProfileEntryType_DIN70121
  1070. {
  1071. unsigned int ChargingProfileEntryStart;
  1072. short ChargingProfileEntryMaxPower;
  1073. };
  1074. struct ChargingProfileType_DIN70121
  1075. {
  1076. short SAScheduleTupleID;
  1077. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  1078. };
  1079. struct DC_EVPowerDeliveryParameterType_DIN70121
  1080. {
  1081. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1082. BOOL BulkChargingComplete; //Optional
  1083. BOOL ChargingComplete;
  1084. };
  1085. struct ProfileEntryType_ISO15118_2014
  1086. {
  1087. unsigned int ChargingProfileEntryStart;
  1088. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  1089. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  1090. };
  1091. struct ChargingProfileType_ISO15118_2014
  1092. {
  1093. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  1094. };
  1095. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  1096. {
  1097. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1098. BOOL BulkChargingComplete; //Optional
  1099. BOOL ChargingComplete;
  1100. };
  1101. struct TimeInterval
  1102. {
  1103. unsigned int start;
  1104. unsigned int duration; //Optional
  1105. };
  1106. struct PowerScheduleEntryType
  1107. {
  1108. struct TimeInterval TimeInterval;
  1109. struct PhysicalValueType_ISO15118_2018 Power[3];
  1110. };
  1111. struct EVPowerProfileType
  1112. {
  1113. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  1114. };
  1115. struct Scheduled_PDReqControlModeType
  1116. {
  1117. unsigned char ScheduleTupleID;
  1118. struct EVPowerProfileType EVPowerProfile;
  1119. };
  1120. struct BPT_Scheduled_PDReqControlModeType
  1121. {
  1122. unsigned char ScheduleTupleID;
  1123. struct EVPowerProfileType EVPowerProfile; //Optional
  1124. enum evOperationType EVOperation;
  1125. };
  1126. struct ListOfRootCertificateIDsType
  1127. {
  1128. unsigned char RootCertificateID[20][40];
  1129. };
  1130. struct ContractSignatureEncryptedPrivateKeyType
  1131. {
  1132. unsigned char Id[32];
  1133. };
  1134. struct DiffieHellmanPublickeyType
  1135. {
  1136. unsigned char Id[32];
  1137. };
  1138. struct ContractCertificateEncryptedPrivateKeyType
  1139. {
  1140. unsigned char Id[32];
  1141. };
  1142. struct EVTechnicalStatusType
  1143. {
  1144. BOOL EV_Status_ReadyToCharge;
  1145. BOOL EV_Status_ImmobilizationRequest; //Optional
  1146. BOOL EV_Status_Immobilized;
  1147. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  1148. enum EV_CP_StatusType EV_CP_Status;
  1149. unsigned char EV_Status_RESSSOC; //0~100%
  1150. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  1151. BOOL EVSE_Timeout;
  1152. };
  1153. struct MeterInfoType_ISO15118_2014
  1154. {
  1155. unsigned char MeterID[32];
  1156. unsigned long MeterReading; //Optional
  1157. unsigned char SigMeterReading[64]; //Optional
  1158. short MeterStatus; //Optional
  1159. short TMeter; //Optional
  1160. };
  1161. struct Scheduled_MRReqControlModeType
  1162. {
  1163. unsigned char ScheduleTupleID;
  1164. };
  1165. struct MeterInfoType_ISO15118_2018
  1166. {
  1167. unsigned char MeterID[32];
  1168. unsigned long MeterReadingWhCharged; //Optional
  1169. unsigned long MeterReadingWhDischarged; //Optional
  1170. unsigned long MeterReadingVARhLeading; //Optional
  1171. unsigned long MeterReadingVARhLagging; //Optional
  1172. unsigned char SignatureMeterReading[64]; //Optional
  1173. short MeterStatus; //Optional
  1174. short TimeStampMeter; //Optional
  1175. BOOL ReceiptRequired; //Optional
  1176. };
  1177. struct PnC_CLReqIdentificationModeType
  1178. {
  1179. BOOL MeteringReceiptRequested;
  1180. };
  1181. struct Dynamic_CSReqControlModeType
  1182. {
  1183. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  1184. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  1185. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  1186. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1187. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1188. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1189. };
  1190. struct Scheduled_CSReqControlModeType
  1191. {
  1192. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1193. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1194. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1195. BOOL Standby;
  1196. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  1197. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  1198. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  1199. };
  1200. struct DisplayParametersType
  1201. {
  1202. unsigned short CurrentRange;
  1203. unsigned char CurrentSOC; //0~100%
  1204. unsigned char MinimumSOC; //0~100%
  1205. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  1206. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  1207. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  1208. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  1209. BOOL ChargingComplete;
  1210. BOOL BulkChargingComplete;
  1211. BOOL InletHot;
  1212. };
  1213. struct PnC_CLResIdentificationModeType
  1214. {
  1215. struct MeterInfoType_ISO15118_2018 MeterInfo;
  1216. };
  1217. struct Dynamic_CSResControlModeType
  1218. {
  1219. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  1220. };
  1221. struct Scheduled_CDResControlModeType
  1222. {
  1223. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  1224. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  1225. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  1226. };
  1227. struct LFA_EVFinePositioningSetupParametersType
  1228. {
  1229. unsigned char NumberOfSensors;
  1230. //NOT complete yet, to be continue.....
  1231. };
  1232. /****SupportedAppProtocolRequest****/
  1233. struct SupportedAppProtocolRequest_DIN70121
  1234. {
  1235. struct AppProtocolType AppProtocol[20];
  1236. };
  1237. struct SupportedAppProtocolRequest_ISO15118_2014
  1238. {
  1239. struct AppProtocolType AppProtocol[20];
  1240. };
  1241. struct SupportedAppProtocolRequest_ISO15118_2018
  1242. {
  1243. struct AppProtocolType AppProtocol[20];
  1244. };
  1245. /****SupportedAppProtocolResponse****/
  1246. struct SupportedAppProtocolResponse_DIN70121
  1247. {
  1248. enum ResponseCodeType_DIN70121 ResponseCode;
  1249. unsigned char SchemaID; //Optional
  1250. };
  1251. struct SupportedAppProtocolResponse_ISO15118_2014
  1252. {
  1253. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1254. unsigned char SchemaID; //Optional
  1255. };
  1256. struct SupportedAppProtocolResponse_ISO15118_2018
  1257. {
  1258. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1259. unsigned char SchemaID; //Optional
  1260. };
  1261. /****SessionSetupRequest****/
  1262. struct SessionSetupRequest_DIN70121
  1263. {
  1264. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1265. };
  1266. struct SessionSetupRequest_ISO15118_2014
  1267. {
  1268. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1269. };
  1270. struct SessionSetupRequest_ISO15118_2018
  1271. {
  1272. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1273. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  1274. };
  1275. /****SessionSetupResponse****/
  1276. struct SessionSetupResponse_DIN70121
  1277. {
  1278. enum ResponseCodeType_DIN70121 ResponseCode;
  1279. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1280. unsigned int EVSETimeStamp; //EPOCH format, Optional
  1281. };
  1282. struct SessionSetupResponse_ISO15118_2014
  1283. {
  1284. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1285. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1286. unsigned int EVSETimeStamp; //EPOCH format, Optional
  1287. };
  1288. struct SessionSetupResponse_ISO15118_2018
  1289. {
  1290. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1291. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1292. struct EVSEStatusType EVSEStatus; //Optional
  1293. };
  1294. /****ServiceDiscoveryRequest****/
  1295. struct ServiceDiscoveryRequest_DIN70121
  1296. {
  1297. unsigned char ServiceScope[32]; //Optional
  1298. enum ServiceCategoryType ServiceCategory; //Optional
  1299. };
  1300. struct ServiceDiscoveryRequest_ISO15118_2014
  1301. {
  1302. unsigned char ServiceScope[32]; //Optional
  1303. enum ServiceCategoryType ServiceCategory; //Optional
  1304. };
  1305. struct ServiceDiscoveryRequest_ISO15118_2018
  1306. {
  1307. struct ServiceIDListType SupportedServiceIDs; //Optional
  1308. };
  1309. /****ServiceDiscoveryResponse****/
  1310. struct ServiceDiscoveryResponse_DIN70121
  1311. {
  1312. enum ResponseCodeType_DIN70121 ResponseCode;
  1313. struct PaymentOptionListType PaymentOptions;
  1314. struct ServiceChargeType ChargeService_DIN70121;
  1315. };
  1316. struct ServiceDiscoveryResponse_ISO15118_2014
  1317. {
  1318. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1319. struct PaymentOptionListType PaymentOptions;
  1320. struct ChargeServiceType ChargeService;
  1321. struct ServiceListType ServiceList; //Optional
  1322. };
  1323. struct ServiceDiscoveryResponse_ISO15118_2018
  1324. {
  1325. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1326. struct EVSEStatusType EVSEStatus; //Optional
  1327. struct IdentificationOptionListType IdentificationOptionList;
  1328. struct ServiceListType EnergyTransferServiceList;
  1329. struct ServiceListType VASList; //Optional
  1330. };
  1331. /****ServiceDetailRequest****/
  1332. //Only in ISO15118_2014 and ISO15118_2018
  1333. struct ServiceDetailRequest_ISO15118_2014
  1334. {
  1335. unsigned short ServiceID;
  1336. };
  1337. struct ServiceDetailRequest_ISO15118_2018
  1338. {
  1339. unsigned short ServiceID;
  1340. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  1341. };
  1342. /****ServiceDetailResponse****/
  1343. struct ServiceDetailResponse_ISO15118_2014
  1344. {
  1345. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1346. unsigned short ServiceID;
  1347. struct ServiceParameterListType ServiceParameterList;
  1348. };
  1349. struct ServiceDetailResponse_ISO15118_2018
  1350. {
  1351. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1352. unsigned short ServiceID;
  1353. struct ServiceParameterListType ServiceParameterList;
  1354. struct EVSEStatusType EVSEStatus; //Optional
  1355. };
  1356. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  1357. struct ServiceAndPaymentSelectionRequest_DIN70121
  1358. {
  1359. enum PaymentOptionType SelectedPaymentOption;
  1360. struct SelectedServiceListType SelectedServiceList;
  1361. };
  1362. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  1363. {
  1364. enum PaymentOptionType SelectedPaymentOption;
  1365. struct SelectedServiceListType SelectedServiceList;
  1366. };
  1367. struct ServiceSelectionRequest_ISO15118_2018
  1368. {
  1369. enum PaymentOptionType SelectedPaymentOption;
  1370. struct SelectedServiceType SelectedEnergyTransferService;
  1371. struct SelectedServiceListType SelectedVASList;
  1372. enum ProcessingType EVProcessing;
  1373. };
  1374. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  1375. struct ServiceAndPaymentSelectionResponse_DIN70121
  1376. {
  1377. enum ResponseCodeType_DIN70121 ResponseCode;
  1378. };
  1379. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  1380. {
  1381. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1382. };
  1383. struct ServiceSelectionResponse_ISO15118_2018
  1384. {
  1385. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1386. struct EVSEStatusType EVSEStatus; //Optional
  1387. };
  1388. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  1389. struct PaymentDetailsRequest_ISO15118_2014
  1390. {
  1391. unsigned char eMAID[16];
  1392. struct CertificateChainType ContractSignatureCertChain;
  1393. };
  1394. struct IdentificationDetailsRequest_ISO15118_2018
  1395. {
  1396. struct CertificateChainType ContractSignatureCertChain;
  1397. };
  1398. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  1399. struct PaymentDetailsResponse_ISO15118_2014
  1400. {
  1401. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1402. unsigned char GenChallenge[16];
  1403. long EVSETimeStamp;
  1404. };
  1405. struct IdentificationDetailsResponse_ISO15118_2018
  1406. {
  1407. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1408. struct EVSEStatusType EVSEStatus; //Optional
  1409. unsigned char GenChallenge[16];
  1410. enum ProcessingType EVSEProcessing;
  1411. };
  1412. /****ContractAuthenticationRequest / AuthorizationRequest****/
  1413. struct ContractAuthenticationRequest_DIN70121
  1414. {
  1415. //None
  1416. };
  1417. struct AuthorizationRequest_ISO15118_2014
  1418. {
  1419. unsigned char GenChallenge[16]; //Optional
  1420. unsigned char Id[32]; //Optional
  1421. };
  1422. struct AuthorizationRequest_ISO15118_2018
  1423. {
  1424. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  1425. };
  1426. /****ContractAuthenticationResponse / AuthorizationResponse****/
  1427. struct ContractAuthenticationResponse_DIN70121
  1428. {
  1429. enum ResponseCodeType_DIN70121 ResponseCode;
  1430. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1431. };
  1432. struct AuthorizationResponse_ISO15118_2014
  1433. {
  1434. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1435. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1436. };
  1437. struct AuthorizationResponse_ISO15118_2018
  1438. {
  1439. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1440. enum ProcessingType EVSEProcessing;
  1441. struct EVSEStatusType EVSEStatus; //Optional
  1442. };
  1443. /****ChargeParameterDiscoveryRequest****/
  1444. struct ChargeParameterDiscoveryRequest_DIN70121
  1445. {
  1446. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  1447. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  1448. };
  1449. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  1450. {
  1451. unsigned short MaxEntriesSAScheduleTuple; //Optional
  1452. enum EnergyTransferModeType RequestedEnergyTransferMode;
  1453. struct AC_EVChargeParameterType AC_EVChargeParameter;
  1454. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  1455. };
  1456. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  1457. {
  1458. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  1459. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  1460. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  1461. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  1462. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  1463. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  1464. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  1465. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  1466. };
  1467. /****ChargeParameterDiscoveryResponse****/
  1468. struct ChargeParameterDiscoveryResponse_DIN70121
  1469. {
  1470. enum ResponseCodeType_DIN70121 ResponseCode;
  1471. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1472. struct SAScheduleListType SAScheduleList;
  1473. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  1474. };
  1475. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  1476. {
  1477. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1478. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1479. struct SAScheduleListType SAScheduleList;
  1480. struct AC_EVSEChargeParameterType AC_EVSEChargeParameter;
  1481. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  1482. };
  1483. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  1484. {
  1485. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1486. struct EVSEStatusType EVSEStatus; //Optional
  1487. enum ProcessingType EVSEProcessing;
  1488. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  1489. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  1490. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  1491. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  1492. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  1493. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  1494. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  1495. };
  1496. /****PowerDeliveryRequest****/
  1497. struct PowerDeliveryRequest_DIN70121
  1498. {
  1499. BOOL ReadyToChargeState;
  1500. struct ChargingProfileType_DIN70121 ChargingProfile;
  1501. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  1502. };
  1503. struct PowerDeliveryRequest_ISO15118_2014
  1504. {
  1505. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  1506. short SAScheduleTupleID;
  1507. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  1508. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  1509. };
  1510. struct PowerDeliveryRequest_ISO15118_2018
  1511. {
  1512. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  1513. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  1514. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  1515. };
  1516. /****PowerDeliveryResponse****/
  1517. struct PowerDeliveryResponse_DIN70121
  1518. {
  1519. enum ResponseCodeType_DIN70121 ResponseCode;
  1520. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1521. };
  1522. struct PowerDeliveryResponse_ISO15118_2014
  1523. {
  1524. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1525. struct AC_EVSEStatusType AC_EVSEStatus;
  1526. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1527. };
  1528. struct PowerDeliveryResponse_ISO15118_2018
  1529. {
  1530. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1531. struct EVSEStatusType EVSEStatus; //Optional
  1532. };
  1533. /****CertificateUpdateRequest****/
  1534. struct CertificateUpdateRequest_ISO15118_2014
  1535. {
  1536. unsigned char Id[32];
  1537. struct CertificateChainType ContractSignatureCertChain;
  1538. unsigned char eMAID[16];
  1539. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1540. };
  1541. /****CertificateUpdateResponse****/
  1542. struct CertificateUpdateResponse_ISO15118_2014
  1543. {
  1544. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1545. struct CertificateChainType SAProvisioningCertificateChain;
  1546. struct CertificateChainType ContractSignatureCertChain;
  1547. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  1548. struct DiffieHellmanPublickeyType DHpublickey;
  1549. unsigned char eMAID[16];
  1550. short RetryCounter; //Optional
  1551. };
  1552. /****CertificateInstallationRequest****/
  1553. struct CertificateInstallationRequest_ISO15118_2014
  1554. {
  1555. unsigned char Id[32];
  1556. unsigned char OEMProvisioningCert[800];
  1557. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1558. };
  1559. struct CertificateInstallationRequest_ISO15118_2018
  1560. {
  1561. unsigned char Id[32];
  1562. struct CertificateChainType OEMProvisioningCertChain;
  1563. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1564. unsigned short MaxSupportedCerts;
  1565. };
  1566. /****CertificateInstallationResponse****/
  1567. struct CertificateInstallationResponse_ISO15118_2014
  1568. {
  1569. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1570. struct CertificateChainType SAProvisioningCertificateChain;
  1571. struct CertificateChainType ContractSignatureCertChain;
  1572. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  1573. struct DiffieHellmanPublickeyType DHpublickey;
  1574. unsigned char eMAID[16];
  1575. };
  1576. struct CertificateInstallationResponse_ISO15118_2018
  1577. {
  1578. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1579. struct EVSEStatusType EVSEStatus; //Optional
  1580. struct CertificateChainType SAProvisioningCertificateChain;
  1581. struct CertificateChainType ContractCertificateChain;
  1582. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  1583. struct DiffieHellmanPublickeyType DHpublickey;
  1584. enum ProcessingType EVSEProcessing;
  1585. unsigned short RemainingContractCertificateChains;
  1586. };
  1587. /****SystemStatusRequest****/
  1588. struct SystemStatusRequest_ISO15118_2018
  1589. {
  1590. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  1591. struct EVTechnicalStatusType EVTechnicalStatus;
  1592. unsigned char EV_OEMStatus[800]; //Optional
  1593. };
  1594. /****SystemStatusResponse****/
  1595. struct SystemStatusResponse_ISO15118_2018
  1596. {
  1597. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1598. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  1599. BOOL EVSE_ReadyToCharge;
  1600. enum IsolationStatusType EVSE_IsolationStatus;
  1601. BOOL EVSE_Disabled;
  1602. BOOL EVSE_UtilityInterruptEvent;
  1603. BOOL EVSE_EmergencyShutdown;
  1604. BOOL EVSE_Malfunction;
  1605. BOOL EV_InChargePosition;
  1606. BOOL EV_AssociationStatus;
  1607. };
  1608. /****SessionStopRequest****/
  1609. struct SessionStopRequest_DIN70121
  1610. {
  1611. //No member in standard
  1612. };
  1613. struct SessionStopRequest_ISO15118_2014
  1614. {
  1615. enum ChargingSessionType ChargingSession;
  1616. };
  1617. struct SessionStopRequest_ISO15118_2018
  1618. {
  1619. enum ChargingSessionType ChargingSession;
  1620. };
  1621. /****SessionStopResponse****/
  1622. struct SessionStopResponse_DIN70121
  1623. {
  1624. enum ResponseCodeType_DIN70121 ResponseCode;
  1625. };
  1626. struct SessionStopResponse_ISO15118_2014
  1627. {
  1628. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1629. };
  1630. struct SessionStopResponse_ISO15118_2018
  1631. {
  1632. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1633. struct EVSEStatusType EVSEStatus; //Optional
  1634. };
  1635. /****MeteringReceiptRequest****/
  1636. struct MeteringReceiptRequest_ISO15118_2014
  1637. {
  1638. unsigned char Id[32]; //Optional
  1639. unsigned char SessionID[8];
  1640. short SAScheduleTupleID; //Optional
  1641. struct MeterInfoType_ISO15118_2014 MeterInfo;
  1642. };
  1643. struct MeteringReceiptRequest_ISO15118_2018
  1644. {
  1645. unsigned char Id[32]; //Optional
  1646. unsigned char SessionID[8];
  1647. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  1648. struct MeterInfoType_ISO15118_2018 MeterInfo;
  1649. };
  1650. /****MeteringReceiptResponse****/
  1651. struct MeteringReceiptResponse_ISO15118_2014
  1652. {
  1653. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1654. struct AC_EVSEStatusType AC_EVSEStatus;
  1655. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1656. };
  1657. struct MeteringReceiptResponse_ISO15118_2018
  1658. {
  1659. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1660. struct EVSEStatusType EVSEStatus; //Optional
  1661. };
  1662. /****ChargingStatusRequest (AC Only)****/
  1663. struct ChargingStatusRequest_ISO15118_2014
  1664. {
  1665. //No member in standard
  1666. };
  1667. struct ChargingStatusRequest_ISO15118_2018
  1668. {
  1669. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  1670. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  1671. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  1672. struct DisplayParametersType DisplayParameters;
  1673. };
  1674. /****ChargingStatusResponse (AC Only)****/
  1675. struct ChargingStatusResponse_ISO15118_2014
  1676. {
  1677. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1678. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1679. short SAScheduleTupleID;
  1680. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  1681. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  1682. BOOL ReceiptRequired; //Optional
  1683. struct AC_EVSEStatusType AC_EVSEStatus;
  1684. };
  1685. struct ChargingStatusResponse_ISO15118_2018
  1686. {
  1687. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1688. struct EVSEStatusType EVSEStatus; //Optional
  1689. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1690. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  1691. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  1692. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  1693. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  1694. };
  1695. /****CableCheckRequest (DC Only)****/
  1696. struct CableCheckRequest_DIN70121
  1697. {
  1698. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1699. };
  1700. struct CableCheckRequest_ISO15118_2014
  1701. {
  1702. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1703. };
  1704. struct CableCheckRequest_ISO15118_2018
  1705. {
  1706. //No member in standard
  1707. };
  1708. /****CableCheckResponse (DC Only)****/
  1709. struct CableCheckResponse_DIN70121
  1710. {
  1711. enum ResponseCodeType_DIN70121 ResponseCode;
  1712. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1713. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1714. };
  1715. struct CableCheckResponse_ISO15118_2014
  1716. {
  1717. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1718. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1719. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1720. };
  1721. struct CableCheckResponse_ISO15118_2018
  1722. {
  1723. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1724. struct EVSEStatusType EVSEStatus; //Optional
  1725. enum ProcessingType EVSEProcessing;
  1726. };
  1727. /****PreChargeRequest (DC Only)****/
  1728. struct PreChargeRequest_DIN70121
  1729. {
  1730. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1731. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  1732. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  1733. };
  1734. struct PreChargeRequest_ISO15118_2014
  1735. {
  1736. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1737. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  1738. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  1739. };
  1740. struct PreChargeRequest_ISO15118_2018
  1741. {
  1742. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  1743. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  1744. };
  1745. /****PreChargeResponse (DC Only)****/
  1746. struct PreChargeResponse_DIN70121
  1747. {
  1748. enum ResponseCodeType_DIN70121 ResponseCode;
  1749. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1750. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1751. };
  1752. struct PreChargeResponse_ISO15118_2014
  1753. {
  1754. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1755. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1756. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  1757. };
  1758. struct PreChargeResponse_ISO15118_2018
  1759. {
  1760. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1761. struct EVSEStatusType EVSEStatus; //Optional
  1762. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  1763. };
  1764. /****CurrentDemandRequest (DC Only)****/
  1765. struct CurrentDemandRequest_DIN70121
  1766. {
  1767. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1768. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  1769. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  1770. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  1771. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  1772. BOOL BulkChargingComplete; //Optional
  1773. BOOL ChargingComplete;
  1774. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  1775. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  1776. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  1777. };
  1778. struct CurrentDemandRequest_ISO15118_2014
  1779. {
  1780. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1781. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  1782. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  1783. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  1784. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  1785. BOOL BulkChargingComplete; //Optional
  1786. BOOL ChargingComplete;
  1787. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  1788. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  1789. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  1790. };
  1791. struct CurrentDemandRequest_ISO15118_2018
  1792. {
  1793. struct DisplayParametersType DisplayParameters; //Optional
  1794. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  1795. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  1796. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  1797. };
  1798. /****CurrentDemandResponse (DC Only)****/
  1799. struct CurrentDemandResponse_DIN70121
  1800. {
  1801. enum ResponseCodeType_DIN70121 ResponseCode;
  1802. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1803. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1804. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  1805. BOOL EVSECurrentLimitAchieved;
  1806. BOOL EVSEVoltageLimitAchieved;
  1807. BOOL EVSEPowerLimitAchieved;
  1808. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  1809. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  1810. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  1811. };
  1812. struct CurrentDemandResponse_ISO15118_2014
  1813. {
  1814. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1815. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1816. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  1817. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  1818. BOOL EVSECurrentLimitAchieved;
  1819. BOOL EVSEVoltageLimitAchieved;
  1820. BOOL EVSEPowerLimitAchieved;
  1821. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  1822. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  1823. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  1824. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1825. short SAScheduleTupleID;
  1826. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  1827. BOOL ReceiptRequired; //Optional
  1828. };
  1829. struct CurrentDemandResponse_ISO15118_2018
  1830. {
  1831. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1832. struct EVSEStatusType EVSEStatus; //Optional
  1833. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  1834. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  1835. BOOL EVSECurrentLimitAchieved;
  1836. BOOL EVSEVoltageLimitAchieved;
  1837. BOOL EVSEPowerLimitAchieved;
  1838. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  1839. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  1840. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  1841. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1842. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  1843. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  1844. };
  1845. /****WeldingDetectionRequest (DC Only)*****/
  1846. struct WeldingDetectionRequest_DIN70121
  1847. {
  1848. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1849. };
  1850. struct WeldingDetectionRequest_ISO15118_2014
  1851. {
  1852. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1853. };
  1854. struct WeldingDetectionRequest_ISO15118_2018
  1855. {
  1856. //No member in Standard
  1857. };
  1858. /****WeldingDetectionResponse (DC Only)****/
  1859. struct WeldingDetectionResponse_DIN70121
  1860. {
  1861. enum ResponseCodeType_DIN70121 ResponseCode;
  1862. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1863. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1864. };
  1865. struct WeldingDetectionResponse_ISO15118_2014
  1866. {
  1867. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1868. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1869. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  1870. };
  1871. struct WeldingDetectionResponse_ISO15118_2018
  1872. {
  1873. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1874. struct EVSEStatusType EVSEStatus; //Optional
  1875. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  1876. };
  1877. /****FinePositioningSetupRequest (WPT Only)****/
  1878. struct FinePositioningSetupRequest_ISO15118_2018
  1879. {
  1880. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  1881. };
  1882. /****FinePositioningSetupResponse (WPT Only)****/
  1883. struct FinePositioningSetupResponse_ISO15118_2018
  1884. {
  1885. //NOT complete yet, to be continue.....
  1886. };
  1887. struct V2GMessageType_DIN70121
  1888. {
  1889. enum MsgFlowStatus PresentMsgFlowStatus;
  1890. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  1891. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  1892. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  1893. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  1894. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  1895. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  1896. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  1897. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  1898. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  1899. 28: AuthorizationRequest, 29: AuthorizationResponse,
  1900. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  1901. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  1902. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  1903. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  1904. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  1905. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  1906. 52: SessionStopRequest, 53: SessionStopResponse
  1907. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  1908. */
  1909. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  1910. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  1911. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  1912. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  1913. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  1914. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  1915. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  1916. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  1917. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  1918. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  1919. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  1920. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  1921. struct CableCheckRequest_DIN70121 CableCheckRequest;
  1922. struct CableCheckResponse_DIN70121 CableCheckResponse;
  1923. struct PreChargeRequest_DIN70121 PreChargeRequest;
  1924. struct PreChargeResponse_DIN70121 PreChargeResponse;
  1925. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  1926. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  1927. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  1928. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  1929. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  1930. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  1931. struct SessionStopRequest_DIN70121 SessionStopRequest;
  1932. struct SessionStopResponse_DIN70121 SessionStopResponse;
  1933. };
  1934. struct V2GMessageType_ISO15118_2014
  1935. {
  1936. enum MsgFlowStatus PresentMsgFlowStatus;
  1937. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  1938. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  1939. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  1940. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  1941. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  1942. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  1943. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  1944. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  1945. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  1946. 28: AuthorizationRequest, 29: AuthorizationResponse,
  1947. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  1948. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  1949. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  1950. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  1951. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  1952. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  1953. 52: SessionStopRequest, 53: SessionStopResponse
  1954. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  1955. */
  1956. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  1957. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  1958. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  1959. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  1960. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  1961. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  1962. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  1963. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  1964. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  1965. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  1966. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  1967. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  1968. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  1969. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  1970. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  1971. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  1972. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  1973. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  1974. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  1975. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  1976. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  1977. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  1978. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  1979. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  1980. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  1981. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  1982. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  1983. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  1984. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  1985. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  1986. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  1987. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  1988. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  1989. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  1990. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  1991. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  1992. };
  1993. struct V2GMessageType_ISO15118_2018
  1994. {
  1995. enum MsgFlowStatus PresentMsgFlowStatus;
  1996. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  1997. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  1998. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  1999. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2000. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2001. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2002. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2003. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2004. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2005. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2006. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2007. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2008. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2009. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2010. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2011. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2012. 52: SessionStopRequest, 53: SessionStopResponse
  2013. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2014. */
  2015. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  2016. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  2017. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  2018. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  2019. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  2020. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  2021. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  2022. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  2023. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  2024. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  2025. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  2026. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  2027. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  2028. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  2029. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  2030. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  2031. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  2032. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  2033. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  2034. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  2035. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  2036. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  2037. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  2038. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  2039. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  2040. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  2041. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  2042. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  2043. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  2044. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  2045. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  2046. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  2047. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  2048. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  2049. };
  2050. struct CcsData
  2051. {
  2052. unsigned char CommProtocol; // 1: V2GMessage_DIN70121, 2:V2GMessage_ISO15118_2014, 3:V2GMessage_ISO15118_2018
  2053. struct V2GMessageType_DIN70121 V2GMessage_DIN70121;
  2054. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014;
  2055. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018;
  2056. };
  2057. struct InternalComm
  2058. {
  2059. unsigned char ChargingPermission;
  2060. unsigned char SlaveAddress;
  2061. union
  2062. {
  2063. unsigned char InternalCommVal;
  2064. struct
  2065. {
  2066. //FaultVal[0]
  2067. unsigned char FwVersion:1; //bit 0
  2068. unsigned char HwVersion:1; //bit 1
  2069. unsigned char OutputRequirement:1; //bit 2
  2070. unsigned char EvBatteryInfo:1; //bit 3
  2071. unsigned char MiscInfo:1; //bit 4
  2072. unsigned char :3; //bit 5 ~ 7
  2073. }bits;
  2074. }InternalCommUnion;
  2075. };
  2076. #endif // DEFINE_H_