define_ccs.h 115 KB

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