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