define_ccs.h 115 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488
  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. #include <stdlib.h>
  10. #include <stdio.h>
  11. #include <time.h>
  12. #include <sys/timeb.h>
  13. /**************************************************************************************/
  14. /*********************************NAND Flash mapping *****************************/
  15. /**************************************************************************************/
  16. /*
  17. sector size 512 KiB
  18. Page size 4096 b
  19. OOB size 224 b
  20. Erase size 524288 b
  21. -------------------------------------------------------------------------------------------------------------------------------
  22. Segment Physical address Size
  23. -------------------------------------------------------------------------------------------------------------------------------
  24. MLO 0x00000000-0x0007FFFF 512 KB
  25. Primary u-boot 0x00080000-0x0017FFFF 1 MB
  26. Environment 0x00180000-0x001FFFFF 512 KB
  27. Secondary u-boot 0x00200000-0x002FFFFF 1 MB
  28. Primary dtb 0x00300000-0x0037FFFF 512 KB
  29. Secondary dtb 0x00380000-0x003FFFFF 512 KB
  30. Primary kernel 0x00400000-0x00DFFFFF 10 MB
  31. Secondary Kernel 0x00E00000-0x017FFFFF 10 MB
  32. Primary root file system 0x01800000-0x029FFFFF 24 MB
  33. Secondary root file system 0x03000000-0x047FFFFF 24 MB
  34. Primary user configuration 0x04800000-0x004DFFFF 6 MB
  35. Secondary user configuration 0x04E00000-0x0053FFFF 6 MB
  36. Factory default configuration 0x05400000-0x0059FFFF 6 MB
  37. Storage 0x05A00000-0x7FFFFFFF 1958 MB
  38. */
  39. #define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
  40. #define PASS 1
  41. #define FAIL -1
  42. #define ENABLE 1
  43. #define DISABLE 0
  44. #define ON 1
  45. #define OFF 0
  46. /**************************************************************************************/
  47. /*********************************System Limitation**********************************/
  48. /**************************************************************************************/
  49. #define SIZE_OF_LOG_BUFFER 256 //Bytes
  50. #define PARAMETER_NORMAL_MODE ENABLE //DISABLE: using sudo parameters
  51. //ENABLE: using CAN commands
  52. //For Test or Burn-in Purpose
  53. #define MANUAL_SET_EV_TARGET_FUNCTION DISABLE
  54. #define SUDO_EV_TARGET_VOLTAGE 500 //unit: 1V
  55. #define SUDO_EV_TARGET_CURRENT 60 //unit: 1A
  56. //Configuration for CCS EVSE Process
  57. #define CABLECHECK_TARGET_VOLTAGE 500 //unit 1V, default: 500V
  58. #define CABLECHECK_TARGET_CURRENT 2 //unit: 1A, default: 2A
  59. #define PRECHARGE_TARGET_CURRENT 2 //unit: 1A, default: 2A
  60. //EVSE ID
  61. #define CCS_AC_EVSEID "PHIHONG_CCS_AC_001" //max: DIN = 32, ISO1/ISO2 = 37 bytes
  62. #define CCS_DC_EVSEID "PHIHONG_CCS_DC_001" //max: DIN = 32, ISO1/ISO2 = 37 bytes
  63. #define CCS_AC_METER_ID "ABCDE-0123456789-0123456789" //max = 32 bytes
  64. #define CCS_AC_SIG_METER_READING "SIG_METER_READING_ABCDE-0123456789" //max = 64 bytes
  65. /*CCS Protocol ID*/
  66. #define V2GT_MSG_PROTOCOL_DIN70121 0
  67. #define V2GT_MSG_PROTOCOL_ISO15118_2014 1 //i.e. ISO15118-2 (ISO 1)
  68. #define V2GT_MSG_PROTOCOL_ISO15118_2018 2 //i.e. ISO15118-20 (ISO 2)
  69. #define V2GT_MSG_PROTOCOL_HIGHEST_PRIORITY 255 //for auto detect highest priority protocol
  70. #define V2GT_MSG_PROTOCOL_PREFERENCE V2GT_MSG_PROTOCOL_ISO15118_2014
  71. #define CCS_ENERGY_TRANSFER_MODE MODE_AC_THREE_PHASE_CORE
  72. //DC: MODE_DC_EXTENDED (default)
  73. //AC: MODE_AC_SINGLE_PHASE_CORE, MODE_AC_THREE_PHASE_CORE
  74. #define SET_NO_PWM_IF_NOT_GET_PERMISSION 0
  75. #define SET_5_PWM_ONCE_RX_CM_SLAC_PARM_REQ 1
  76. #define SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES 2
  77. #define FIRMWARE_VERSION_COMPILE_SETTING_RELEASE_MODE ENABLE //default: ENABLE: release; DISABLE: debug
  78. #define NEW_SLAC_ARCHITECTURE_SWITCH ENABLE //defualt: ENABLE
  79. #define CAN_RAMDOM_MATCHING_ID_MECHANISM ENABLE //defualt: ENABLE
  80. #define CAN_RX_TIMEOUT_MECHANISM DISABLE //defualt: ENABLE
  81. #define SLAC_FIRST_RESPONSE_METHOD SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES
  82. #define TCPDUMP_PACKETS_SNIFFER_SWITCH DISABLE //default: DISABLE
  83. #define CANDUMP_PACKETS_SNIFFER_SWITCH DISABLE //default: DISABLE
  84. #define DYNAMIC_ETH0_IP_MECHANISM ENABLE //default: DISABLE
  85. #define CP_PROTECTION_MECHANISM ENABLE //default: ENABLE
  86. #define PP_PROTECTION_MECHANISM DISABLE //default: DISABLE
  87. #define SUDO_PSD_PARAMETER_MECHANISM ENABLE //default: ENABLE
  88. #define TESLA_SLOW_INCREASE_CURRENT_FUNCTION DISABLE
  89. #define V2G_SECC_TIMEOUT_PROTECTION ENABLE
  90. #define PATCH_FOR_BMW_I3_BUG_EVSEMAXIMUMVOLTAGELIMIT_599V ENABLE //default: ENABLE; CE/UL: DISABLE
  91. //CSU CAN Message EV Stop Type
  92. #define EV_NORMAL_STOP 1
  93. #define EV_EMERGENCY_STOP 2
  94. //CSU CAN Message GFD Isolation Status Type
  95. #define GFD_Invalid 0 //ongoing
  96. #define GFD_Valid 1
  97. #define GFD_Warning 2
  98. #define GFD_Fault 3
  99. #define GFD_No_IMD 4 //for ISO 15118
  100. //Default Ethernet Port Base for eth0
  101. #define ETH0_PORT_BASE 20
  102. //Energy Transfer Mode
  103. #define MODE_AC_SINGLE_PHASE_CORE 0
  104. #define MODE_AC_THREE_PHASE_CORE 1
  105. #define MODE_DC_CORE 2
  106. #define MODE_DC_EXTENDED 3
  107. #define MODE_DC_COMBO_CORE 4
  108. #define MODE_DC_UNIQUE 5
  109. /*
  110. 0xAaBbCcDd
  111. Aa: main version
  112. Bb: minor version
  113. Cc:
  114. 0x01: UL
  115. 0x02: CE
  116. 0x03: JP
  117. 0x04: GB
  118. Dd:
  119. 0x01: CCS protocol
  120. 0x02: CHAdeMO protocol
  121. 0x03: GB Protocol
  122. */
  123. /*Download Image Type*/
  124. #define IMAGE_TYPE_KERNEL_CONFIGURATION_DTB 1
  125. #define IMAGE_TYPE_BOOTLOADER_UBOOT 2
  126. #define IMAGE_TYPE_OS_KERNEL_ZIMAGE 3
  127. #define IMAGE_TYPE_ROOT_FILESYSTEM_RAMDISK 4
  128. #define IMAGE_TYPE_ROOT_APP_ZIP 5
  129. #define IMAGE_TYPE_BOOTLOADER_MLO_SPL 6
  130. #define IMAGE_TYPE_USER_CONFIGURATION 7
  131. //--- [CAUTION] To increase type ID, please modify this condition.
  132. //(Check_DwnldImgParameter())
  133. /*relevant to Quantity */
  134. #define CHAdeMO_QUANTITY 1
  135. #define CCS_QUANTITY 1
  136. #define GB_QUANTITY 1
  137. #define CSUCOMMDC_TASK_FLAG (ShmInternalComm->InternalCommUnion.bits)
  138. #define CSUCOMMAC_SHM (ShmCharger->gun_info[0].acCcsInfo)
  139. #define EVCOMM_SYS_INFO (ShmSysConfigAndInfo->SysInfo.CcsChargingData[0])
  140. #define SLAC_INFO (ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].evcc_slac_data)
  141. #define CCS_HANDSHAKE_PROTOCOLS (ccs_handshake.supportedAppProtocolReq.AppProtocol)
  142. #define GPIO_SYS_DIR "/sys/class/gpio"
  143. #define GPIO_2_23_AM_IO_1 87
  144. // Debug Message
  145. #define DEBUG_CCS_EVEM_MESSAGE_SHOW ENABLE
  146. #if DEBUG_CCS_EVEM_MESSAGE_SHOW == ENABLE
  147. #define DEBUG_MAIN_PRINTF printf
  148. #define DEBUG_EVCOMM_PRINTF printf
  149. #else
  150. #define DEBUG_MAIN_PRINTF(...)
  151. #define DEBUG_EVCOMM_PRINTF(...)
  152. #endif
  153. //Precharge Relay Status
  154. #define EVSE_STATUS_NOT_READY_FOR_PRECHARGE 0 //un-initialized
  155. #define EVSE_STATUS_READY_FOR_PRECHARGE 2 //DC+ Relay: OFF, Precharge Relay: ON
  156. #define EVSE_STATUS_READY_FOR_ENERGY_TRANSFER 3 //DC+ Relay: ON, Precharge Relay: OFF
  157. /**************************************************************************************/
  158. /**************************share memory key information***************************/
  159. /**************************************************************************************/
  160. #define ShmSysConfigAndInfoKey 3001 //0xBB9
  161. #define ShmCcsCommKey 3004 //0xBBC
  162. #define ShmStatusCodeKey 3005 //0xBBD
  163. #define ShmInternalCommKey 3009 //0xBC1
  164. #define ShmInternalCommACKey 2001 //0x7D1
  165. /**************************************************************************************/
  166. /****structure SysConfigData => shall store the data to NAND flash****************/
  167. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  168. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  169. /**************************************************************************************/
  170. struct EthConfigData
  171. {
  172. unsigned char EthDhcpClient; //0: enable,1: disable
  173. unsigned char EthMacAddress[18]; //default: Null
  174. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  175. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  176. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  177. };
  178. struct WifiConfigData
  179. {
  180. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  181. unsigned char WifiSsid[256]; //default: Null
  182. unsigned char WifiPassword[256]; //default: Null
  183. int WifiRssi; //dbm
  184. unsigned char WifiDhcpServer; //0: enable, 1: disable
  185. unsigned char WifiDhcpClient; //0: enable, 1: disable
  186. unsigned char WifiMacAddress[18]; //default: Null
  187. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  188. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  189. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  190. };
  191. struct TeleConfigData
  192. {
  193. unsigned char TelcomApn[256]; //default: Null
  194. int TelcomRssi; //dbm
  195. unsigned char TelcomChapPapId[256]; //default: Null
  196. unsigned char TelcomChapPapPwd[256]; //default: Null
  197. unsigned char TelcomModemImei[16]; //default: Null
  198. unsigned char TelcomSimImsi[16]; //default: Null
  199. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  200. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
  201. unsigned char TelcomIpAddress[16]; //default: Null
  202. };
  203. struct SysConfigData
  204. {
  205. /**************System***************/
  206. unsigned char ModelName[64]; //charger model name
  207. unsigned char SerialNumber[64]; //charger system serial number
  208. unsigned char SystemId[128]; //charger system ID
  209. unsigned char SystemDateTime[32]; //charger system date and time
  210. unsigned char AuthorisationMode; //0: Phihong RFID tag, 1: OCPP backend, 2: Phihong backend, 3: free mode
  211. unsigned char DefaultLanguage; //
  212. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  213. unsigned short AcPlugInTimes; //0~65535
  214. unsigned short GbPlugInTimes; //0~65535
  215. unsigned short Ccs1PlugInTime; //0~65535
  216. unsigned short Ccs2PlugInTimes; //0~65535
  217. unsigned short ChademoPlugInTimes; //0~65535
  218. /**************Charging***************/
  219. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  220. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW"
  221. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp"
  222. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  223. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  224. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  225. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  226. /**************Network***************/
  227. unsigned char FtpServer[32]; //the ftp server for Phihong server to do data transimission
  228. struct EthConfigData Eth0Interface;
  229. struct EthConfigData Eth1Interface;
  230. struct WifiConfigData AthInterface;
  231. struct TeleConfigData TelecomInterface;
  232. /**************Backend***************/
  233. unsigned int BackendConnTimeout; //default : 300s
  234. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  235. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  236. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  237. 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"
  238. unsigned char ChargeBoxId[128];
  239. unsigned int Checksum; //4 bytes checksum
  240. };
  241. #define SLAC_EVSE_MAC_LENGTH 6
  242. #define SLAC_EVMAC_LENGTH 6
  243. #define SLAC_RUNID_LENGTH 8
  244. #define SLAC_AAG_LENGTH 64 //ISO 15118 defines it as 0x3A, i.e. 58
  245. struct EVCC_SLAC_DATA_ARRAY_TYPE {
  246. unsigned char EvMac[SLAC_EVMAC_LENGTH];
  247. unsigned char RunID[SLAC_RUNID_LENGTH];
  248. unsigned short AAG[SLAC_AAG_LENGTH];
  249. unsigned char StartAttenCharCnt;
  250. unsigned char StartAttenCharErr;
  251. unsigned char MnbcSoundNum;
  252. unsigned char MnbcSoundCnt;
  253. unsigned char AttenProfileCnt;
  254. unsigned char AagGroupsNum;
  255. unsigned char AttenCharRspCnt;
  256. unsigned char ValidateReqCnt;
  257. unsigned char MatchReqNum;
  258. float AAG_quality_ori;
  259. float AAG_quality_refined;
  260. };
  261. #define EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE 20
  262. struct EVCC_SLAC_DATA_TYPE {
  263. unsigned char arrayLen;
  264. struct EVCC_SLAC_DATA_ARRAY_TYPE array[EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE];
  265. };
  266. struct ChargingInfoData {
  267. float MaximumChargingVoltage; //0~6553.5 volt, unit = 1V
  268. float AvailableChargingCurrent; //0~6553.5 amp, unit =1A
  269. float AvailableChargingPower; //0~6553.5 kW, unit = 1KW
  270. float PresentChargingVoltage; //0~6553.5 volt, unit = 1V
  271. float PresentChargingCurrent; //0~6553.5 amp, unit = 1A
  272. float PresentChargingPower; //0~6553.5 kW, unit = 1KW
  273. float PresentChargedEnergy; //0~6553.5 kWh, unit = 1KWH
  274. int PresentChargedDuration; // second, unit = 1s
  275. int RemainChargingDuration; // second, unit = 1s
  276. float EvBatteryMaxVoltage; // 0~6553.5 volt, unit = 1V
  277. float EvBatteryMaxCurrent; //1V
  278. float EvBatteryMaxPower; //1KW
  279. float EvBatterytargetVoltage; // 0~6553.5 volt, unit = 1V
  280. float EvBatterytargetCurrent; //1A
  281. int EvBatterySoc; // 0~100%, unit = 1%
  282. float EvBatteryCapacity; //1KWH
  283. float EvBatteryEngergyRequest; //1KWH
  284. unsigned char ConnectorPlugIn; //0: unplug, 1: Plug-in
  285. unsigned char ConnectorLocked; //0: unlocked, 1:locked.
  286. float CpVoltage; //
  287. unsigned char CpState; //1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
  288. unsigned char CpDuty; //0~100%
  289. float PpVoltage;
  290. unsigned char EVSEPrechargeStatus; //00:not ready, 01:ready for precharge, 02: ready for engergy trnasfer (> 2A)
  291. unsigned char IsolationStatus; //0:ongoing, 1:valid, 2:warning/fault
  292. unsigned char DC_EVSEStatus;
  293. unsigned char SwitchCpStateE_status;
  294. unsigned char QCA7K_SetKeyDone;
  295. unsigned char CpState_err;
  296. unsigned char CpState_err_logged;
  297. unsigned char CableCheckPreCountDownDone;
  298. unsigned char End_Process_inused;
  299. struct timeb V2G_SECC_CableCheck_Timer_Start;
  300. struct timeb V2G_SECC_CableCheck_Timer_End;
  301. struct timeb V2G_SECC_Precharge_Timer_Start;
  302. struct timeb V2G_SECC_Precharge_Timer_End;
  303. struct timeb V2G_SECC_CurrentDemand_Timer_Start;
  304. struct timeb V2G_SECC_CurrentDemand_Timer_End;
  305. struct timeb V2G_SECC_ChargingStatus_Timer_Start;
  306. struct timeb V2G_SECC_ChargingStatus_Timer_End;
  307. struct timeb V2G_SECC_WeldingDetection_Timer_Start;
  308. struct timeb V2G_SECC_WeldingDetection_Timer_End;
  309. struct timeb V2G_SECC_Sequence_Timer_Start;
  310. struct timeb V2G_SECC_Sequence_Timer_End;
  311. struct timeb V2G_SECC_Msg_Timer_Start;
  312. struct timeb V2G_SECC_Msg_Timer_End;
  313. unsigned short SDP_TCP_Server_Port_active;
  314. unsigned char SessionID[8];
  315. unsigned char V2G_Rx_Msg;
  316. unsigned char SequenceError;
  317. unsigned char SupportedAppProtocol_result; //appHandresponseCodeType: 0,1,2
  318. char CM_ATTEN_CHAR_IND_retry;
  319. struct EVCC_SLAC_DATA_TYPE evcc_slac_data;
  320. unsigned char State_Change_Ignored_Notice;
  321. unsigned char EVCCID[8];
  322. unsigned char EVCCID_length;
  323. float AC_EVSENominalVoltage; //unit: 1V
  324. //previous state
  325. float MaximumChargingVoltage_pre; //0~6553.5 volt, unit = 1V
  326. float AvailableChargingCurrent_pre; //0~6553.5 amp, unit =1A
  327. float AvailableChargingPower_pre; //0~6553.5 kW, unit = 1KW
  328. float PresentChargingVoltage_pre; //0~6553.5 volt, unit = 1V
  329. float PresentChargingCurrent_pre; //0~6553.5 amp, unit = 1A
  330. float PresentChargingPower_pre; //0~6553.5 kW, unit = 1KW
  331. float PresentChargedEnergy_pre; //0~6553.5 kWh, unit = 1KWH
  332. int PresentChargedDuration_pre; // second, unit = 1s
  333. int RemainChargingDuration_pre; // second, unit = 1s
  334. float EvBatteryMaxVoltage_pre; // 0~6553.5 volt, unit = 1V
  335. float EvBatteryMaxCurrent_pre; //1A
  336. float EvBatteryMaxPower_pre; //1KW
  337. float EvBatterytargetVoltage_pre; // 0~6553.5 volt, unit = 1V
  338. float EvBatterytargetCurrent_pre; //1A
  339. int EvBatterySoc_pre; // 0~100%, unit = 1%
  340. float EvBatteryCapacity_pre; //1KWH
  341. float EvBatteryEngergyRequest_pre; //1KWH
  342. unsigned char ConnectorPlugIn_pre; //0: unplug, 1: Plug-in
  343. unsigned char ConnectorPlugIn_new; //0: unplug, 1: Plug-in
  344. unsigned char ConnectorLocked_pre; //0: unlocked, 1:locked.
  345. float CpVoltage_pre; //
  346. unsigned char CpState_pre; //1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
  347. unsigned char CpDuty_pre; //0~100%
  348. float PpVoltage_pre;
  349. unsigned char EVSEPrechargeStatus_pre; //
  350. unsigned char IsolationStatus_pre; //0:ongoing, 1:valid, 2:warning/fault
  351. unsigned char DC_EVSEStatus_pre;
  352. unsigned char SwitchCpStateE_status_pre;
  353. unsigned char V2G_Rx_Msg_pre;
  354. float AC_EVSENominalVoltage_pre; //unit: 1V
  355. };
  356. struct SysInfoData
  357. {
  358. /**************System***************/
  359. unsigned char SystemStatus; //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  360. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  361. float InputVoltageR; //0~655.35 volt
  362. float InputVoltageS; //0~655.35 volt
  363. float InputVoltageT; //0~655.35 volt
  364. unsigned int SystemFanRotaSpeed; //0 ~ 65535 RPM
  365. unsigned int PsuFanRotaSpeed; //0 ~ 65535 RPM
  366. unsigned char AuxPower5V; //0 ~ 255 volt
  367. unsigned char AuxPower12V; //0 ~ 255 volt
  368. unsigned char AuxPower24V; //0 ~ 255 volt
  369. unsigned char AuxPower48V; //0 ~ 255 volt
  370. unsigned char CsuHwRev[32]; //CSU board hardware version
  371. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  372. unsigned char CsuKernelFwRev[32]; //CSU board OS kernel firmware version
  373. unsigned char CsuRootFsFwRev[32]; //CSU board root file system firmware version
  374. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  375. unsigned char LcmHwRev[32]; //LCM module hardware version
  376. unsigned char LcmFwRev[32]; //LCM module firmware version
  377. unsigned char PsuHwRev[32]; //PSU hardware version
  378. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  379. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  380. unsigned char AuxPwrHwRev[32]; //Aux. power module hardware version
  381. unsigned char AuxPwrFwRev[32]; //Aux. power module firmware version
  382. unsigned char FanModuleHwRev[32]; //Fan module hardware version
  383. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  384. unsigned char RelayModuleHwRev[32]; //Relay control module hardware version
  385. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  386. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  387. int SystemAmbientTemp; // -40 ~ 215 degree C
  388. int SystemCriticalTemp; // -40 ~ 215 degree C
  389. int CcsConnectorTemp; // -40 ~ 215 degree C
  390. int PsuAmbientTemp; // -40 ~ 215 degree C
  391. /**************Charging***************/
  392. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  393. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  394. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  395. /**************Network***************/
  396. unsigned char InternetConn; //0: disconnected, 1: connected
  397. /**************Backend***************/
  398. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  399. };
  400. struct SysConfigAndInfo
  401. {
  402. struct SysConfigData SysConfig;
  403. struct SysInfoData SysInfo;
  404. };
  405. struct FaultCodeData
  406. {
  407. unsigned char PreviousFaultVal[4];
  408. union
  409. {
  410. unsigned char FaultVal[4];
  411. struct
  412. {
  413. //FaultVal[0]
  414. unsigned char ChademoOutputFuseBlew : 1; //bit 0
  415. unsigned char CcsOutputFuseBlew : 1; //bit 1
  416. unsigned char GbOutputFuseBlew : 1; //bit 2
  417. unsigned char RcdSelfTestFail : 1; //bit 3
  418. unsigned char AcInputContactor1Welding : 1; //bit 4
  419. unsigned char AcInputContactor1DrivingFault : 1; //bit 5
  420. unsigned char AcInputContactor2Welding : 1; //bit 6
  421. unsigned char AcInputContactor2DrivingFault : 1; //bit 7
  422. //FaultVal[1]
  423. unsigned char AcOutputRelayWelding : 1; //bit 0
  424. unsigned char AcOutputRelayDrivingFault : 1; //bit 1
  425. unsigned char ChademoOutputRelayWelding : 1; //bit 2
  426. unsigned char ChademoOutputRelayDrivingFault : 1; //bit 3
  427. unsigned char CcsOutputRelayWelding : 1; //bit 4
  428. unsigned char CcsOutputRelayDrivingFault : 1; //bit 5
  429. unsigned char GbOutputRelayWelding : 1; //bit 6
  430. unsigned char GbOutputRelayDrivingFault : 1; //bit 7
  431. //FaultVal[2]
  432. unsigned char AcConnectorTempSensorBroken : 1; //bit 0
  433. unsigned char ChademoConnectorTempSensorBroken : 1; //bit 1
  434. unsigned char CcsConnectorTempSensorBroken : 1; //bit 2
  435. unsigned char GbConnectorTempSensorBroken : 1; //bit 3
  436. unsigned char WiFiModuleBroken : 1; //bit 4
  437. unsigned char Telecom4GModuleBroken : 1; //bit 5
  438. unsigned char AuxPowerModuleBroken : 1; //bit 6
  439. unsigned char RelayControlModuleBroken : 1; //bit 7
  440. //FaultVal[3]
  441. unsigned char ChademoConnectorLockFail : 1; //bit 0
  442. unsigned char GbConnectorLockFail : 1; //bit 1
  443. unsigned char AcConnectorLockFail : 1; //bit 2
  444. unsigned char ChademoModuleBroken : 1; //bit 3
  445. unsigned char CcsModuleBroken : 1; //bit 4
  446. unsigned char GbModuleBroken : 1; //bit 5
  447. unsigned char PsuModuleBroken : 1; //bit 6
  448. unsigned char : 1; //bit 7 reserved
  449. } bits;
  450. } FaultEvents;
  451. };
  452. struct AlarmCodeData
  453. {
  454. unsigned char PreviousAlarmVal[8];
  455. union
  456. {
  457. unsigned char AlarmVal[8];
  458. struct
  459. {
  460. //AlarmVal[0]
  461. unsigned char SystemL1InputOVP : 1; //bit 0
  462. unsigned char SystemL2InputOVP : 1; //bit 1
  463. unsigned char SystemL3InputOVP : 1; //bit 2
  464. unsigned char SystemL1InputUVP : 1; //bit 3
  465. unsigned char SystemL2InputUVP : 1; //bit 4
  466. unsigned char SystemL3InputUVP : 1; //bit 5
  467. unsigned char PsuL1InputOVP : 1; //bit 6
  468. unsigned char PsuL2InputOVP : 1; //bit 7
  469. //AlarmVal[1]
  470. unsigned char PsuL3InputOVP : 1; //bit 0
  471. unsigned char PsuL1InputUVP : 1; //bit 1
  472. unsigned char PsuL2InputUVP : 1; //bit 2
  473. unsigned char PsuL3InputUVP : 1; //bit 3
  474. unsigned char SystemL1InputDrop : 1; //bit 4
  475. unsigned char SystemL2InputDrop : 1; //bit 5
  476. unsigned char SystemL3InputDrop : 1; //bit 6
  477. unsigned char SystemAcOutputOVP : 1; //bit 7
  478. //AlarmVal[2]
  479. unsigned char SystemAcOutputOCP : 1; //bit 0
  480. unsigned char SystemChademoOutputOVP : 1; //bit 1
  481. unsigned char SystemChademoOutputOCP : 1; //bit 2
  482. unsigned char SystemCcsOutputOVP : 1; //bit 3
  483. unsigned char SystemCcsOutputOCP : 1; //bit 4
  484. unsigned char SystemGbOutputOVP : 1; //bit 5
  485. unsigned char SystemGbOutputOCP : 1; //bit 6
  486. unsigned char SystemAmbientOTP : 1; //bit 7
  487. //AlarmVal[3]
  488. unsigned char SystemCriticalPointOTP : 1; //bit 0
  489. unsigned char PsuAmbientOTP : 1; //bit 1
  490. unsigned char PsuCriticalPointOTP : 1; //bit 2
  491. unsigned char AuxPowerModuleOTP : 1; //bit 3
  492. unsigned char RelayBoardOTP : 1; //bit 4
  493. unsigned char ChademoConnectorOTP : 1; //bit 5
  494. unsigned char CcsConnectorOTP : 1; //bit 6
  495. unsigned char GbConnectorOTP : 1; //bit 7
  496. //AlarmVal[4]
  497. unsigned char AcConnectorOTP : 1; //bit 0
  498. unsigned char RcdTrip : 1; //bit 1
  499. unsigned char ChademoGfdTrip : 1; //bit 2
  500. unsigned char CcsGfdTrip : 1; //bit 3
  501. unsigned char GbGfdTrip : 1; //bit 4
  502. unsigned char SpdTrip : 1; //bit 5
  503. unsigned char MainPowerBreakerTrip : 1; //bit 6
  504. unsigned char AuxPowerBreakerTrip : 1; //bit 7
  505. //AlarmVal[5]
  506. unsigned char PsuCommunicationFail : 1; //bit 0
  507. unsigned char WiFiModuleCommFail : 1; //bit 1
  508. unsigned char Telecom4GModuleCommFail : 1; //bit 2
  509. unsigned char RfidModuleCommFail : 1; //bit 3
  510. unsigned char BluetoothModuleCommFail : 1; //bit 4
  511. unsigned char LcmModuleCommFail : 1; //bit 5
  512. unsigned char AuxPowerModuleCommFail : 1; //bit 6
  513. unsigned char RelayBoardCommFail : 1; //bit 7
  514. //AlarmVal[6]
  515. unsigned char CcsModuleCommFail : 1; //bit 0
  516. unsigned char ChademoModuleCommFail : 1; //bit 1
  517. unsigned char GbModuleCommFail : 1; //bit 2
  518. unsigned char EmergencyStopTrip : 1; //bit 3
  519. unsigned char DoorOpen : 1; //bit 4
  520. unsigned char SystemFanDecay : 1; //bit 5
  521. unsigned char FailToCreateShareMemory : 1; //bit 6
  522. unsigned char CsuInitFailed : 1; //bit 7
  523. //AlarmVal[7]
  524. unsigned char : 8; //reserved
  525. } bits;
  526. } AlarmEvents;
  527. };
  528. struct InfoCodeData
  529. {
  530. unsigned char PreviousInfoVal[8];
  531. union
  532. {
  533. unsigned char InfoVal[8];
  534. struct
  535. {
  536. //InfoVal[0]
  537. unsigned char NormalStopChargingByUser : 1; //bit 0
  538. unsigned char ChargingTimesUp : 1; //bit 1
  539. unsigned char ReplaceSystemAirFilter : 1; //bit 2
  540. unsigned char ReachChademoMaxPluggingTimes : 1; //bit 3
  541. unsigned char ReachCcsMaxPluggingTimes : 1; //bit 4
  542. unsigned char ReachGbMaxPluggingTimes : 1; //bit 5
  543. unsigned char ReachAcMaxPluggingTimes : 1; //bit 6
  544. unsigned char CsuFimrwareUpdateFail : 1; //bit 7
  545. //InfoVal[1]
  546. unsigned char ChademoModuleFimrwareUpdateFail : 1; //bit 0
  547. unsigned char CcsModuleFimrwareUpdateFail : 1; //bit 1
  548. unsigned char GbModuleFimrwareUpdateFail : 1; //bit 2
  549. unsigned char AuxPowerModuleFimrwareUpdateFail : 1; //bit 3
  550. unsigned char RelayBoardFimrwareUpdateFail : 1; //bit 4
  551. unsigned char LcmModuleFimrwareUpdateFail : 1; //bit 5
  552. unsigned char BluetoothModuleFimrwareUpdateFail : 1; //bit 6
  553. unsigned char WiFiModuleFimrwareUpdateFail : 1; //bit 7
  554. //InfoVal[2]
  555. unsigned char Telocom4GModuleFimrwareUpdateFail : 1; //bit 0
  556. unsigned char PsuFimrwareUpdateFail : 1; //bit 1
  557. unsigned char RfidModuleFimrwareUpdateFail : 1; //bit 2
  558. unsigned char ConfiguredByUsbFlashDrive : 1; //bit 3
  559. unsigned char ConfiguredByBackend : 1; //bit 4
  560. unsigned char ConfiguredByWebpage : 1; //bit 5
  561. unsigned char InternetDisconnectViaEthernet : 1; //bit 6
  562. unsigned char InternetDisconnectViaWiFi : 1; //bit 7
  563. //InfoVal[3]
  564. unsigned char InternetDisconnectVia4Gi : 1; //bit 0
  565. unsigned char ApDisconnectViaWiFi : 1; //bit 1
  566. unsigned char ApnDisconnectVia4Gi : 1; //bit 2
  567. unsigned char : 5; //bit 3~7 reserved
  568. //InfoVal[4]
  569. unsigned char ChademoSeccCommFail : 1; //bit 0
  570. unsigned char CcsSeccCommFail : 1; //bit 1
  571. unsigned char GbSeccCommFail : 1; //bit 2
  572. unsigned char PilotFault : 1; //bit 3
  573. unsigned char ChademoBatteryMalfun : 1; //bit 4
  574. unsigned char ChademoNoPermission : 1; //bit 5
  575. unsigned char ChademoBatteryIncompatibility : 1; //bit 6
  576. unsigned char ChademoBatteryOVP : 1; //bit 7
  577. //InfoVal[5]
  578. unsigned char ChademoBatteryUVP : 1; //bit 0
  579. unsigned char ChademoBatteryOTP : 1; //bit 1
  580. unsigned char ChademoBatteryCurrentDiff : 1; //bit 2
  581. unsigned char ChademoBatteryVoltageDiff : 1; //bit 3
  582. unsigned char ChademoShiftPosition : 1; //bit 4
  583. unsigned char ChademoBatteryOtherFault : 1; //bit 5
  584. unsigned char ChademoChargingSystemError : 1; //bit 6
  585. unsigned char ChademoEvNormalStop : 1; //bit 7
  586. //InfoVal[6]
  587. unsigned char : 8; //bit 0~7 reserved
  588. //InfoVal[7]
  589. unsigned char BackendDisconnectedViaEthernet : 1; //bit 0
  590. unsigned char BackendDisconnectViaWiFi : 1; //bit 1
  591. unsigned char BackendDisconnectVia4G : 1; //bit 2
  592. unsigned char BackendRemoteStart : 1; //bit 3
  593. unsigned char BackendRemoteStop : 1; //bit 4
  594. unsigned char BackendRemoteReset : 1; //bit 5
  595. unsigned char : 2; //bit 6~7 reserved
  596. } bits;
  597. } InfoEvents;
  598. };
  599. struct StatusCodeData {
  600. unsigned char PresentStatusCode[10][6];
  601. struct FaultCodeData FaultCode;
  602. struct AlarmCodeData AlarmCode;
  603. struct InfoCodeData InfoCode;
  604. };
  605. /************************************************************************************/
  606. /**************************CCS protocol Share memory***************************/
  607. /**************************DIN70121: 201412***************************************/
  608. /**************************ISO15118_2014: 2014************************************/
  609. /**************************ISO15118_2018: 2018************************************/
  610. /************************************************************************************/
  611. typedef enum boolean { FALSE, TRUE } BOOL;
  612. enum ResponseCodeType_DIN70121 {
  613. OK_DIN70121 = 0,
  614. OK_NewSessionEstablished_DIN70121 = 1,
  615. OK_OldSessionJoined_DIN70121 = 2,
  616. OK_CertificateExpiresSoon_DIN70121 = 3,
  617. FAILED_DIN70121 = 4,
  618. FAILED_SequenceError_DIN70121 = 5,
  619. FAILED_ServiceIDInvalid_DIN70121 = 6,
  620. FAILED_UnknownSession_DIN70121 = 7,
  621. FAILED_ServiceSelectionInvalid_DIN70121 = 8,
  622. FAILED_PaymentSelectionInvalid_DIN70121 = 9,
  623. FAILED_CertificateExpired_DIN70121 = 10,
  624. FAILED_SignatureError_DIN70121 = 11,
  625. FAILED_NoCertificateAvailable_DIN70121 = 12,
  626. FAILED_CertChainError_DIN70121 = 13,
  627. FAILED_ChallengeInvalid_DIN70121 = 14,
  628. FAILED_ContractCanceled_DIN70121 = 15,
  629. FAILED_WrongChargeParameter_DIN70121 = 16,
  630. FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  631. FAILED_TariffSelectionInvalid_DIN70121 = 18,
  632. FAILED_ChargingProfileInvalid_DIN70121 = 19,
  633. FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  634. FAILED_MeteringSignatureNotValid_DIN70121 = 21,
  635. FAILED_WrongEnergyTransferType_DIN70121 = 22
  636. };
  637. enum ResponseCodeType_ISO15118_2014 {
  638. OK_ISO15118_2014 = 0,
  639. OK_NewSessionEstablished_ISO15118_2014 = 1,
  640. OK_OldSessionJoined_ISO15118_2014 = 2,
  641. OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  642. FAILED_ISO15118_2014 = 4,
  643. FAILED_SequenceError_ISO15118_2014 = 5,
  644. FAILED_ServiceIDInvalid_ISO15118_2014 = 6,
  645. FAILED_UnknownSession_ISO15118_2014 = 7,
  646. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8,
  647. FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9,
  648. FAILED_CertificateExpired_ISO15118_2014 = 10,
  649. FAILED_SignatureError_ISO15118_2014 = 11,
  650. FAILED_NoCertificateAvailable_ISO15118_2014 = 12,
  651. FAILED_CertChainError_ISO15118_2014 = 13,
  652. FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  653. FAILED_ContractCanceled_ISO15118_2014 = 15,
  654. FAILED_WrongChargeParameter_ISO15118_2014 = 16,
  655. FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  656. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18,
  657. FAILED_ChargingProfileInvalid_ISO15118_2014 = 19,
  658. FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  659. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21,
  660. FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22,
  661. FAILED_ContactorError_ISO15118_2014 = 23,
  662. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24,
  663. FAILED_CertificateRevoked_ISO15118_2014 = 25
  664. };
  665. enum ResponseCodeType_ISO15118_2018 {
  666. OK_ISO15118_2018 = 0,
  667. OK_NewSessionEstablished_ISO15118_2018 = 1,
  668. OK_OldSessionJoined_ISO15118_2018 = 2,
  669. OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  670. OK_IsolationValid_ISO15118_2018 = 4,
  671. OK_IsolationWarning_ISO15118_2018 = 5,
  672. WARNING_CertificateExpired_ISO15118_2018 = 6,
  673. WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  674. WARNING_CertValidationError_ISO15118_2018 = 8,
  675. WARNING_CertVerificationError_ISO15118_2018 = 9,
  676. WARNING_ContractCanceled_ISO15118_2018 = 10,
  677. FAILED_ISO15118_2018 = 11,
  678. FAILED_SequenceError_ISO15118_2018 = 12,
  679. FAILED_ServiceIDInvalid_ISO15118_2018 = 13,
  680. FAILED_UnknownSession_ISO15118_2018 = 14,
  681. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15,
  682. FAILED_SignatureError_ISO15118_2018 = 16,
  683. FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  684. FAILED_ChallengeInvalid_ISO15118_2018 = 18,
  685. FAILED_WrongChargeParameter_ISO15118_2018 = 19,
  686. FAILED_IsolationFault_ISO15118_2018 = 20,
  687. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21,
  688. FAILED_TariffSelectionInvalid_ISO15118_2018 = 22,
  689. FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  690. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24,
  691. FAILED_NoChargeServiceSelected_ISO15118_2018 = 25,
  692. FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  693. FAILED_ContactorError_ISO15118_2018 = 27,
  694. FAILED_CertificateRevoked_ISO15118_2018 = 28,
  695. FAILED_CertificateNotYetValid_ISO15118_2018 = 29
  696. };
  697. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  698. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  699. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  700. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  701. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  702. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  703. enum EnergyTransferModeType {
  704. AC_single_phase_core = 0,
  705. AC_three_phase_core = 1,
  706. DC_core = 2,
  707. DC_extended = 3,
  708. DC_combo_core = 4,
  709. DC_unique = 5
  710. };
  711. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  712. enum unitSymbolType_DIN70121 {
  713. H_DIN70121 = 0,
  714. M_DIN70121 = 1,
  715. S_DIN70121 = 2,
  716. A_DIN70121 = 3,
  717. AH_DIN70121 = 4,
  718. V_DIN70121 = 5,
  719. VA_DIN70121 = 6,
  720. W_DIN70121 = 7,
  721. WS_DIN70121 = 8,
  722. WH_DIN70121 = 9};
  723. enum unitSymbolType_ISO15118_2014 {
  724. h_ISO15118_2014 = 0,
  725. m_ISO15118_2014 = 1,
  726. s_ISO15118_2014 = 2,
  727. A_ISO15118_2014 = 3,
  728. V_ISO15118_2014 = 4,
  729. W_ISO15118_2014 = 5,
  730. Wh_ISO15118_2014 = 6
  731. };
  732. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  733. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  734. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  735. enum DC_EVErrorCodeType {
  736. NO_ERROR = 0,
  737. FAILED_RESSTemperatureInhibit = 1,
  738. FAILED_EVShiftPosition = 2,
  739. FAILED_ChargerConnectorLockFault = 3,
  740. FAILED_EVRESSMalfunction = 4,
  741. FAILED_ChargingCurrentdifferential = 5,
  742. FAILED_ChargingVoltageOutOfRange = 6,
  743. Reserved_A = 7,
  744. Reserved_B = 8,
  745. Reserved_C = 9,
  746. FAILED_ChargingSystemIncompatibility = 10,
  747. NoData = 11
  748. };
  749. enum IsolationLevelType_DIN70121 {
  750. Invalid_DIN70121 = 0,
  751. Valid_DIN70121 = 1,
  752. Warning_DIN70121 = 2,
  753. Fault_DIN70121 = 3
  754. };
  755. enum IsolationLevelType_ISO15118_2014 {
  756. Invalid_ISO15118_2014 = 0,
  757. Valid_ISO15118_2014 = 1,
  758. Warning_ISO15118_2014 = 2,
  759. Fault_ISO15118_2014 = 3,
  760. No_IMD_ISO15118_2014 = 4
  761. };
  762. enum DC_EVSEStatusCodeType {
  763. EVSE_NotReady = 0,
  764. EVSE_Ready = 1,
  765. EVSE_Shutdown = 2,
  766. EVSE_UtilityInterruptEvent = 3,
  767. EVSE_IsolationMonitoringActive = 4,
  768. EVSE_EmergencyShutdown = 5,
  769. EVSE_Malfunction = 6,
  770. Reserved_8 = 7,
  771. Reserved_9 = 8
  772. };
  773. enum ScheduleOriginType { EV = 0, SA = 1};
  774. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  775. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  776. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  777. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  778. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  779. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  780. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  781. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  782. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  783. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  784. enum ChargingSessionType { Terminate = 0, Pause = 1};
  785. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  786. enum MsgFlowStatus {
  787. IDLE = 0,
  788. CM_SLAC_PARM_REQ = 1,
  789. CM_SLAC_PARM_CONF = 2,
  790. CM_START_ATTEN_CHAR_IND = 3,
  791. CM_MNBC_SOUND_IND = 4,
  792. CM_ATTEN_CHAR_IND = 5,
  793. CM_ATTEN_CHAR_RSP = 6,
  794. CM_VALIDATE_REQ = 7,
  795. CM_VALIDATE_CNF = 8,
  796. CM_SLAC_MATCH_REQ = 9,
  797. CM_SLAC_MATCH_CNF = 10,
  798. CM_AMP_MAP_REQ = 11,
  799. CM_AMP_MAP_CNF = 12,
  800. CM_SET_KEY_REQ = 13,
  801. CM_SET_KEY_CNF = 14,
  802. SLACC_SDP_UDP_Connection = 15,
  803. SLACC_SDP_TCP_Connection = 16,
  804. SupportedAppProtocolRequest = 17,
  805. SupportedAppProtocolResponse = 18,
  806. SessionSetupRequest = 19,
  807. SessionSetupResponse = 20,
  808. ServiceDiscoveryRequest = 21,
  809. ServiceDiscoveryResponse = 22,
  810. ServiceDetailRequest = 23,
  811. ServiceDetailResponse = 24,
  812. ServiceAndPaymentSelectionRequest = 25,
  813. ServiceAndPaymentSelectionResponse = 26,
  814. PaymentDetailsRequest = 27,
  815. PaymentDetailsResponse = 28,
  816. AuthorizationRequest = 29,
  817. AuthorizationResponse = 30,
  818. CertificateUpdateRequest = 31,
  819. CertificateUpdateResponse = 32,
  820. CertificateInstallationRequest = 33,
  821. CertificateInstallationResponse = 34,
  822. ChargeParameterDiscoveryRequest = 35,
  823. ChargeParameterDiscoveryResponse = 36,
  824. CableCheckRequest = 37,
  825. CableCheckResponse = 38,
  826. PreChargeRequest = 39,
  827. PreChargeResponse = 40,
  828. PowerDeliveryRequestStart = 41,
  829. PowerDeliveryResponsetStart = 42,
  830. ChargingStatusRequest = 43,
  831. ChargingStatusResponse = 44,
  832. CurrentDemandRequest = 45,
  833. CurrentDemandResponse = 46,
  834. MeteringReceiptRequest = 47,
  835. MeteringReceiptResponse = 48,
  836. PowerDeliveryRequestStop = 49,
  837. PowerDeliveryResponseStop = 50,
  838. WeldingDetectionRequest = 51,
  839. WeldingDetectionResponse = 52,
  840. SessionStopRequest = 53,
  841. SessionStopResponse = 54,
  842. Performance_Timeout = 253,
  843. Sequence_Timeout = 254,
  844. Other_Fault = 255
  845. };
  846. struct PhysicalValueType_DIN70121 { //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  847. int Multiplier; //range: -3..+3
  848. enum unitSymbolType_DIN70121 Unit;
  849. short Value;
  850. };
  851. struct PhysicalValueType_ISO15118_2014 { //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  852. int Multiplier; //range: -3..+3
  853. enum unitSymbolType_ISO15118_2014 Unit;
  854. short Value;
  855. };
  856. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  857. {
  858. int Exponent; //range: -3..+3
  859. short Value;
  860. };
  861. struct AppProtocolType {
  862. unsigned char ProtocolNamespace[100];
  863. unsigned int ProtocolNamespaceLen;
  864. unsigned int VersionNumberMajor;
  865. unsigned int VersionNumberMinor;
  866. unsigned char SchemaID;
  867. unsigned char Priority; //range 1..20
  868. };
  869. struct ACD_SSEnergyTransferModeType
  870. {
  871. unsigned char EVID[20];
  872. };
  873. struct EVSEStatusType
  874. {
  875. unsigned short NotificationMaxDelay; //in seconds
  876. enum EVSENotificationType EVSENotification;
  877. };
  878. struct ServiceIDListType
  879. {
  880. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  881. };
  882. struct PaymentOptionListType
  883. {
  884. enum PaymentOptionType PaymentOption[2];
  885. };
  886. struct ServiceTagType
  887. {
  888. unsigned short ServiceID;
  889. unsigned char ServiceName[32]; //Optional Element
  890. enum ServiceCategoryType ServiceCategory;
  891. unsigned char ServiceScope[32]; //Optional Element
  892. };
  893. struct ServiceType_DIN70121
  894. {
  895. struct ServiceTagType ServiceTag;
  896. BOOL FreeService;
  897. };
  898. struct ServiceType_ISO15118_2014
  899. {
  900. unsigned short ServiceID;
  901. unsigned char ServiceName[32]; //Optional
  902. enum ServiceCategoryType ServiceCategory;
  903. unsigned char ServiceScope[64]; //Optional
  904. BOOL FreeService;
  905. };
  906. /*struct ServiceType_ISO15118_2018
  907. {
  908. unsigned short ServiceID;
  909. BOOL FreeService;
  910. }; */
  911. struct SupportedEnergyTransferModeType
  912. {
  913. enum EnergyTransferModeType EnergyTransferMode[6];
  914. };
  915. struct ServiceChargeType
  916. {
  917. struct ServiceType_DIN70121 Services;
  918. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  919. enum EnergyTransferModeType EnergyTransferType;
  920. };
  921. struct ChargeServiceType
  922. {
  923. struct ServiceType_ISO15118_2014 Services;
  924. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  925. };
  926. struct ServiceListType
  927. {
  928. struct ServiceType_ISO15118_2014 Service[8];
  929. };
  930. struct IdentificationOptionListType
  931. {
  932. enum PaymentOptionType IdentificationOption[2];
  933. };
  934. struct ParameterType
  935. {
  936. unsigned char Name[32];
  937. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  938. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  939. };
  940. struct ParameterSetType
  941. {
  942. short ParameterSetID;
  943. struct ParameterType Parameter[16];
  944. };
  945. struct ServiceParameterListType
  946. {
  947. struct ParameterSetType ParameterSet[255];
  948. };
  949. struct WPT_SDlEnergyTransferModeType
  950. {
  951. struct ServiceParameterListType ServiceParameterList;
  952. };
  953. struct SelectedServiceType
  954. {
  955. unsigned short ServiceID;
  956. short ParameterSetID;
  957. };
  958. struct SelectedServiceListType
  959. {
  960. struct SelectedServiceType SelectedService[16];
  961. unsigned int SelectedServiceLen;
  962. };
  963. struct CertificateChainType
  964. {
  965. unsigned char Id[32]; //Optional
  966. unsigned char Certificate[800]; //check size again
  967. unsigned char SubCertificates[4][800]; //Optional, check size again
  968. };
  969. struct PNC_AReqIdentificationModeType
  970. {
  971. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  972. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  973. };
  974. struct AC_EVChargeParameterType
  975. {
  976. unsigned int DepartureTime; //Optional
  977. struct PhysicalValueType_ISO15118_2014 EAmount;
  978. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  979. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  980. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  981. };
  982. struct DC_EVStatusType_DIN70121
  983. {
  984. BOOL EVReady;
  985. BOOL EVCabinConditioning;
  986. BOOL EVRESSConiditioning;
  987. enum DC_EVErrorCodeType EVErrorCode;
  988. unsigned char EVRESSSOC; /*0-100 percentage*/
  989. };
  990. struct DC_EVChargeParameterType_DIN70121
  991. {
  992. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  993. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  994. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  995. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  996. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  997. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  998. unsigned char FullSOC; /*0-100 percentage*/ //Optional
  999. unsigned char BulkSOC; /*0-100 percentage*/ //Optional
  1000. };
  1001. struct DC_EVStatusType_ISO15118_2014
  1002. {
  1003. BOOL EVReady;
  1004. enum DC_EVErrorCodeType EVErrorCode;
  1005. unsigned char EVRESSSOC; /*0-100 percentage*/
  1006. };
  1007. struct DC_EVChargeParameterType_ISO15118_2014
  1008. {
  1009. unsigned int DepartureTime; //Optional
  1010. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1011. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  1012. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  1013. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  1014. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  1015. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  1016. unsigned char FullSOC; /*0-100 percentage*/ //Optional
  1017. unsigned char BulkSOC; /*0-100 percentage*/ //Optional
  1018. };
  1019. struct Dynamic_CPDReqControlModeType
  1020. {
  1021. unsigned int DepartureTime;
  1022. };
  1023. struct RelativeTimeIntervalType
  1024. {
  1025. unsigned int duration; //Optional
  1026. unsigned int start;
  1027. };
  1028. struct PMaxScheduleEntryType
  1029. {
  1030. struct RelativeTimeIntervalType RelativeTimeInterval;
  1031. unsigned short PMax;
  1032. };
  1033. struct PMaxScheduleType
  1034. {
  1035. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  1036. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  1037. };
  1038. struct CostType
  1039. {
  1040. unsigned int amount;
  1041. enum CostKindType costKind;
  1042. int amountMultiplier; //Optional , range: -3..+3
  1043. };
  1044. struct ConsumptionCostType
  1045. {
  1046. struct CostType Cost[3];
  1047. struct PhysicalValueType_ISO15118_2014 startValue;
  1048. };
  1049. struct SalesTariffEntryType
  1050. {
  1051. struct RelativeTimeIntervalType RelativeTimeInterval;
  1052. unsigned char EPriceLevel; //Optional
  1053. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  1054. };
  1055. struct SalesTariffType
  1056. {
  1057. unsigned char Id[32]; //Optional
  1058. short SalesTariffID;
  1059. unsigned char SalesTariffDescription[32]; //Optional
  1060. unsigned char NumEPriceLevels; //Optional
  1061. struct SalesTariffEntryType SalesTariffEntry[1024];
  1062. };
  1063. struct SAScheduleTupleType
  1064. {
  1065. short SAScheduleTupleID;
  1066. struct PMaxScheduleType PMaxSchedule;
  1067. struct SalesTariffType SalesTariff; //Optional
  1068. };
  1069. struct ScheduleListType
  1070. {
  1071. enum ScheduleOriginType ScheduleOrigin;
  1072. struct SAScheduleTupleType ScheduleTuple[3];
  1073. };
  1074. struct Scheduled_CPDReqControlModeType
  1075. {
  1076. enum ProcessingType EVProcessing;
  1077. unsigned int DepartureTime; //Optional
  1078. unsigned short MaxSupportingPoints;
  1079. struct ScheduleListType ScheduleList; //Optional
  1080. };
  1081. struct AC_CPDReqEnergyTransferModeType
  1082. {
  1083. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1084. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1085. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1086. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1087. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1088. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1089. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1090. };
  1091. struct DC_CPDReqEnergyTransferModeType
  1092. {
  1093. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  1094. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  1095. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1096. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1097. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1098. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1099. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1100. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1101. unsigned char TargetSOC; //Optional
  1102. unsigned char BulkSOC; //Optional
  1103. };
  1104. struct BPT_AC_CPDReqEnergyTransferModeType
  1105. {
  1106. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1107. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  1108. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  1109. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1110. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  1111. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1112. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  1113. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1114. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1115. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1116. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1117. };
  1118. struct BPT_DC_CPDReqEnergyTransferModeType
  1119. {
  1120. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1121. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  1122. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  1123. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  1124. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1125. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1126. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  1127. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  1128. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1129. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  1130. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  1131. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  1132. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  1133. unsigned char TargetSOC; //Optional
  1134. unsigned char BulkSOC; //Optional
  1135. };
  1136. struct WPT_CPDReqEnergyTransferModeType
  1137. {
  1138. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  1139. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  1140. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1141. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1142. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1143. };
  1144. struct ACD_CPDReqEnergyTransferModeType
  1145. {
  1146. //cannot be found in standard
  1147. };
  1148. struct SAScheduleListType
  1149. {
  1150. struct SAScheduleTupleType SAScheduleTuple[3];
  1151. };
  1152. struct DC_EVSEStatusType_DIN70121
  1153. {
  1154. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  1155. enum DC_EVSEStatusCodeType EVSEStatusCode;
  1156. unsigned int NotificationMaxDelay;
  1157. enum EVSENotificationType EVSENotification;
  1158. };
  1159. struct DC_EVSEChargeParameterType_DIN70121
  1160. {
  1161. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1162. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  1163. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  1164. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  1165. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  1166. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  1167. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  1168. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  1169. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  1170. };
  1171. struct AC_EVSEStatusType_ISO15118_2014
  1172. {
  1173. BOOL RCD;
  1174. unsigned short NotificationMaxDelay;
  1175. enum EVSENotificationType EVSENotification; //need to be confirmed
  1176. };
  1177. struct AC_EVSEChargeParameterType_ISO15118_2014
  1178. {
  1179. struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
  1180. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  1181. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  1182. };
  1183. struct DC_EVSEStatusType_ISO15118_2014
  1184. {
  1185. unsigned short NotificationMaxDelay;
  1186. enum EVSENotificationType EVSENotification;
  1187. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  1188. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  1189. };
  1190. struct DC_EVSEChargeParameterType_ISO15118_2014
  1191. {
  1192. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1193. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  1194. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  1195. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  1196. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  1197. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  1198. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  1199. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  1200. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  1201. };
  1202. struct Scheduled_CPDResControlModeType
  1203. {
  1204. struct ScheduleListType ScheduleList;
  1205. };
  1206. struct AC_CPDResEnergyTransferModeType
  1207. {
  1208. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1209. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1210. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1211. };
  1212. struct DC_CPDResEnergyTransferModeType
  1213. {
  1214. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1215. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1216. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1217. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1218. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1219. };
  1220. struct BPT_AC_CPDResEnergyTransferModeType
  1221. {
  1222. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1223. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  1224. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1225. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1226. };
  1227. struct BPT_DC_CPDResEnergyTransferModeType
  1228. {
  1229. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1230. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  1231. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1232. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  1233. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1234. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  1235. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1236. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1237. };
  1238. struct WPT_CPDResEnergyTransferModeType
  1239. {
  1240. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  1241. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  1242. };
  1243. struct ACD_CPDResEnergyTransferModeType
  1244. {
  1245. //not found in ISO15118_2018
  1246. };
  1247. struct ProfileEntryType_DIN70121
  1248. {
  1249. unsigned int ChargingProfileEntryStart;
  1250. short ChargingProfileEntryMaxPower;
  1251. };
  1252. struct ChargingProfileType_DIN70121
  1253. {
  1254. short SAScheduleTupleID;
  1255. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  1256. };
  1257. struct DC_EVPowerDeliveryParameterType_DIN70121
  1258. {
  1259. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1260. BOOL BulkChargingComplete; //Optional
  1261. BOOL ChargingComplete;
  1262. };
  1263. struct ProfileEntryType_ISO15118_2014
  1264. {
  1265. unsigned int ChargingProfileEntryStart;
  1266. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  1267. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  1268. };
  1269. struct ChargingProfileType_ISO15118_2014
  1270. {
  1271. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  1272. };
  1273. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  1274. {
  1275. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1276. BOOL BulkChargingComplete; //Optional
  1277. BOOL ChargingComplete;
  1278. };
  1279. struct TimeInterval
  1280. {
  1281. unsigned int start;
  1282. unsigned int duration; //Optional
  1283. };
  1284. struct PowerScheduleEntryType
  1285. {
  1286. struct TimeInterval TimeInterval;
  1287. struct PhysicalValueType_ISO15118_2018 Power[3];
  1288. };
  1289. struct EVPowerProfileType
  1290. {
  1291. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  1292. };
  1293. struct Scheduled_PDReqControlModeType
  1294. {
  1295. unsigned char ScheduleTupleID;
  1296. struct EVPowerProfileType EVPowerProfile;
  1297. };
  1298. struct BPT_Scheduled_PDReqControlModeType
  1299. {
  1300. unsigned char ScheduleTupleID;
  1301. struct EVPowerProfileType EVPowerProfile; //Optional
  1302. enum evOperationType EVOperation;
  1303. };
  1304. struct ListOfRootCertificateIDsType
  1305. {
  1306. unsigned char RootCertificateID[20][40];
  1307. };
  1308. struct ContractSignatureEncryptedPrivateKeyType
  1309. {
  1310. unsigned char Id[32];
  1311. };
  1312. struct DiffieHellmanPublickeyType
  1313. {
  1314. unsigned char Id[32];
  1315. };
  1316. struct ContractCertificateEncryptedPrivateKeyType
  1317. {
  1318. unsigned char Id[32];
  1319. };
  1320. struct EVTechnicalStatusType
  1321. {
  1322. BOOL EV_Status_ReadyToCharge;
  1323. BOOL EV_Status_ImmobilizationRequest; //Optional
  1324. BOOL EV_Status_Immobilized;
  1325. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  1326. enum EV_CP_StatusType EV_CP_Status;
  1327. unsigned char EV_Status_RESSSOC; //0~100%
  1328. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  1329. BOOL EVSE_Timeout;
  1330. };
  1331. struct MeterInfoType_ISO15118_2014
  1332. {
  1333. unsigned char MeterID[32];
  1334. unsigned long MeterReading; //Optional
  1335. unsigned char SigMeterReading[64]; //Optional
  1336. short MeterStatus; //Optional
  1337. long TMeter; //Optional
  1338. };
  1339. struct Scheduled_MRReqControlModeType
  1340. {
  1341. unsigned char ScheduleTupleID;
  1342. };
  1343. struct MeterInfoType_ISO15118_2018
  1344. {
  1345. unsigned char MeterID[32];
  1346. unsigned long MeterReadingWhCharged; //Optional
  1347. unsigned long MeterReadingWhDischarged; //Optional
  1348. unsigned long MeterReadingVARhLeading; //Optional
  1349. unsigned long MeterReadingVARhLagging; //Optional
  1350. unsigned char SignatureMeterReading[64]; //Optional
  1351. short MeterStatus; //Optional
  1352. short TimeStampMeter; //Optional
  1353. BOOL ReceiptRequired; //Optional
  1354. };
  1355. struct PnC_CLReqIdentificationModeType
  1356. {
  1357. BOOL MeteringReceiptRequested;
  1358. };
  1359. struct Dynamic_CSReqControlModeType
  1360. {
  1361. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  1362. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  1363. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  1364. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1365. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1366. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1367. };
  1368. struct Scheduled_CSReqControlModeType
  1369. {
  1370. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1371. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1372. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1373. BOOL Standby;
  1374. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  1375. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  1376. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  1377. };
  1378. struct DisplayParametersType
  1379. {
  1380. unsigned short CurrentRange;
  1381. unsigned char CurrentSOC; //0~100%
  1382. unsigned char MinimumSOC; //0~100%
  1383. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  1384. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  1385. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  1386. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  1387. BOOL ChargingComplete;
  1388. BOOL BulkChargingComplete;
  1389. BOOL InletHot;
  1390. };
  1391. struct PnC_CLResIdentificationModeType
  1392. {
  1393. struct MeterInfoType_ISO15118_2018 MeterInfo;
  1394. };
  1395. struct Dynamic_CSResControlModeType
  1396. {
  1397. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  1398. };
  1399. struct Scheduled_CDResControlModeType
  1400. {
  1401. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  1402. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  1403. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  1404. };
  1405. struct LFA_EVFinePositioningSetupParametersType
  1406. {
  1407. unsigned char NumberOfSensors;
  1408. //NOT complete yet, to be continue.....
  1409. };
  1410. /****SupportedAppProtocolRequest****/
  1411. struct SupportedAppProtocolRequest_DIN70121 {
  1412. struct AppProtocolType AppProtocol[20];
  1413. };
  1414. struct SupportedAppProtocolRequest_ISO15118_2014
  1415. {
  1416. struct AppProtocolType AppProtocol[20];
  1417. };
  1418. struct SupportedAppProtocolRequest_ISO15118_2018
  1419. {
  1420. struct AppProtocolType AppProtocol[20];
  1421. };
  1422. /****SupportedAppProtocolResponse****/
  1423. struct SupportedAppProtocolResponse_DIN70121
  1424. {
  1425. enum ResponseCodeType_DIN70121 ResponseCode;
  1426. unsigned char SchemaID; //Optional
  1427. };
  1428. struct SupportedAppProtocolResponse_ISO15118_2014
  1429. {
  1430. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1431. unsigned char SchemaID; //Optional
  1432. };
  1433. struct SupportedAppProtocolResponse_ISO15118_2018
  1434. {
  1435. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1436. unsigned char SchemaID; //Optional
  1437. };
  1438. /****SessionSetupRequest****/
  1439. struct SessionSetupRequest_DIN70121
  1440. {
  1441. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1442. };
  1443. struct SessionSetupRequest_ISO15118_2014
  1444. {
  1445. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1446. };
  1447. struct SessionSetupRequest_ISO15118_2018
  1448. {
  1449. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1450. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  1451. };
  1452. /****SessionSetupResponse****/
  1453. struct SessionSetupResponse_DIN70121
  1454. {
  1455. enum ResponseCodeType_DIN70121 ResponseCode;
  1456. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1457. long EVSETimeStamp; //EPOCH format, Optional
  1458. };
  1459. struct SessionSetupResponse_ISO15118_2014
  1460. {
  1461. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1462. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1463. long EVSETimeStamp; //EPOCH format, Optional
  1464. };
  1465. struct SessionSetupResponse_ISO15118_2018
  1466. {
  1467. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1468. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1469. struct EVSEStatusType EVSEStatus; //Optional
  1470. };
  1471. /****ServiceDiscoveryRequest****/
  1472. struct ServiceDiscoveryRequest_DIN70121
  1473. {
  1474. unsigned char ServiceScope[32]; //Optional
  1475. unsigned int ServiceScopeLen;
  1476. enum ServiceCategoryType ServiceCategory; //Optional
  1477. };
  1478. struct ServiceDiscoveryRequest_ISO15118_2014
  1479. {
  1480. unsigned char ServiceScope[32]; //Optional
  1481. unsigned int ServiceScopeLen;
  1482. enum ServiceCategoryType ServiceCategory; //Optional
  1483. };
  1484. struct ServiceDiscoveryRequest_ISO15118_2018
  1485. {
  1486. struct ServiceIDListType SupportedServiceIDs; //Optional
  1487. };
  1488. /****ServiceDiscoveryResponse****/
  1489. struct ServiceDiscoveryResponse_DIN70121
  1490. {
  1491. enum ResponseCodeType_DIN70121 ResponseCode;
  1492. struct PaymentOptionListType PaymentOptions;
  1493. struct ServiceChargeType ChargeService_DIN70121;
  1494. };
  1495. struct ServiceDiscoveryResponse_ISO15118_2014
  1496. {
  1497. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1498. struct PaymentOptionListType PaymentOptions;
  1499. struct ChargeServiceType ChargeService;
  1500. struct ServiceListType ServiceList; //Optional
  1501. };
  1502. struct ServiceDiscoveryResponse_ISO15118_2018
  1503. {
  1504. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1505. struct EVSEStatusType EVSEStatus; //Optional
  1506. struct IdentificationOptionListType IdentificationOptionList;
  1507. struct ServiceListType EnergyTransferServiceList;
  1508. struct ServiceListType VASList; //Optional
  1509. };
  1510. /****ServiceDetailRequest****/
  1511. //Only in ISO15118_2014 and ISO15118_2018
  1512. struct ServiceDetailRequest_ISO15118_2014
  1513. {
  1514. unsigned short ServiceID;
  1515. };
  1516. struct ServiceDetailRequest_ISO15118_2018
  1517. {
  1518. unsigned short ServiceID;
  1519. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  1520. };
  1521. /****ServiceDetailResponse****/
  1522. struct ServiceDetailResponse_ISO15118_2014
  1523. {
  1524. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1525. unsigned short ServiceID;
  1526. struct ServiceParameterListType ServiceParameterList;
  1527. };
  1528. struct ServiceDetailResponse_ISO15118_2018
  1529. {
  1530. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1531. unsigned short ServiceID;
  1532. struct ServiceParameterListType ServiceParameterList;
  1533. struct EVSEStatusType EVSEStatus; //Optional
  1534. };
  1535. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  1536. struct ServiceAndPaymentSelectionRequest_DIN70121
  1537. {
  1538. enum PaymentOptionType SelectedPaymentOption;
  1539. struct SelectedServiceListType SelectedServiceList;
  1540. };
  1541. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  1542. {
  1543. enum PaymentOptionType SelectedPaymentOption;
  1544. struct SelectedServiceListType SelectedServiceList;
  1545. };
  1546. struct ServiceSelectionRequest_ISO15118_2018
  1547. {
  1548. enum PaymentOptionType SelectedPaymentOption;
  1549. struct SelectedServiceType SelectedEnergyTransferService;
  1550. struct SelectedServiceListType SelectedVASList;
  1551. enum ProcessingType EVProcessing;
  1552. };
  1553. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  1554. struct ServiceAndPaymentSelectionResponse_DIN70121
  1555. {
  1556. enum ResponseCodeType_DIN70121 ResponseCode;
  1557. };
  1558. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  1559. {
  1560. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1561. };
  1562. struct ServiceSelectionResponse_ISO15118_2018
  1563. {
  1564. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1565. struct EVSEStatusType EVSEStatus; //Optional
  1566. };
  1567. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  1568. struct PaymentDetailsRequest_ISO15118_2014
  1569. {
  1570. unsigned char eMAID[16];
  1571. struct CertificateChainType ContractSignatureCertChain;
  1572. };
  1573. struct IdentificationDetailsRequest_ISO15118_2018
  1574. {
  1575. struct CertificateChainType ContractSignatureCertChain;
  1576. };
  1577. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  1578. struct PaymentDetailsResponse_ISO15118_2014
  1579. {
  1580. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1581. unsigned char GenChallenge[16];
  1582. long EVSETimeStamp;
  1583. };
  1584. struct IdentificationDetailsResponse_ISO15118_2018
  1585. {
  1586. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1587. struct EVSEStatusType EVSEStatus; //Optional
  1588. unsigned char GenChallenge[16];
  1589. enum ProcessingType EVSEProcessing;
  1590. };
  1591. /****ContractAuthenticationRequest / AuthorizationRequest****/
  1592. struct ContractAuthenticationRequest_DIN70121
  1593. {
  1594. //None
  1595. };
  1596. struct AuthorizationRequest_ISO15118_2014
  1597. {
  1598. unsigned char GenChallenge[16]; //Optional
  1599. unsigned char Id[32]; //Optional
  1600. };
  1601. struct AuthorizationRequest_ISO15118_2018
  1602. {
  1603. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  1604. };
  1605. /****ContractAuthenticationResponse / AuthorizationResponse****/
  1606. struct ContractAuthenticationResponse_DIN70121
  1607. {
  1608. enum ResponseCodeType_DIN70121 ResponseCode;
  1609. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1610. };
  1611. struct AuthorizationResponse_ISO15118_2014
  1612. {
  1613. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1614. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1615. };
  1616. struct AuthorizationResponse_ISO15118_2018
  1617. {
  1618. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1619. enum ProcessingType EVSEProcessing;
  1620. struct EVSEStatusType EVSEStatus; //Optional
  1621. };
  1622. /****ChargeParameterDiscoveryRequest****/
  1623. struct ChargeParameterDiscoveryRequest_DIN70121
  1624. {
  1625. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  1626. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  1627. };
  1628. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  1629. {
  1630. unsigned short MaxEntriesSAScheduleTuple; //Optional
  1631. enum EnergyTransferModeType RequestedEnergyTransferMode;
  1632. struct AC_EVChargeParameterType AC_EVChargeParameter;
  1633. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  1634. };
  1635. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  1636. {
  1637. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  1638. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  1639. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  1640. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  1641. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  1642. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  1643. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  1644. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  1645. };
  1646. /****ChargeParameterDiscoveryResponse****/
  1647. struct ChargeParameterDiscoveryResponse_DIN70121
  1648. {
  1649. enum ResponseCodeType_DIN70121 ResponseCode;
  1650. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1651. struct SAScheduleListType SAScheduleList;
  1652. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  1653. };
  1654. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  1655. {
  1656. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1657. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1658. struct SAScheduleListType SAScheduleList;
  1659. struct AC_EVSEChargeParameterType_ISO15118_2014 AC_EVSEChargeParameter;
  1660. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  1661. };
  1662. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  1663. {
  1664. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1665. struct EVSEStatusType EVSEStatus; //Optional
  1666. enum ProcessingType EVSEProcessing;
  1667. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  1668. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  1669. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  1670. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  1671. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  1672. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  1673. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  1674. };
  1675. /****PowerDeliveryRequest****/
  1676. struct PowerDeliveryRequest_DIN70121
  1677. {
  1678. BOOL ReadyToChargeState;
  1679. struct ChargingProfileType_DIN70121 ChargingProfile;
  1680. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  1681. };
  1682. struct PowerDeliveryRequest_ISO15118_2014
  1683. {
  1684. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  1685. short SAScheduleTupleID;
  1686. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  1687. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  1688. };
  1689. struct PowerDeliveryRequest_ISO15118_2018
  1690. {
  1691. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  1692. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  1693. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  1694. };
  1695. /****PowerDeliveryResponse****/
  1696. struct PowerDeliveryResponse_DIN70121
  1697. {
  1698. enum ResponseCodeType_DIN70121 ResponseCode;
  1699. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1700. };
  1701. struct PowerDeliveryResponse_ISO15118_2014
  1702. {
  1703. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1704. struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
  1705. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1706. };
  1707. struct PowerDeliveryResponse_ISO15118_2018
  1708. {
  1709. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1710. struct EVSEStatusType EVSEStatus; //Optional
  1711. };
  1712. /****CertificateUpdateRequest****/
  1713. struct CertificateUpdateRequest_ISO15118_2014
  1714. {
  1715. unsigned char Id[32];
  1716. struct CertificateChainType ContractSignatureCertChain;
  1717. unsigned char eMAID[16];
  1718. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1719. };
  1720. /****CertificateUpdateResponse****/
  1721. struct CertificateUpdateResponse_ISO15118_2014
  1722. {
  1723. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1724. struct CertificateChainType SAProvisioningCertificateChain;
  1725. struct CertificateChainType ContractSignatureCertChain;
  1726. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  1727. struct DiffieHellmanPublickeyType DHpublickey;
  1728. unsigned char eMAID[16];
  1729. short RetryCounter; //Optional
  1730. };
  1731. /****CertificateInstallationRequest****/
  1732. struct CertificateInstallationRequest_ISO15118_2014
  1733. {
  1734. unsigned char Id[32];
  1735. unsigned char OEMProvisioningCert[800];
  1736. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1737. };
  1738. struct CertificateInstallationRequest_ISO15118_2018
  1739. {
  1740. unsigned char Id[32];
  1741. struct CertificateChainType OEMProvisioningCertChain;
  1742. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1743. unsigned short MaxSupportedCerts;
  1744. };
  1745. /****CertificateInstallationResponse****/
  1746. struct CertificateInstallationResponse_ISO15118_2014
  1747. {
  1748. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1749. struct CertificateChainType SAProvisioningCertificateChain;
  1750. struct CertificateChainType ContractSignatureCertChain;
  1751. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  1752. struct DiffieHellmanPublickeyType DHpublickey;
  1753. unsigned char eMAID[16];
  1754. };
  1755. struct CertificateInstallationResponse_ISO15118_2018
  1756. {
  1757. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1758. struct EVSEStatusType EVSEStatus; //Optional
  1759. struct CertificateChainType SAProvisioningCertificateChain;
  1760. struct CertificateChainType ContractCertificateChain;
  1761. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  1762. struct DiffieHellmanPublickeyType DHpublickey;
  1763. enum ProcessingType EVSEProcessing;
  1764. unsigned short RemainingContractCertificateChains;
  1765. };
  1766. /****SystemStatusRequest****/
  1767. struct SystemStatusRequest_ISO15118_2018
  1768. {
  1769. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  1770. struct EVTechnicalStatusType EVTechnicalStatus;
  1771. unsigned char EV_OEMStatus[800]; //Optional
  1772. };
  1773. /****SystemStatusResponse****/
  1774. struct SystemStatusResponse_ISO15118_2018
  1775. {
  1776. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1777. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  1778. BOOL EVSE_ReadyToCharge;
  1779. enum IsolationStatusType EVSE_IsolationStatus;
  1780. BOOL EVSE_Disabled;
  1781. BOOL EVSE_UtilityInterruptEvent;
  1782. BOOL EVSE_EmergencyShutdown;
  1783. BOOL EVSE_Malfunction;
  1784. BOOL EV_InChargePosition;
  1785. BOOL EV_AssociationStatus;
  1786. };
  1787. /****SessionStopRequest****/
  1788. struct SessionStopRequest_DIN70121
  1789. {
  1790. //No member in standard
  1791. };
  1792. struct SessionStopRequest_ISO15118_2014
  1793. {
  1794. enum ChargingSessionType ChargingSession;
  1795. };
  1796. struct SessionStopRequest_ISO15118_2018
  1797. {
  1798. enum ChargingSessionType ChargingSession;
  1799. };
  1800. /****SessionStopResponse****/
  1801. struct SessionStopResponse_DIN70121
  1802. {
  1803. enum ResponseCodeType_DIN70121 ResponseCode;
  1804. };
  1805. struct SessionStopResponse_ISO15118_2014
  1806. {
  1807. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1808. };
  1809. struct SessionStopResponse_ISO15118_2018
  1810. {
  1811. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1812. struct EVSEStatusType EVSEStatus; //Optional
  1813. };
  1814. /****MeteringReceiptRequest****/
  1815. struct MeteringReceiptRequest_ISO15118_2014
  1816. {
  1817. unsigned char Id[32]; //Optional
  1818. unsigned char SessionID[8];
  1819. short SAScheduleTupleID; //Optional
  1820. struct MeterInfoType_ISO15118_2014 MeterInfo;
  1821. };
  1822. struct MeteringReceiptRequest_ISO15118_2018
  1823. {
  1824. unsigned char Id[32]; //Optional
  1825. unsigned char SessionID[8];
  1826. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  1827. struct MeterInfoType_ISO15118_2018 MeterInfo;
  1828. };
  1829. /****MeteringReceiptResponse****/
  1830. struct MeteringReceiptResponse_ISO15118_2014
  1831. {
  1832. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1833. struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
  1834. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1835. };
  1836. struct MeteringReceiptResponse_ISO15118_2018
  1837. {
  1838. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1839. struct EVSEStatusType EVSEStatus; //Optional
  1840. };
  1841. /****ChargingStatusRequest (AC Only)****/
  1842. struct ChargingStatusRequest_ISO15118_2014
  1843. {
  1844. //No member in standard
  1845. };
  1846. struct ChargingStatusRequest_ISO15118_2018
  1847. {
  1848. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  1849. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  1850. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  1851. struct DisplayParametersType DisplayParameters;
  1852. };
  1853. /****ChargingStatusResponse (AC Only)****/
  1854. struct ChargingStatusResponse_ISO15118_2014
  1855. {
  1856. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1857. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1858. short SAScheduleTupleID;
  1859. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  1860. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  1861. BOOL ReceiptRequired; //Optional
  1862. struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
  1863. };
  1864. struct ChargingStatusResponse_ISO15118_2018
  1865. {
  1866. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1867. struct EVSEStatusType EVSEStatus; //Optional
  1868. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1869. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  1870. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  1871. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  1872. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  1873. };
  1874. /****CableCheckRequest (DC Only)****/
  1875. struct CableCheckRequest_DIN70121
  1876. {
  1877. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1878. };
  1879. struct CableCheckRequest_ISO15118_2014
  1880. {
  1881. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1882. };
  1883. struct CableCheckRequest_ISO15118_2018
  1884. {
  1885. //No member in standard
  1886. };
  1887. /****CableCheckResponse (DC Only)****/
  1888. struct CableCheckResponse_DIN70121
  1889. {
  1890. unsigned int cnt; //self added
  1891. enum ResponseCodeType_DIN70121 ResponseCode;
  1892. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1893. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1894. };
  1895. struct CableCheckResponse_ISO15118_2014
  1896. {
  1897. unsigned int cnt; //self added
  1898. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1899. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1900. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1901. };
  1902. struct CableCheckResponse_ISO15118_2018
  1903. {
  1904. unsigned int cnt; //self added
  1905. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1906. struct EVSEStatusType EVSEStatus; //Optional
  1907. enum ProcessingType EVSEProcessing;
  1908. };
  1909. /****PreChargeRequest (DC Only)****/
  1910. struct PreChargeRequest_DIN70121
  1911. {
  1912. unsigned int cnt; //self added
  1913. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1914. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  1915. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  1916. };
  1917. struct PreChargeRequest_ISO15118_2014
  1918. {
  1919. unsigned int cnt; //self added
  1920. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1921. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  1922. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  1923. };
  1924. struct PreChargeRequest_ISO15118_2018
  1925. {
  1926. unsigned int cnt; //self added
  1927. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  1928. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  1929. };
  1930. /****PreChargeResponse (DC Only)****/
  1931. struct PreChargeResponse_DIN70121
  1932. {
  1933. enum ResponseCodeType_DIN70121 ResponseCode;
  1934. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1935. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1936. };
  1937. struct PreChargeResponse_ISO15118_2014
  1938. {
  1939. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1940. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1941. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  1942. };
  1943. struct PreChargeResponse_ISO15118_2018
  1944. {
  1945. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1946. struct EVSEStatusType EVSEStatus; //Optional
  1947. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  1948. };
  1949. /****CurrentDemandRequest (DC Only)****/
  1950. struct CurrentDemandRequest_DIN70121
  1951. {
  1952. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1953. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  1954. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  1955. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  1956. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  1957. BOOL BulkChargingComplete; //Optional
  1958. BOOL ChargingComplete;
  1959. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  1960. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  1961. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  1962. };
  1963. struct CurrentDemandRequest_ISO15118_2014
  1964. {
  1965. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1966. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  1967. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  1968. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  1969. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  1970. BOOL BulkChargingComplete; //Optional
  1971. BOOL ChargingComplete;
  1972. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  1973. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  1974. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  1975. };
  1976. struct CurrentDemandRequest_ISO15118_2018
  1977. {
  1978. struct DisplayParametersType DisplayParameters; //Optional
  1979. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  1980. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  1981. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  1982. };
  1983. /****CurrentDemandResponse (DC Only)****/
  1984. struct CurrentDemandResponse_DIN70121
  1985. {
  1986. enum ResponseCodeType_DIN70121 ResponseCode;
  1987. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1988. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1989. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  1990. BOOL EVSECurrentLimitAchieved;
  1991. BOOL EVSEVoltageLimitAchieved;
  1992. BOOL EVSEPowerLimitAchieved;
  1993. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  1994. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  1995. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  1996. };
  1997. struct CurrentDemandResponse_ISO15118_2014
  1998. {
  1999. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2000. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2001. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2002. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  2003. BOOL EVSECurrentLimitAchieved;
  2004. BOOL EVSEVoltageLimitAchieved;
  2005. BOOL EVSEPowerLimitAchieved;
  2006. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  2007. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  2008. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  2009. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2010. short SAScheduleTupleID;
  2011. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  2012. BOOL ReceiptRequired; //Optional
  2013. };
  2014. struct CurrentDemandResponse_ISO15118_2018
  2015. {
  2016. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2017. struct EVSEStatusType EVSEStatus; //Optional
  2018. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2019. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  2020. BOOL EVSECurrentLimitAchieved;
  2021. BOOL EVSEVoltageLimitAchieved;
  2022. BOOL EVSEPowerLimitAchieved;
  2023. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  2024. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  2025. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  2026. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2027. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  2028. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  2029. };
  2030. /****WeldingDetectionRequest (DC Only)*****/
  2031. struct WeldingDetectionRequest_DIN70121
  2032. {
  2033. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2034. };
  2035. struct WeldingDetectionRequest_ISO15118_2014
  2036. {
  2037. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2038. };
  2039. struct WeldingDetectionRequest_ISO15118_2018
  2040. {
  2041. //No member in Standard
  2042. };
  2043. /****WeldingDetectionResponse (DC Only)****/
  2044. struct WeldingDetectionResponse_DIN70121
  2045. {
  2046. enum ResponseCodeType_DIN70121 ResponseCode;
  2047. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2048. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  2049. };
  2050. struct WeldingDetectionResponse_ISO15118_2014
  2051. {
  2052. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2053. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2054. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2055. };
  2056. struct WeldingDetectionResponse_ISO15118_2018
  2057. {
  2058. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2059. struct EVSEStatusType EVSEStatus; //Optional
  2060. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2061. };
  2062. /****FinePositioningSetupRequest (WPT Only)****/
  2063. struct FinePositioningSetupRequest_ISO15118_2018
  2064. {
  2065. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  2066. };
  2067. /****FinePositioningSetupResponse (WPT Only)****/
  2068. struct FinePositioningSetupResponse_ISO15118_2018
  2069. {
  2070. //NOT complete yet, to be continue.....
  2071. };
  2072. struct V2GMessageType_DIN70121 {
  2073. enum MsgFlowStatus PresentMsgFlowStatus;
  2074. enum MsgFlowStatus PresentMsgFlowStatus_pre;
  2075. /* 0: IDLE(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2076. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2077. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2078. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2079. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2080. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2081. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2082. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2083. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2084. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2085. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2086. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2087. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2088. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2089. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2090. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2091. 52: SessionStopRequest, 53: SessionStopResponse
  2092. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2093. */
  2094. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  2095. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  2096. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  2097. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  2098. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  2099. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  2100. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  2101. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  2102. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  2103. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  2104. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  2105. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  2106. struct CableCheckRequest_DIN70121 CableCheckRequest;
  2107. struct CableCheckResponse_DIN70121 CableCheckResponse;
  2108. struct PreChargeRequest_DIN70121 PreChargeRequest;
  2109. struct PreChargeResponse_DIN70121 PreChargeResponse;
  2110. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  2111. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  2112. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  2113. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  2114. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  2115. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  2116. struct SessionStopRequest_DIN70121 SessionStopRequest;
  2117. struct SessionStopResponse_DIN70121 SessionStopResponse;
  2118. };
  2119. struct V2GMessageType_ISO15118_2014 {
  2120. enum MsgFlowStatus PresentMsgFlowStatus;
  2121. enum MsgFlowStatus PresentMsgFlowStatus_pre;
  2122. /* 0: IDLE(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2123. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2124. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2125. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2126. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2127. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2128. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2129. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2130. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2131. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2132. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2133. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2134. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2135. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2136. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2137. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2138. 52: SessionStopRequest, 53: SessionStopResponse
  2139. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2140. */
  2141. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  2142. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  2143. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  2144. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  2145. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  2146. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  2147. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  2148. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  2149. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  2150. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  2151. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  2152. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  2153. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  2154. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  2155. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  2156. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  2157. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  2158. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  2159. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  2160. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  2161. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  2162. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  2163. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  2164. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  2165. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  2166. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  2167. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  2168. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  2169. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  2170. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  2171. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  2172. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  2173. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  2174. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  2175. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  2176. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  2177. };
  2178. struct V2GMessageType_ISO15118_2018 {
  2179. enum MsgFlowStatus PresentMsgFlowStatus;
  2180. enum MsgFlowStatus PresentMsgFlowStatus_pre;
  2181. /* 0: IDLE(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2182. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2183. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2184. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2185. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2186. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2187. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2188. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2189. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2190. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2191. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2192. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2193. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2194. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2195. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2196. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2197. 52: SessionStopRequest, 53: SessionStopResponse
  2198. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2199. */
  2200. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  2201. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  2202. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  2203. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  2204. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  2205. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  2206. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  2207. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  2208. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  2209. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  2210. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  2211. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  2212. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  2213. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  2214. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  2215. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  2216. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  2217. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  2218. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  2219. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  2220. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  2221. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  2222. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  2223. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  2224. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  2225. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  2226. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  2227. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  2228. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  2229. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  2230. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  2231. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  2232. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  2233. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  2234. };
  2235. struct CcsData {
  2236. unsigned char CommProtocol;
  2237. //0: V2GT_MSG_PROTOCOL_DIN70121
  2238. //1: V2GT_MSG_PROTOCOL_ISO15118_2014
  2239. //2: V2GT_MSG_PROTOCOL_ISO15118_2018
  2240. unsigned char EnergyTransferMode;
  2241. struct V2GMessageType_DIN70121 V2GMessage_DIN70121;
  2242. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014;
  2243. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018;
  2244. };
  2245. struct InternalComm {
  2246. unsigned char ChargingPermission;
  2247. unsigned char SlaveAddress;
  2248. unsigned char IsolationStatus; //0:ongoing, 1:valid, 2:warning/fault
  2249. unsigned char CCSConnectorType; //0:CCS1, 1:CCS2
  2250. unsigned char MaximumAllowedChargingTime; //0x00: unlimited
  2251. //(0x01: 1 minutes ~ 0xFF: 255 minutes, resolution: 1 minute)
  2252. unsigned int RTC; //4 bytes
  2253. unsigned char EVSEPrechargeStatus;
  2254. int MaximumChargingVoltage; //0~6553.5 volt, resolution: 0.1V
  2255. int AvailableChargingCurrent; //0~6553.5 amp, resolution: 0.1V
  2256. int AvailableChargingPower; //0~6553.5 kW, resolution: 0.1KW
  2257. int PresentChargingVoltage; //0~6553.5 volt, resolution: 0.1V
  2258. int PresentChargingCurrent; //0~6553.5 amp, resolution: 0.1A
  2259. int PresentChargingPower; //0~6553.5 KW, resolution: 0.1KW
  2260. struct timeb CAN_Rx_Timer_Start;
  2261. struct timeb CAN_Rx_Timer_End;
  2262. int FD_CAN_Socket;
  2263. struct timeb Start_Time;
  2264. struct timeb End_Time;
  2265. unsigned char ChargingPermission_new;
  2266. BOOL AC_RcdStatus; //0:no error, 1:error
  2267. unsigned char AC_EVSEID[40];
  2268. unsigned char AC_MeterID[32];
  2269. unsigned char AC_EVSEModelName[32];
  2270. unsigned char AC_BatteryChargeType;
  2271. unsigned char AC_CpPresentPWMDuty;
  2272. unsigned char AC_CpPresentState;
  2273. unsigned short AC_ChargingRemainTime;
  2274. unsigned int AC_CSUAlarmStatusCode;
  2275. unsigned int AC_CcsHeartBeat;
  2276. float AC_GridVoltage[3];
  2277. float AC_MeterReadingValue;
  2278. float AC_CpPositiveVoltage;
  2279. float AC_CpNegativeVoltage;
  2280. float AC_EVSEMaxCurrent;
  2281. float AC_EVSEMinCurrent;
  2282. float AC_EVSEPresentCurrent[3];
  2283. BOOL AC_OutputRelayStatus;
  2284. float AC_AvailableChargingPower; //1KW
  2285. unsigned char AC_EVSENotification; //0:none, 1:StopCharging, 2:RenNgotiation
  2286. unsigned char ChargingPermission_pre;
  2287. unsigned char SlaveAddress_pre;
  2288. unsigned char IsolationStatus_pre; //0:ongoing, 1:valid, 2:warning/fault
  2289. unsigned char CCSConnectorType_pre; //0:CCS1, 1:CCS2
  2290. unsigned char MaximumAllowedChargingTime_pre; //0x00: unlimited
  2291. //(0x01: 1 minutes ~ 0xFF: 255 minutes, resolution: 1 minute)
  2292. unsigned int RTC_pre; //4 bytes
  2293. unsigned char EVSEPrechargeStatus_pre;
  2294. int MaximumChargingVoltage_pre; //0~6553.5 volt, resolution: 0.1V
  2295. int AvailableChargingCurrent_pre; //0~6553.5 amp, resolution: 0.1V
  2296. int AvailableChargingPower_pre; //0~6553.5 kW, resolution: 0.1KW
  2297. int PresentChargingVoltage_pre; //0~6553.5 volt, resolution: 0.1V
  2298. int PresentChargingCurrent_pre; //0~6553.5 amp, resolution: 0.1A
  2299. int PresentChargingPower_pre; //0~6553.5 KW, resolution: 0.1KW
  2300. BOOL AC_RcdStatus_pre; //0:no error, 1:error
  2301. unsigned char AC_EVSEID_pre[40];
  2302. unsigned char AC_MeterID_pre[32];
  2303. unsigned char AC_EVSEModelName_pre[32];
  2304. unsigned char AC_BatteryChargeType_pre;
  2305. unsigned char AC_CpPresentPWMDuty_pre;
  2306. unsigned char AC_CpPresentState_pre;
  2307. unsigned short AC_ChargingRemainTime_pre;
  2308. unsigned int AC_CSUAlarmStatusCode_pre;
  2309. unsigned int AC_CcsHeartBeat_pre;
  2310. float AC_GridVoltage_pre[3];
  2311. float AC_MeterReadingValue_pre;
  2312. float AC_CpPositiveVoltage_pre;
  2313. float AC_CpNegativeVoltage_pre;
  2314. float AC_EVSEMaxCurrent_pre;
  2315. float AC_EVSEMinCurrent_pre;
  2316. float AC_EVSEPresentCurrent_pre[3];
  2317. BOOL AC_OutputRelayStatus_pre;
  2318. float AC_AvailableChargingPower_pre; //1KW
  2319. unsigned char AC_EVSENotification_pre; //0:none, 1:StopCharging, 2:RenNgotiation
  2320. struct DownloadImageInfoStructure {
  2321. FILE *file;
  2322. unsigned char active;
  2323. unsigned char type;
  2324. char filename[128];
  2325. unsigned long image_rx_cnt;
  2326. unsigned long image_size;
  2327. unsigned long total_can_packets;
  2328. unsigned long image_size_received; //unit: byte
  2329. unsigned char block_quantity;
  2330. unsigned char block_sequence_number;
  2331. unsigned char block_size_KByte; //unit: KBytes
  2332. unsigned char block_checksum;
  2333. unsigned char final_canmsg_size; //unit: byte
  2334. unsigned char downlaod_percentage;
  2335. unsigned char downlaod_percentage_pre;
  2336. } DownloadImageInfo;
  2337. struct EVSEStopChargingReqType {
  2338. unsigned char type;
  2339. unsigned char alarmcode[6];
  2340. } EVSEStopChargingReq;
  2341. union
  2342. {
  2343. unsigned char InternalCommVal;
  2344. struct
  2345. {
  2346. //FaultVal[0]
  2347. unsigned int matched: 1; //CAN_CMD_ADDRESS_REQUEST 0x00000100
  2348. unsigned int Got_AssignedAddress: 1; //CAN_CMD_ADDRESS_ASSIGN 0x00000200
  2349. unsigned int Send_EVBoardStatus: 1; //CAN_CMD_EV_BOARD_STATUS 0x00000300
  2350. unsigned int Got_FWVersionReq: 1; //CAN_CMD_GET_FW_VERSION 0x00000400
  2351. unsigned int Got_HWVersionReq: 1; //CAN_CMD_GET_HW_VERSION 0x00000500
  2352. unsigned int Got_ChargingPermission: 1; //CAN_CMD_CHARGING_PERMISSION 0x00000600
  2353. unsigned int Got_EVSEOutputStatus: 1; //CAN_CMD_EVSE_OUTPUT_STATUS_ANNOUNCEMENT 0x00000700
  2354. unsigned int Got_EnergyCapacity: 1; //CAN_CMD_EVSE_CAPACITY_ANNOUNCEMENT 0x00000800
  2355. unsigned int Got_EVTargetReq: 1; //CAN_CMD_GET_EV_TARGET_INFO 0x00000900
  2356. unsigned int Got_EVBatteryInfoReq: 1; //CAN_CMD_GET_EV_BATTERY_INFO 0x00000A00
  2357. unsigned int Send_EVStopReq: 1; //#define CAN_CMD_EV_STOP_EVENT 0x00000B00
  2358. unsigned int Got_EVSEStopReq: 1; //#define CAN_CMD_EVSE_STOP_EVENT 0x00000C00
  2359. unsigned int Got_MiscellaneousInfoReq: 1; //#define CAN_CMD_GET_MISC_INFO 0x00000D00
  2360. unsigned int Got_DownloadImageReq: 1; //#define CAN_CMD_DOWNLOAD_REQUEST 0x00000E00
  2361. unsigned int Got_BlockTransferStartReq: 1; //#define CAN_CMD_START_BLOCK_TRANSFER 0x00000F00
  2362. unsigned int Got_DataTransferReq: 1; //CAN_CMD_DATA_TRANSFER 0x00001000
  2363. unsigned int Got_DownloadFinishReq: 1; //CAN_CMD_DOWNLOAD_FINISH 0x00001100
  2364. unsigned int Got_IsolationStatus: 1; //CAN_CMD_ISOLATION_STATUS 0x00001200
  2365. unsigned int Got_CCSConnectorReq: 1; //CAN_CMD_CCS_CONNECTOR_INFO 0x00001300
  2366. unsigned int Got_RTC: 1; //CAN_CMD_RTC_INFO 0x00001400
  2367. unsigned int Got_EVSE_Precharge_Info: 1; //CAN_CMD_EVSE_PRECHARGE_INFO 0x00001500
  2368. unsigned int Got_EVCCID_Req: 1; //CAN_CMD_EVCCID_REQUEST 0x00001600
  2369. unsigned int EV_Stop_Type_Emergency: 1;
  2370. unsigned int FW_Update_Done: 1;
  2371. unsigned int FW_Update_Task_inused: 1;
  2372. unsigned int FW_Update_result: 1;
  2373. unsigned int FW_Update_Reboot_inused: 1;
  2374. unsigned int CAN_Rx_Timeout: 1;
  2375. unsigned int Reboot_Process_inused: 1;
  2376. unsigned int reserved: 3;
  2377. } bits;
  2378. } InternalCommUnion;
  2379. };
  2380. #endif // DEFINE_H_