define.h 92 KB

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