define.h 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843
  1. #ifndef DEFINE_H_
  2. #define DEFINE_H_
  3. /**************************************************************************************/
  4. /*********************************NAND Flash mapping *****************************/
  5. /**************************************************************************************/
  6. /*
  7. sector size 512 KiB
  8. Page size 4096 b
  9. OOB size 224 b
  10. Erase size 524288 b
  11. -------------------------------------------------------------------------------------------------------------------------------
  12. Segment Physical address Size
  13. -------------------------------------------------------------------------------------------------------------------------------
  14. MLO 0x00000000-0x0007FFFF 512 KB
  15. Primary u-boot 0x00080000-0x0017FFFF 1 MB
  16. Environment 0x00180000-0x001FFFFF 512 KB
  17. Secondary u-boot 0x00200000-0x002FFFFF 1 MB
  18. Primary dtb 0x00300000-0x0037FFFF 512 KB
  19. Secondary dtb 0x00380000-0x003FFFFF 512 KB
  20. Primary kernel 0x00400000-0x00DFFFFF 10 MB
  21. Secondary Kernel 0x00E00000-0x017FFFFF 10 MB
  22. Primary root file system 0x03000000-0x05FFFFFF 48 MB
  23. Secondary root file system 0x06000000-0x08FFFFFF 48 MB
  24. Primary user configuration 0x09000000-0x095FFFFF 6 MB
  25. Secondary user configuration 0x09600000-0x09BFFFFF 6 MB
  26. Factory default configuration 0x09C00000-0x0A1FFFFF 6 MB
  27. Storage 0x0A200000-0x7FFFFFFF 1886 MB
  28. */
  29. /**************************************************************************************/
  30. /*********************************System Limitation**********************************/
  31. /**************************************************************************************/
  32. /*Rating outout power and current*/
  33. #define RATED_POWER 60 //kW
  34. #define RATED_CURRENT 350 //Amp, it depend on the capacity of charging connector
  35. /*relevant to Quantity */
  36. #define MAX_PSU_QUANTITY 62
  37. #define CHAdeMO_QUANTITY 0
  38. #define CCS_QUANTITY 0
  39. #define GB_QUANTITY 0
  40. #define AC_QUANTITY 1
  41. /*SystemLog message*/
  42. #define SystemLogMessage //for engineer to do analysis
  43. /**************************************************************************************/
  44. /**************************share memory key information***************************/
  45. /**************************************************************************************/
  46. #define ShmSysConfigAndInfoKey 1001
  47. #define ShmPsuKey 1002
  48. #define ShmCHAdeMOCommKey 1003
  49. #define ShmCcsCommKey 1004
  50. #define ShmStatusCodeKey 1005
  51. #define ShmPrimaryMcuKey 1006
  52. #define ShmFanBdKey 1007
  53. #define ShmRelayBdKey 1008
  54. #define ShmOcppModuleKey 1009
  55. /**************************************************************************************/
  56. /****structure SysConfigData => shall store the data to NAND flash****************/
  57. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  58. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  59. /**************************************************************************************/
  60. struct EthConfigData
  61. {
  62. unsigned char EthDhcpClient; //0: enable,1: disable
  63. unsigned char EthMacAddress[18]; //default: Null
  64. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  65. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  66. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  67. };
  68. struct WifiConfigData
  69. {
  70. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  71. unsigned char WifiSsid[256]; //default: Null
  72. unsigned char WifiPassword[256]; //default: Null
  73. int WifiRssi; //dbm
  74. unsigned char WifiDhcpServer; //0: enable, 1: disable
  75. unsigned char WifiDhcpClient; //0: enable, 1: disable
  76. unsigned char WifiMacAddress[18]; //default: Null
  77. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  78. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  79. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  80. unsigned char WifiNetworkConn; //0: disconnected, 1: connected
  81. };
  82. struct TeleConfigData
  83. {
  84. unsigned char TelcomModelName[64]; //default: Null
  85. unsigned char TelcomSoftwareVer[64]; //default: Null
  86. unsigned char TelcomApn[256]; //default: Null
  87. int TelcomRssi; //dbm
  88. unsigned char TelcomChapPapId[256]; //default: Null
  89. unsigned char TelcomChapPapPwd[256]; //default: Null
  90. unsigned char TelcomModemImei[16]; //default: Null
  91. unsigned char TelcomSimImsi[16]; //default: Null
  92. unsigned char TelcomSimIccid[20]; //default: Null
  93. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  94. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
  95. unsigned char TelcomIpAddress[16]; //default: Null
  96. unsigned char TelcomNetworkConn; //0: disconnected, 1: connected
  97. };
  98. struct BtConfigData
  99. {
  100. unsigned char LoginCentralID[64]; //default: Null
  101. unsigned char isLogin; //0: Central device non-login 1: Central device login
  102. unsigned char isRequestStart; //0: no action 1: request start charging
  103. unsigned char isRequestStop; //0: no action 1: request stop charging
  104. };
  105. struct SysConfigData
  106. {
  107. /**************System***************/
  108. unsigned char ModelName[64]; //charger model name
  109. unsigned char SerialNumber[64]; //charger system serial number
  110. unsigned char SystemId[128]; //charger system ID
  111. unsigned char SystemDateTime[32]; //charger system date and time
  112. unsigned char AcPhaseCount; //AC EVSE power phase quantity, 1: One phase 3: Three phase
  113. unsigned char AuthorisationMode; //0: Phihong RFID tag, 1: OCPP backend, 2: Phihong backend, 3: free mode
  114. unsigned char DefaultLanguage; //
  115. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  116. unsigned short AcPlugInTimes; //0~65535
  117. unsigned short GbPlugInTimes; //0~65535
  118. unsigned short Ccs1PlugInTime; //0~65535
  119. unsigned short Ccs2PlugInTimes; //0~65535
  120. unsigned short ChademoPlugInTimes; //0~65535
  121. /**************Charging***************/
  122. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  123. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW"
  124. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp"
  125. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  126. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  127. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  128. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  129. /**************Network***************/
  130. unsigned char FtpServer[32]; //the ftp server for Phihong server to do data transimission
  131. struct EthConfigData Eth0Interface;
  132. struct EthConfigData Eth1Interface;
  133. struct WifiConfigData AthInterface;
  134. struct TeleConfigData TelecomInterface;
  135. struct BtConfigData Bluetooth;
  136. /**************Backend***************/
  137. unsigned int BackendConnTimeout; //default : 300s
  138. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  139. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  140. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  141. 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"
  142. unsigned char ChargeBoxId[128];
  143. unsigned int Checksum; //4 bytes checksum
  144. };
  145. struct ChargingInfoData
  146. {
  147. unsigned char Index;
  148. unsigned char Type; // 0 : Chademo, 1 : CCS, 2: GB, 3: AC
  149. unsigned char type_index;
  150. unsigned char SystemStatus; // 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  151. unsigned char PreviousSystemStatus; // 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  152. float MaximumChargingVoltage; // 0~6553.5 volt
  153. float AvailableChargingCurrent; // 0~6553.5 amp
  154. float AvailableChargingPower; // 0~6553.5 kW
  155. float PresentChargingVoltage ; // 0~6553.5 volt
  156. float PresentChargingCurrent; // 0~6553.5 amp
  157. float PresentChargingPower; // 0~6553.5 kW
  158. float PresentChargedEnergy; // 0~6553.5 kWh
  159. float AcChargingVoltage[3]; // 0~6553.5 volt for AC EVSE
  160. float AcChargingCurrent[3]; // 0~6553.5 amp for EVSE
  161. int PresentChargedDuration; // second
  162. int RemainChargingDuration; // second
  163. float EvBatteryMaxVoltage; // 0~6553.5 volt
  164. float EvBatterytargetVoltage; // 0~6553.5 volt
  165. float EvBatterytargetCurrent; // 102.3 0~200(A) (unit:1A)
  166. int EvBatterySoc; // 0~100%
  167. unsigned char ConnectorPlugIn; // 0: unplug, 1: Plug-in
  168. float PilotVoltage;
  169. unsigned char PilotState; // 1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
  170. unsigned char PilotDuty; // 0~100%
  171. unsigned char StartUserId[32]; // This ID is trigger start charging event user by RFID、back-end、BLE.
  172. unsigned char StartDateTime[32]; // Charging cycle start date time
  173. unsigned char StoptDateTime[32]; // Charging cycle stop date time
  174. unsigned char StartMethod; // 0:Manual, 1:RFID, 2:Back-end, 3:BLE
  175. };
  176. struct SysInfoData
  177. {
  178. /**************System***************/
  179. unsigned char FactoryConfiguration; // 0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  180. float InputVoltageR; // 0~655.35 volt
  181. float InputVoltageS; // 0~655.35 volt
  182. float InputVoltageT; // 0~655.35 volt
  183. unsigned int SystemFanRotaSpeed; // 0 ~ 65535 RPM
  184. unsigned int PsuFanRotaSpeed; // 0 ~ 65535 RPM
  185. unsigned char AuxPower5V; // 0 ~ 255 volt
  186. unsigned char AuxPower12V; // 0 ~ 255 volt
  187. unsigned char AuxPower24V; // 0 ~ 255 volt
  188. unsigned char AuxPower48V; // 0 ~ 255 volt
  189. unsigned char CsuHwRev[32]; // CSU board hardware version
  190. unsigned char CsuBootLoadFwRev[32]; // CSU board bootloader firmware version
  191. unsigned char CsuKernelFwRev[32]; // CSU board OS kernel firmware version
  192. unsigned char CsuRootFsFwRev[32]; // CSU board root file system firmware version
  193. unsigned char CsuPrimFwRev[32]; // CSU board root file system firmware version
  194. unsigned char LcmHwRev[32]; // LCM module hardware version
  195. unsigned char LcmFwRev[32]; // LCM module firmware version
  196. unsigned char PsuHwRev[32]; // PSU hardware version
  197. unsigned char PsuPrimFwRev[32]; // PSU primary firmware version
  198. unsigned char PsuSecFwRev[32]; // PSU secondary firmware version
  199. unsigned char AuxPwrHwRev[32]; // Aux. power module hardware version
  200. unsigned char AuxPwrFwRev[32]; // Aux. power module firmware version
  201. unsigned char FanModuleHwRev[32]; // Fan module hardware version
  202. unsigned char FanModuleFwRev[32]; // Fan module firmware version
  203. unsigned char RelayModuleHwRev[32]; // Relay control module hardware version
  204. unsigned char RelayModuleFwRev[32]; // Relay control module firmware version
  205. unsigned char TelcomModemFwRev[32]; // the 3G/4G modem firmware version
  206. int SystemAmbientTemp; // -40 ~ 215 degree C
  207. int SystemCriticalTemp; // -40 ~ 215 degree C
  208. int CcsConnectorTemp; // -40 ~ 215 degree C
  209. int PsuAmbientTemp; // -40 ~ 215 degree C
  210. /**************Charging***************/
  211. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  212. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  213. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  214. struct ChargingInfoData AcChargingData[AC_QUANTITY];
  215. /**************Network***************/
  216. unsigned char InternetConn; //0: disconnected, 1: connected
  217. /**************Backend***************/
  218. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  219. };
  220. struct SysConfigAndInfo
  221. {
  222. struct SysConfigData SysConfig;
  223. struct SysInfoData SysInfo;
  224. };
  225. /**************************************************************************************/
  226. /**************************Alarm Share memory**************************************/
  227. /***************************************************************************************
  228. Status Code A B C D E F
  229. 0: Issue 1: From EVSE 1: Fault (unrecoverable) 001 ~ 999 serial number
  230. e.g., hardware broken, system latch
  231. 1: Recovered 2: From EV 2: Alarm (recoverable)
  232. e.g., OTP, OVP
  233. 3: From Backend 3: Information
  234. e.g., swipe card to stop charging
  235. according to XXX.Revxx
  236. ***************************************************************************************/
  237. /**************************************************************************************/
  238. char FaultStatusCode[32][6]=
  239. {
  240. "011001", //CHAdeMO output fuse blew
  241. "011002", //CCS output fuse blew
  242. "011003", //GB output fuse blew
  243. "011004", //RCD/CCID self-test fail
  244. "011005", //AC input contactor 1 welding
  245. "011006", //AC input contactor 1 driving fault
  246. "011007", //AC input contactor 2 welding
  247. "011008", //AC input contactor 2 driving fault
  248. "011009", //AC output relay welding
  249. "011010", //AC output relay driving fault
  250. "011011", //CHAdeMO output relay welding
  251. "011012", //CHAdeMO output relay driving fault
  252. "011013", //CCS output relay welding
  253. "011014", //CCS output relay driving fault
  254. "011015", //GB output relay welding
  255. "011016", //GB output relay driving fault
  256. "011017", //AC connector temperature sensor broken
  257. "011018", //CHAdeMO connector temperature sensor broken
  258. "011019", //CCS connector temperature sensor broken
  259. "011020", //GB connector temperature sensor broken
  260. "011021", //WiFi module broken
  261. "011022", //3G/4G module broken
  262. "011023", //Aux. power module broken
  263. "011024", //Relay control module /smart box broken
  264. "011025", //CHAdeMO connector lock fail
  265. "011026", //GB connector lock fail
  266. "011027", //AC connector lock fail
  267. "011028", //CHAdeMO module broken
  268. "011029", //CCS module broken
  269. "011030", //GBT module broken
  270. "011031", //PSU module broken
  271. "011032" //Reserved
  272. };
  273. struct FaultCodeData
  274. {
  275. unsigned char PreviousFaultVal[4];
  276. union
  277. {
  278. unsigned char FaultVal[4];
  279. struct
  280. {
  281. //FaultVal[0]
  282. unsigned char ChademoOutputFuseBlew:1; //bit 0
  283. unsigned char CcsOutputFuseBlew:1; //bit 1
  284. unsigned char GbOutputFuseBlew:1; //bit 2
  285. unsigned char RcdSelfTestFail:1; //bit 3
  286. unsigned char AcInputContactor1Welding:1; //bit 4
  287. unsigned char AcInputContactor1DrivingFault:1; //bit 5
  288. unsigned char AcInputContactor2Welding:1; //bit 6
  289. unsigned char AcInputContactor2DrivingFault:1; //bit 7
  290. //FaultVal[1]
  291. unsigned char AcOutputRelayWelding:1; //bit 0
  292. unsigned char AcOutputRelayDrivingFault:1; //bit 1
  293. unsigned char ChademoOutputRelayWelding:1; //bit 2
  294. unsigned char ChademoOutputRelayDrivingFault:1; //bit 3
  295. unsigned char CcsOutputRelayWelding:1; //bit 4
  296. unsigned char CcsOutputRelayDrivingFault:1; //bit 5
  297. unsigned char GbOutputRelayWelding:1; //bit 6
  298. unsigned char GbOutputRelayDrivingFault:1; //bit 7
  299. //FaultVal[2]
  300. unsigned char AcConnectorTempSensorBroken:1; //bit 0
  301. unsigned char ChademoConnectorTempSensorBroken:1; //bit 1
  302. unsigned char CcsConnectorTempSensorBroken:1; //bit 2
  303. unsigned char GbConnectorTempSensorBroken:1; //bit 3
  304. unsigned char WiFiModuleBroken:1; //bit 4
  305. unsigned char Telecom4GModuleBroken:1; //bit 5
  306. unsigned char AuxPowerModuleBroken:1; //bit 6
  307. unsigned char RelayControlModuleBroken :1; //bit 7
  308. //FaultVal[3]
  309. unsigned char ChademoConnectorLockFail:1; //bit 0
  310. unsigned char GbConnectorLockFail:1; //bit 1
  311. unsigned char AcConnectorLockFail:1; //bit 2
  312. unsigned char ChademoModuleBroken:1; //bit 3
  313. unsigned char CcsModuleBroken:1; //bit 4
  314. unsigned char GbModuleBroken:1; //bit 5
  315. unsigned char PsuModuleBroken:1; //bit 6
  316. unsigned char :1; //bit 7 reserved
  317. }bits;
  318. }FaultEvents;
  319. };
  320. char AlarmStatusCode[64][6]=
  321. {
  322. "012200", //System L1 input OVP
  323. "012201", //System L2 input OVP
  324. "012202", //System L3 input OVP
  325. "012203", //System L1 input UVP
  326. "012204", //System L2 input UVP
  327. "012205", //System L3 input UVP
  328. "012206", //PSU L1 input OVP
  329. "012207", //PSU L2 input OVP
  330. "012208", //PSU L3 input OVP
  331. "012209", //PSU L1 input UVP
  332. "012210", //PSU L2 input UVP
  333. "012211", //PSU L3 input UVP
  334. "012212", //System L1 input drop
  335. "012213", //System L2 input drop
  336. "012214", //System L3 input drop
  337. "012215", //System AC output OVP
  338. "012216", //System AC output OCP
  339. "012217", //System CHAdeMO output OVP
  340. "012218", //System CHAdeMO output OCP
  341. "012219", //System CCS output OVP
  342. "012220", //System CCS output OCP
  343. "012221", //System GB output OVP
  344. "012222", //System GB output OCP
  345. "012223", //System ambient/inlet OTP
  346. "012224", //System critical point OTP
  347. "012225", //PSU ambient/inlet OTP
  348. "012226", //PSU critical point OTP
  349. "012227", //Aux. power module OTP
  350. "012228", //Relay board/smart box OTP
  351. "012229", //CHAdeMO connector OTP
  352. "012230", //CCS connector OTP
  353. "012231", //GB connector OTP
  354. "012232", //AC connector OTP
  355. "012233", //RCD/CCID trip
  356. "012234", //CHAdeMO GFD trip
  357. "012235", //CCS GFD trip
  358. "012236", //GB GFD trip
  359. "012237", //SPD trip
  360. "012238", //Main power breaker trip
  361. "012239", //Aux. power breaker trip
  362. "012240", //PSU communication fail
  363. "012241", //WiFi module communication fail
  364. "012242", //3G/4G module communication fail
  365. "012243", //RFID module communication fail
  366. "012244", //Bluetooth module communication fail
  367. "012245", //LCM module communication fail
  368. "012246", //Aux. power module communication fail
  369. "012247", //Relay control boaed/smart box communication fail
  370. "012248", //CCS module communication fail
  371. "012249", //CHAdeMO module communication fail
  372. "012250", //GBT module communication fail
  373. "012251", //Emergency stop
  374. "012252", //Door open
  375. "012253", //System fan decay
  376. "012254", //Fail to create share memory
  377. "012255", //CSU initialization failed
  378. "012256", //Reserved
  379. "012257", //Reserved
  380. "012258", //Reserved
  381. "012259", //Reserved
  382. "012260", //Reserved
  383. "012261", //Reserved
  384. "012262", //Reserved
  385. "012263" //Reserved
  386. };
  387. struct AlarmCodeData
  388. {
  389. unsigned char PreviousAlarmVal[8];
  390. union
  391. {
  392. unsigned char AlarmVal[8];
  393. struct
  394. {
  395. //AlarmVal[0]
  396. unsigned char SystemL1InputOVP:1; //bit 0
  397. unsigned char SystemL2InputOVP:1; //bit 1
  398. unsigned char SystemL3InputOVP:1; //bit 2
  399. unsigned char SystemL1InputUVP:1; //bit 3
  400. unsigned char SystemL2InputUVP:1; //bit 4
  401. unsigned char SystemL3InputUVP:1; //bit 5
  402. unsigned char PsuL1InputOVP:1; //bit 6
  403. unsigned char PsuL2InputOVP:1; //bit 7
  404. //AlarmVal[1]
  405. unsigned char PsuL3InputOVP:1; //bit 0
  406. unsigned char PsuL1InputUVP:1; //bit 1
  407. unsigned char PsuL2InputUVP:1; //bit 2
  408. unsigned char PsuL3InputUVP :1; //bit 3
  409. unsigned char SystemL1InputDrop:1; //bit 4
  410. unsigned char SystemL2InputDrop:1; //bit 5
  411. unsigned char SystemL3InputDrop:1; //bit 6
  412. unsigned char SystemAcOutputOVP:1; //bit 7
  413. //AlarmVal[2]
  414. unsigned char SystemAcOutputOCP:1; //bit 0
  415. unsigned char SystemChademoOutputOVP:1; //bit 1
  416. unsigned char SystemChademoOutputOCP:1; //bit 2
  417. unsigned char SystemCcsOutputOVP:1; //bit 3
  418. unsigned char SystemCcsOutputOCP:1; //bit 4
  419. unsigned char SystemGbOutputOVP:1; //bit 5
  420. unsigned char SystemGbOutputOCP:1; //bit 6
  421. unsigned char SystemAmbientOTP :1; //bit 7
  422. //AlarmVal[3]
  423. unsigned char SystemCriticalPointOTP:1; //bit 0
  424. unsigned char PsuAmbientOTP:1; //bit 1
  425. unsigned char PsuCriticalPointOTP:1; //bit 2
  426. unsigned char AuxPowerModuleOTP:1; //bit 3
  427. unsigned char RelayBoardOTP:1; //bit 4
  428. unsigned char ChademoConnectorOTP:1; //bit 5
  429. unsigned char CcsConnectorOTP:1; //bit 6
  430. unsigned char GbConnectorOTP:1; //bit 7
  431. //AlarmVal[4]
  432. unsigned char AcConnectorOTP:1; //bit 0
  433. unsigned char RcdTrip:1; //bit 1
  434. unsigned char ChademoGfdTrip:1; //bit 2
  435. unsigned char CcsGfdTrip:1; //bit 3
  436. unsigned char GbGfdTrip:1; //bit 4
  437. unsigned char SpdTrip:1; //bit 5
  438. unsigned char MainPowerBreakerTrip:1; //bit 6
  439. unsigned char AuxPowerBreakerTrip:1; //bit 7
  440. //AlarmVal[5]
  441. unsigned char PsuCommunicationFail:1; //bit 0
  442. unsigned char WiFiModuleCommFail:1; //bit 1
  443. unsigned char Telecom4GModuleCommFail:1; //bit 2
  444. unsigned char RfidModuleCommFail:1; //bit 3
  445. unsigned char BluetoothModuleCommFail:1; //bit 4
  446. unsigned char LcmModuleCommFail:1; //bit 5
  447. unsigned char AuxPowerModuleCommFail:1; //bit 6
  448. unsigned char RelayBoardCommFail:1; //bit 7
  449. //AlarmVal[6]
  450. unsigned char CcsModuleCommFail:1; //bit 0
  451. unsigned char ChademoModuleCommFail:1; //bit 1
  452. unsigned char GbModuleCommFail:1; //bit 2
  453. unsigned char EmergencyStopTrip:1; //bit 3
  454. unsigned char DoorOpen:1; //bit 4
  455. unsigned char SystemFanDecay:1; //bit 5
  456. unsigned char FailToCreateShareMemory:1; //bit 6
  457. unsigned char CsuInitFailed:1; //bit 7
  458. //AlarmVal[7]
  459. unsigned char :8; //reserved
  460. }bits;
  461. }AlarmEvents;
  462. };
  463. char InfoStatusCode[64][6]=
  464. {
  465. //Information comes from EVSE
  466. "013600", //Normal stop charging by user
  467. "013601", //Charging Time's up
  468. "013602", //Replace system air filter
  469. "013603", //Reach to CHAdeMO max. plugging times.
  470. "013604", //Reach to CCS max. plugging times.
  471. "013605", //Reach to GB max. plugging times.
  472. "013606", //Reach to AC max. plugging times.
  473. "013607", //CSU fimrware update fail
  474. "013608", //CHAdeMO Module fimrware update fail
  475. "013609", //CCS Module fimrware update fail
  476. "013610", //GB Module fimrware update fail
  477. "013611", //Aux. power module fimrware update fail
  478. "013612", //Relay control module fimrware update fail
  479. "013613", //LCM module fimrware update fail
  480. "013614", //Bluetooth module fimrware update fail
  481. "013615", //WiFi module fimrware update fail
  482. "013616", //3G/4G module fimrware update fail
  483. "013617", //SMR fimrware update fail
  484. "013618", //RFID module fimrware update fail
  485. "013619", //configured by USB flash drive
  486. "013620", //configured by backend
  487. "013621", //configured by webpage
  488. "013622", //disconnected from Internet through Ethernet
  489. "013623", //disconnected from Internet through WiFi
  490. "013624", //disconnected from Internet through 3G/4G
  491. "013625", //disconnected from AP through WiFi
  492. "013626", //disconnected from APN through 3G/4G
  493. "013627", //Reserved
  494. "013628", //Reserved
  495. "013629", //Reserved
  496. "013630", //Reserved
  497. "013631", //Reserved
  498. //Information comes from EV
  499. "023700", //CHAdeMO EV communication Fail
  500. "023701", //CCS EV communication Fail
  501. "023702", //GB EV communication Fail
  502. "023703", //AC: pilot fault
  503. "023704", //CHAdeMO: battery malfunction
  504. "023705", //CHAdeMO: no charging permission
  505. "023706", //CHAdeMO: battery incompatibility
  506. "023707", //CHAdeMO: battery OVP
  507. "023708", //CHAdeMO: battery UVP
  508. "023709", //CHAdeMO: battery OTP
  509. "023710", //CHAdeMO: battery current difference
  510. "023711", //CHAdeMO: battery voltage difference
  511. "023712", //CHAdeMO: shift position
  512. "023713", //CHAdeMO: battery other fault
  513. "023714", //CHAdeMO: charging system error
  514. "023715", //CHAdeMO: EV normal stop
  515. "023716", //Reserved
  516. "023717", //Reserved
  517. "023718", //Reserved
  518. "023719", //Reserved
  519. "023720", //Reserved
  520. "023721", //Reserved
  521. "023722", //Reserved
  522. "023723", //Reserved
  523. //Information comes from Backend
  524. "033900", //disconnected from backend through Ethernet
  525. "033901", //disconnected from backend through WiFi
  526. "033902", //disconnected from backend through 3G/4G
  527. "033903", //Remote start charging by backend
  528. "033904", //Remote stop charging by backend
  529. "033905", //Remote reset by backend
  530. "033906", //Reserved
  531. "033907", //Reserved
  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 ChademoEvCommFail:1; //bit 0
  575. unsigned char CcsEvCommFail:1; //bit 1
  576. unsigned char GbEvCommFail: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. {
  606. struct FaultCodeData FaultCode;
  607. struct AlarmCodeData AlarmCode;
  608. struct InfoCodeData InfoCode;
  609. };
  610. /**************************************************************************************/
  611. /**************************PSU Share memory***************************************/
  612. /**************************************************************************************/
  613. /*Following are the information for each PSU module*/
  614. struct PsuModuleData
  615. {
  616. unsigned char AssignID;
  617. unsigned char PhysicalID;
  618. unsigned char GroupID;
  619. unsigned char FwVersion[12];
  620. unsigned char StateMachine; //0: Identification, 1:Operation, 2: Alarm, 3: Failure, s4:Upgrade
  621. unsigned char OutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  622. unsigned short FanSpeed; //RPM
  623. unsigned short InputVoltageL1; //abcd=abc.d volt
  624. unsigned short InputVoltageL2; //abcd=abc.d volt
  625. unsigned short InputVoltageL3; //abcd=abc.d volt
  626. unsigned short PresentOutputVoltage; //abcd=abc.d volt
  627. unsigned short PresentOutputCurrent; //abcd=abc.d volt
  628. unsigned short AvailableCurrent; //abcd=abc.d Amps
  629. unsigned int AvailablePower; //Watt
  630. unsigned char CriticalTemp1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  631. unsigned char CriticalTemp2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  632. unsigned char CriticalTemp3; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  633. unsigned char InletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  634. unsigned char OutletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  635. unsigned int AlarmCode; //
  636. unsigned int FaultCode; //
  637. };
  638. /*Following are the information for each PSU Group*/
  639. struct PsuGroupData
  640. {
  641. unsigned char GroupPresentPsuQuantity;
  642. unsigned char GroupOutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  643. unsigned short GroupTargetOutputVoltage; //abcd=abc.d volt
  644. unsigned short GroupTargetOutputCurrent; //abcd=abc.d volt
  645. unsigned short GroupAvailableCurrent; //abcd=abc.d Amps
  646. unsigned int GroupAvailablePower; //Watt
  647. unsigned short GroupPresentOutputVoltage; //abcd=abc.d volt
  648. unsigned short GroupPresentOutputCurrent; //abcd=abc.d Amps
  649. struct PsuModuleData PsuModule[MAX_PSU_QUANTITY];
  650. };
  651. /*Following is the information for system all PSU*/
  652. struct PsuData
  653. {
  654. unsigned char SystemPresentPsuQuantity;
  655. struct PsuGroupData PsuGroup[4];
  656. };
  657. /************************************************************************************/
  658. /**************************CHAdeMO protocol Share memory*********************/
  659. /**************************************************************************************/
  660. struct CHAdeMOEvData
  661. {
  662. unsigned char SupportDynamicControl; //110.0
  663. // bit0=1:supported
  664. unsigned char SupportHighCurrent; //110.0
  665. // bit1=1:supported
  666. unsigned char MiniChargeCurrent; //100.0 0~200(A) (unit:1A)
  667. // 0x00: request for current equivalent to 1.5kW
  668. // 0x01: no request
  669. // 0x02: request of 1A and following are the same rule
  670. unsigned short MaxiBatteryVoltage; //100.5,100.4 0~600(V) (unit:1V)
  671. unsigned short MaxiChargingTime; //101.2,101.1 10(sec.)~255(min.) (Unit:sec)
  672. // Set 0xFF to 101.1 (Unit: 10sec) in case 101.2 (Unit: 1min) is used
  673. unsigned char EstimatChargingTime; //101.3 0~254(min.) (Unit:sec)
  674. // Display Only
  675. unsigned short TotalBatteryCapacity; //101.6,101.5 0.1~6553.5(kWh) (unit:0.1 kWh)
  676. unsigned char ProtocolVersion; //102.0 0~255
  677. // 0x02: CHAdeMO specification ver.1.2
  678. unsigned short TargetBatteryVoltage; //102.2,102.1 0~600(V) (unit:1V)
  679. unsigned short ChargingCurrentRequest; //102.3 0~200(A) (unit:1A)
  680. //110.2,110.1 0~1023(A) (unit:1A)
  681. unsigned char BatteryAlarm; //102.4 >0:alarm
  682. // bit0=1:Battery overvoltage
  683. // bit1=1:Battery undervoltage
  684. // bit2=1:Battery current deviation error
  685. // bit3=1:High battery temperature
  686. // bit4=1:Battery voltage deviation error
  687. unsigned char EvDetection; //102.5
  688. // bit0=0:Vehicle charging disabled, (stop charging)
  689. // bit0=1:Vehicle charging enabled,
  690. // bit1=0:¡§Parking¡¨ position
  691. // bit1=1:other position (stop charging)
  692. // bit2=0:Charging system normal
  693. // bit2=1:Charging system error (stop charging)
  694. // bit3=0:EV contactor close or during welding detection
  695. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  696. // bit4=0:No stop request before charging
  697. // bit4=1:Normal stop request before charging (stop charging)
  698. unsigned char SOC; //102.6 0~100(%) (unit:%)
  699. // Display Only
  700. unsigned char Communicating; // it is true if receive EV CAN message within every 1500ms
  701. };
  702. struct CHAdeMOEvseData
  703. {
  704. unsigned char SupportDynamicControl; //118.0
  705. // bit0=1:supported
  706. unsigned char SupportHighCurrent; //118.0
  707. // bit1=1:supported
  708. unsigned short AvailableOutputVoltage; //108.2,108.1 0~600(V) (unit:1V)
  709. unsigned short AvailableOutputCurrent; //108.3 0~255(A) (unit:1A)
  710. //118.2,118.1 0~1023(A) (unit:1A)
  711. unsigned short ThresholdVoltage; //108.5,108.4 0~600(V) (unit:1V)
  712. unsigned char ConnectorTemperatureP; //108.6 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  713. unsigned char ConnectorTemperatureN; //108.7 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  714. unsigned char ProtocolVersion; //109.0 0~255
  715. // 0x00: CHAdeMO specification 0.9 and earlier
  716. // 0x01: CHAdeMO specification 0.9 and 0.9.1
  717. // 0x02: CHAdeMO specification 1.0.0, 1.0.1, 1.1 and 1.2
  718. unsigned short PresentOutputVoltage; //109.2,109.1 0~600(V) (unit:1V)
  719. unsigned short PresentOutputCurrent; //109.3 0~255(A) (unit:1A)
  720. //118.4,118.3 0~1023(A) (unit:1A)
  721. unsigned char EvseDetection; //109.5
  722. // bit0=0:not charging state now
  723. // bit0=1:charging state now
  724. // bit1=0:EVSE normal
  725. // bit1=1:EVSE error
  726. // bit2=0:Not Energizing state
  727. // bit2=1:Energizing state
  728. // bit3=0:No Battery incompatibility
  729. // bit3=1:Battery incompatibility
  730. // bit4=0:No Charging system error
  731. // bit4=1:Charging system error
  732. // bit5=0:No Charging stop control
  733. // bit5=1:Charging stop control
  734. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  735. // Set 0xFF to 109.6 (Unit: 10sec) in case 109.7 (Unit: 1min) is used
  736. unsigned char HighPowerCondition; //118.5
  737. // bit0=0:Present charging current H¡¦118.3,H¡¦118.4¡¨ is less than or equal to rated current of a charging cable
  738. // bit0=1:Present charging current H¡¦118.3,H¡¦118.4¡¨ is exceeds to rated current of a charging cable
  739. // bit1=1:charging cable Cooling function Operating Installed
  740. // bit2=1:charging cable Current limiting function
  741. // bit3=1:charging connector Cooling function Operating
  742. // bit4=1:charging connector Current limiting function Installed
  743. // bit5=1:charging connector Over-temperature protection Installed
  744. // bit6=1:Functional safety Applied
  745. unsigned int MaxiGroupPower; // XXXXXXXX (Unit:Watt)depend on which group to be used
  746. unsigned int MaxiGroupCurrent; // XXXXXXXX (unit:1A)depend on which group to be used
  747. unsigned short ApplyOutputVoltage; // 0~600(V) (unit:1V)
  748. unsigned short ElapseChargingTime; // (Unit:sec)
  749. unsigned short ElapseEnergy; // (Unit:10xkWh)
  750. };
  751. struct CHAdeMOData
  752. {
  753. struct CHAdeMOEvData ev[CHAdeMO_QUANTITY];
  754. struct CHAdeMOEvseData evse[CHAdeMO_QUANTITY];
  755. };
  756. /************************************************************************************/
  757. /**************************CCS protocol Share memory***************************/
  758. /**************************DIN70121: 201412***************************************/
  759. /**************************ISO15118_2014: 2014************************************/
  760. /**************************ISO15118_2018: 2018************************************/
  761. /************************************************************************************/
  762. typedef enum boolean { FALSE, TRUE } BOOL;
  763. enum ResponseCodeType_DIN70121 { OK_DIN70121 = 0, OK_NewSessionEstablished_DIN70121 = 1, OK_OldSessionJoined_DIN70121 = 2, OK_CertificateExpiresSoon_DIN70121 = 3,
  764. FAILED_DIN70121 = 4, FAILED_SequenceError_DIN70121 = 5, FAILED_ServiceIDInvalid_DIN70121 = 6, FAILED_UnknownSession_DIN70121 = 7,
  765. FAILED_ServiceSelectionInvalid_DIN70121 = 8, FAILED_PaymentSelectionInvalid_DIN70121 = 9, FAILED_CertificateExpired_DIN70121 = 10,
  766. FAILED_SignatureError_DIN70121 = 11, FAILED_NoCertificateAvailable_DIN70121 = 12, FAILED_CertChainError_DIN70121 = 13, FAILED_ChallengeInvalid_DIN70121 = 14,
  767. FAILED_ContractCanceled_DIN70121 = 15, FAILED_WrongChargeParameter_DIN70121 = 16, FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  768. FAILED_TariffSelectionInvalid_DIN70121 = 18, FAILED_ChargingProfileInvalid_DIN70121 = 19, FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  769. FAILED_MeteringSignatureNotValid_DIN70121 = 21, FAILED_WrongEnergyTransferType_DIN70121 = 22};
  770. enum ResponseCodeType_ISO15118_2014 { OK_ISO15118_2014 = 0, OK_NewSessionEstablished_ISO15118_2014 = 1, OK_OldSessionJoined_ISO15118_2014 = 2, OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  771. FAILED_ISO15118_2014 = 4, FAILED_SequenceError_ISO15118_2014 = 5, FAILED_ServiceIDInvalid_ISO15118_2014 = 6, FAILED_UnknownSession_ISO15118_2014 = 7,
  772. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8, FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9, FAILED_CertificateExpired_ISO15118_2014 = 10,
  773. FAILED_SignatureError_ISO15118_2014 = 11, FAILED_NoCertificateAvailable_ISO15118_2014 = 12, FAILED_CertChainError_ISO15118_2014 = 13, FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  774. FAILED_ContractCanceled_ISO15118_2014 = 15, FAILED_WrongChargeParameter_ISO15118_2014 = 16, FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  775. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18, FAILED_ChargingProfileInvalid_ISO15118_2014 = 19, FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  776. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21, FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22, FAILED_ContactorError_ISO15118_2014 = 23,
  777. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24, FAILED_CertificateRevoked_ISO15118_2014 = 25 };
  778. enum ResponseCodeType_ISO15118_2018 { OK_ISO15118_2018 = 0, OK_NewSessionEstablished_ISO15118_2018 = 1, OK_OldSessionJoined_ISO15118_2018 = 2, OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  779. OK_IsolationValid_ISO15118_2018 = 4, OK_IsolationWarning_ISO15118_2018 = 5, WARNING_CertificateExpired_ISO15118_2018 = 6, WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  780. WARNING_CertValidationError_ISO15118_2018 = 8, WARNING_CertVerificationError_ISO15118_2018 = 9, WARNING_ContractCanceled_ISO15118_2018 = 10,
  781. FAILED_ISO15118_2018 = 11, FAILED_SequenceError_ISO15118_2018 = 12, FAILED_ServiceIDInvalid_ISO15118_2018 = 13, FAILED_UnknownSession_ISO15118_2018 = 14,
  782. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15, FAILED_SignatureError_ISO15118_2018 = 16, FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  783. FAILED_ChallengeInvalid_ISO15118_2018 = 18, FAILED_WrongChargeParameter_ISO15118_2018 = 19, FAILED_IsolationFault_ISO15118_2018 = 20,
  784. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21, FAILED_TariffSelectionInvalid_ISO15118_2018 = 22, FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  785. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24, FAILED_NoChargeServiceSelected_ISO15118_2018 = 25, FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  786. FAILED_ContactorError_ISO15118_2018 = 27, FAILED_CertificateRevoked_ISO15118_2018 = 28, FAILED_CertificateNotYetValid_ISO15118_2018 = 29 };
  787. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  788. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  789. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  790. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  791. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  792. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  793. enum EnergyTransferModeType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  794. DC_combo_core = 4, DC_unique = 5};
  795. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  796. enum unitSymbolType_DIN70121 { h_DIN70121 = 0, m_DIN70121 = 1, s_DIN70121 = 2, A_DIN70121 = 3, Ah_DIN70121 = 4, V_DIN70121 = 5, VA_DIN70121 = 6, W_DIN70121 = 7, Ws_DIN70121 = 8, Wh_DIN70121 = 9};
  797. enum unitSymbolType_ISO15118_2014 { h_ISO15118_2014 = 0, m_ISO15118_2014 = 1, s_ISO15118_2014 = 2, A_ISO15118_2014 = 3, V_ISO15118_2014 = 4, W_ISO15118_2014 = 5, Wh_ISO15118_2014 = 6};
  798. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  799. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  800. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  801. enum DC_EVErrorCodeType { NO_ERROR = 0, FAILED_RESSTemperatureInhibit = 1, FAILED_EVShiftPosition = 2, FAILED_ChargerConnectorLockFault = 3,
  802. FAILED_EVRESSMalfunction = 4, FAILED_ChargingCurrentdifferential = 5, FAILED_ChargingVoltageOutOfRange = 6,
  803. Reserved_A = 7, Reserved_B = 8, Reserved_C = 9, FAILED_ChargingSystemIncompatibility = 10, NoData = 11};
  804. enum IsolationLevelType_DIN70121 { Invalid_DIN70121 = 0, Valid_DIN70121 = 1, Warning_DIN70121 = 2, Fault_DIN70121 = 3};
  805. enum IsolationLevelType_ISO15118_2014 { Invalid_ISO15118_2014 = 0, Valid_ISO15118_2014 = 1, Warning_ISO15118_2014 = 2, Fault_ISO15118_2014 = 3, No_IMD_ISO15118_2014 = 4};
  806. enum DC_EVSEStatusCodeType { EVSE_NotReady = 0, EVSE_Ready = 1, EVSE_Shutdown = 2, EVSE_UtilityInterruptEvent = 3,
  807. EVSE_IsolationMonitoringActive = 4, EVSE_EmergencyShutdown = 5, EVSE_Malfunction = 6,
  808. Reserved_8 = 7, Reserved_9 = 8};
  809. enum ScheduleOriginType { EV = 0, SA = 1};
  810. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  811. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  812. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  813. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  814. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  815. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  816. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  817. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  818. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  819. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  820. enum ChargingSessionType { Terminate = 0, Pause = 1};
  821. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  822. struct PhysicalValueType_DIN70121 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  823. {
  824. int Multiplier; //range: -3..+3
  825. enum unitSymbolType_DIN70121 Unit;
  826. short Value;
  827. };
  828. struct PhysicalValueType_ISO15118_2014 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  829. {
  830. int Multiplier; //range: -3..+3
  831. enum unitSymbolType_ISO15118_2014 Unit;
  832. short Value;
  833. };
  834. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  835. {
  836. int Exponent; //range: -3..+3
  837. short Value;
  838. };
  839. struct AppProtocolType
  840. {
  841. unsigned char ProtocolNamespace[100];
  842. unsigned int VersionNumberMajor;
  843. unsigned int VersionNumberMinor;
  844. unsigned char SchemaID;
  845. unsigned char Priority; //range 1..20
  846. };
  847. struct ACD_SSEnergyTransferModeType
  848. {
  849. unsigned char EVID[20];
  850. };
  851. struct EVSEStatusType
  852. {
  853. unsigned short NotificationMaxDelay; //in seconds
  854. enum EVSENotificationType EVSENotification;
  855. };
  856. struct ServiceIDListType
  857. {
  858. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  859. };
  860. struct PaymentOptionListType
  861. {
  862. enum PaymentOptionType PaymentOption[2];
  863. };
  864. struct ServiceTagType
  865. {
  866. unsigned short ServiceID;
  867. unsigned char ServiceName[32];//Optional Element
  868. enum ServiceCategoryType ServiceCategory;
  869. unsigned char ServiceScope[32];//Optional Element
  870. };
  871. struct ServiceType_DIN70121
  872. {
  873. struct ServiceTagType ServiceTag;
  874. BOOL FreeService;
  875. };
  876. struct ServiceType_ISO15118_2014
  877. {
  878. unsigned short ServiceID;
  879. unsigned char ServiceName[32]; //Optional
  880. enum ServiceCategoryType ServiceCategory;
  881. unsigned char ServiceScope[64]; //Optional
  882. BOOL FreeService;
  883. };
  884. /*struct ServiceType_ISO15118_2018
  885. {
  886. unsigned short ServiceID;
  887. BOOL FreeService;
  888. }; */
  889. struct SupportedEnergyTransferModeType
  890. {
  891. enum EnergyTransferModeType EnergyTransferMode[6];
  892. };
  893. struct ServiceChargeType
  894. {
  895. struct ServiceType_DIN70121 Services;
  896. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  897. enum EnergyTransferModeType EnergyTransferType;
  898. };
  899. struct ChargeServiceType
  900. {
  901. struct ServiceType_ISO15118_2014 Services;
  902. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  903. };
  904. struct ServiceListType
  905. {
  906. struct ServiceType_ISO15118_2014 Service[8];
  907. };
  908. struct IdentificationOptionListType
  909. {
  910. enum PaymentOptionType IdentificationOption[2];
  911. };
  912. struct ParameterType
  913. {
  914. unsigned char Name[32];
  915. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  916. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  917. };
  918. struct ParameterSetType
  919. {
  920. short ParameterSetID;
  921. struct ParameterType Parameter[16];
  922. };
  923. struct ServiceParameterListType
  924. {
  925. struct ParameterSetType ParameterSet[255];
  926. };
  927. struct WPT_SDlEnergyTransferModeType
  928. {
  929. struct ServiceParameterListType ServiceParameterList;
  930. };
  931. struct SelectedServiceType
  932. {
  933. unsigned short ServiceID;
  934. short ParameterSetID;
  935. };
  936. struct SelectedServiceListType
  937. {
  938. struct SelectedServiceType SelectedService[16];
  939. };
  940. struct CertificateChainType
  941. {
  942. unsigned char Id[32]; //Optional
  943. unsigned char Certificate[800]; //check size again
  944. unsigned char SubCertificates[4][800]; //Optional, check size again
  945. };
  946. struct PNC_AReqIdentificationModeType
  947. {
  948. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  949. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  950. };
  951. struct AC_EVChargeParameterType
  952. {
  953. unsigned int DepartureTime; //Optional
  954. struct PhysicalValueType_ISO15118_2014 EAmount;
  955. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  956. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  957. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  958. };
  959. struct DC_EVStatusType_DIN70121
  960. {
  961. BOOL EVReady;
  962. BOOL EVCabinConditioning;
  963. BOOL EVRESSConiditioning;
  964. enum DC_EVErrorCodeType EVErrorCode;
  965. unsigned char EVRESSSOC; /*0-100 percentage*/
  966. };
  967. struct DC_EVChargeParameterType_DIN70121
  968. {
  969. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  970. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  971. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  972. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  973. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  974. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  975. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  976. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  977. };
  978. struct DC_EVStatusType_ISO15118_2014
  979. {
  980. BOOL EVReady;
  981. enum DC_EVErrorCodeType EVErrorCode;
  982. unsigned char EVRESSSOC; /*0-100 percentage*/
  983. };
  984. struct DC_EVChargeParameterType_ISO15118_2014
  985. {
  986. unsigned int DepartureTime; //Optional
  987. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  988. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  989. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  990. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  991. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  992. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  993. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  994. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  995. };
  996. struct Dynamic_CPDReqControlModeType
  997. {
  998. unsigned int DepartureTime;
  999. };
  1000. struct RelativeTimeIntervalType
  1001. {
  1002. unsigned int duration; //Optional
  1003. unsigned int start;
  1004. };
  1005. struct PMaxScheduleEntryType
  1006. {
  1007. struct RelativeTimeIntervalType RelativeTimeInterval;
  1008. unsigned short PMax;
  1009. };
  1010. struct PMaxScheduleType
  1011. {
  1012. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  1013. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  1014. };
  1015. struct CostType
  1016. {
  1017. unsigned int amount;
  1018. enum CostKindType costKind;
  1019. int amountMultiplier; //Optional , range: -3..+3
  1020. };
  1021. struct ConsumptionCostType
  1022. {
  1023. struct CostType Cost[3];
  1024. struct PhysicalValueType_ISO15118_2014 startValue;
  1025. };
  1026. struct SalesTariffEntryType
  1027. {
  1028. struct RelativeTimeIntervalType RelativeTimeInterval;
  1029. unsigned char EPriceLevel; //Optional
  1030. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  1031. };
  1032. struct SalesTariffType
  1033. {
  1034. unsigned char Id[32]; //Optional
  1035. short SalesTariffID;
  1036. unsigned char SalesTariffDescription[32]; //Optional
  1037. unsigned char NumEPriceLevels; //Optional
  1038. struct SalesTariffEntryType SalesTariffEntry[1024];
  1039. };
  1040. struct SAScheduleTupleType
  1041. {
  1042. short SAScheduleTupleID;
  1043. struct PMaxScheduleType PMaxSchedule;
  1044. struct SalesTariffType SalesTariff; //Optional
  1045. };
  1046. struct ScheduleListType
  1047. {
  1048. enum ScheduleOriginType ScheduleOrigin;
  1049. struct SAScheduleTupleType ScheduleTuple[3];
  1050. };
  1051. struct Scheduled_CPDReqControlModeType
  1052. {
  1053. enum ProcessingType EVProcessing;
  1054. unsigned int DepartureTime; //Optional
  1055. unsigned short MaxSupportingPoints;
  1056. struct ScheduleListType ScheduleList; //Optional
  1057. };
  1058. struct AC_CPDReqEnergyTransferModeType
  1059. {
  1060. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1061. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1062. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1063. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1064. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1065. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1066. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1067. };
  1068. struct DC_CPDReqEnergyTransferModeType
  1069. {
  1070. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  1071. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  1072. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1073. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1074. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1075. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1076. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1077. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1078. unsigned char TargetSOC; //Optional
  1079. unsigned char BulkSOC; //Optional
  1080. };
  1081. struct BPT_AC_CPDReqEnergyTransferModeType
  1082. {
  1083. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1084. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  1085. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  1086. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1087. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  1088. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1089. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  1090. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1091. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1092. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1093. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1094. };
  1095. struct BPT_DC_CPDReqEnergyTransferModeType
  1096. {
  1097. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1098. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  1099. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  1100. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  1101. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1102. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1103. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  1104. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  1105. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  1106. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  1107. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  1108. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  1109. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  1110. unsigned char TargetSOC; //Optional
  1111. unsigned char BulkSOC; //Optional
  1112. };
  1113. struct WPT_CPDReqEnergyTransferModeType
  1114. {
  1115. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  1116. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  1117. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1118. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1119. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1120. };
  1121. struct ACD_CPDReqEnergyTransferModeType
  1122. {
  1123. //cannot be found in standard
  1124. };
  1125. struct SAScheduleListType
  1126. {
  1127. struct SAScheduleTupleType SAScheduleTuple[3];
  1128. };
  1129. struct DC_EVSEStatusType_DIN70121
  1130. {
  1131. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  1132. enum DC_EVSEStatusCodeType EVSEStatusCode;
  1133. unsigned int NotificationMaxDelay;
  1134. enum EVSENotificationType EVSENotification;
  1135. };
  1136. struct DC_EVSEChargeParameterType_DIN70121
  1137. {
  1138. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1139. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  1140. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  1141. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  1142. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  1143. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  1144. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  1145. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  1146. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  1147. };
  1148. struct AC_EVSEStatusType
  1149. {
  1150. BOOL RCD;
  1151. unsigned short NotificationMaxDelay;
  1152. enum EVSENotificationType EVSENotification; //need to be confirmed
  1153. };
  1154. struct AC_EVSEChargeParameterType
  1155. {
  1156. struct AC_EVSEStatusType AC_EVSEStatus;
  1157. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  1158. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  1159. };
  1160. struct DC_EVSEStatusType_ISO15118_2014
  1161. {
  1162. unsigned short NotificationMaxDelay;
  1163. enum EVSENotificationType EVSENotification;
  1164. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  1165. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  1166. };
  1167. struct DC_EVSEChargeParameterType_ISO15118_2014
  1168. {
  1169. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1170. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  1171. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  1172. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  1173. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  1174. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  1175. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  1176. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  1177. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  1178. };
  1179. struct Scheduled_CPDResControlModeType
  1180. {
  1181. struct ScheduleListType ScheduleList;
  1182. };
  1183. struct AC_CPDResEnergyTransferModeType
  1184. {
  1185. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1186. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1187. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1188. };
  1189. struct DC_CPDResEnergyTransferModeType
  1190. {
  1191. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1192. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1193. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1194. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1195. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1196. };
  1197. struct BPT_AC_CPDResEnergyTransferModeType
  1198. {
  1199. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  1200. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  1201. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  1202. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  1203. };
  1204. struct BPT_DC_CPDResEnergyTransferModeType
  1205. {
  1206. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  1207. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  1208. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  1209. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  1210. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  1211. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  1212. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  1213. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  1214. };
  1215. struct WPT_CPDResEnergyTransferModeType
  1216. {
  1217. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  1218. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  1219. };
  1220. struct ACD_CPDResEnergyTransferModeType
  1221. {
  1222. //not found in ISO15118_2018
  1223. };
  1224. struct ProfileEntryType_DIN70121
  1225. {
  1226. unsigned int ChargingProfileEntryStart;
  1227. short ChargingProfileEntryMaxPower;
  1228. };
  1229. struct ChargingProfileType_DIN70121
  1230. {
  1231. short SAScheduleTupleID;
  1232. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  1233. };
  1234. struct DC_EVPowerDeliveryParameterType_DIN70121
  1235. {
  1236. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1237. BOOL BulkChargingComplete; //Optional
  1238. BOOL ChargingComplete;
  1239. };
  1240. struct ProfileEntryType_ISO15118_2014
  1241. {
  1242. unsigned int ChargingProfileEntryStart;
  1243. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  1244. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  1245. };
  1246. struct ChargingProfileType_ISO15118_2014
  1247. {
  1248. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  1249. };
  1250. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  1251. {
  1252. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1253. BOOL BulkChargingComplete; //Optional
  1254. BOOL ChargingComplete;
  1255. };
  1256. struct TimeInterval
  1257. {
  1258. unsigned int start;
  1259. unsigned int duration; //Optional
  1260. };
  1261. struct PowerScheduleEntryType
  1262. {
  1263. struct TimeInterval TimeInterval;
  1264. struct PhysicalValueType_ISO15118_2018 Power[3];
  1265. };
  1266. struct EVPowerProfileType
  1267. {
  1268. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  1269. };
  1270. struct Scheduled_PDReqControlModeType
  1271. {
  1272. unsigned char ScheduleTupleID;
  1273. struct EVPowerProfileType EVPowerProfile;
  1274. };
  1275. struct BPT_Scheduled_PDReqControlModeType
  1276. {
  1277. unsigned char ScheduleTupleID;
  1278. struct EVPowerProfileType EVPowerProfile; //Optional
  1279. enum evOperationType EVOperation;
  1280. };
  1281. struct ListOfRootCertificateIDsType
  1282. {
  1283. unsigned char RootCertificateID[20][40];
  1284. };
  1285. struct ContractSignatureEncryptedPrivateKeyType
  1286. {
  1287. unsigned char Id[32];
  1288. };
  1289. struct DiffieHellmanPublickeyType
  1290. {
  1291. unsigned char Id[32];
  1292. };
  1293. struct ContractCertificateEncryptedPrivateKeyType
  1294. {
  1295. unsigned char Id[32];
  1296. };
  1297. struct EVTechnicalStatusType
  1298. {
  1299. BOOL EV_Status_ReadyToCharge;
  1300. BOOL EV_Status_ImmobilizationRequest; //Optional
  1301. BOOL EV_Status_Immobilized;
  1302. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  1303. enum EV_CP_StatusType EV_CP_Status;
  1304. unsigned char EV_Status_RESSSOC; //0~100%
  1305. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  1306. BOOL EVSE_Timeout;
  1307. };
  1308. struct MeterInfoType_ISO15118_2014
  1309. {
  1310. unsigned char MeterID[32];
  1311. unsigned long MeterReading; //Optional
  1312. unsigned char SigMeterReading[64]; //Optional
  1313. short MeterStatus; //Optional
  1314. short TMeter; //Optional
  1315. };
  1316. struct Scheduled_MRReqControlModeType
  1317. {
  1318. unsigned char ScheduleTupleID;
  1319. };
  1320. struct MeterInfoType_ISO15118_2018
  1321. {
  1322. unsigned char MeterID[32];
  1323. unsigned long MeterReadingWhCharged; //Optional
  1324. unsigned long MeterReadingWhDischarged; //Optional
  1325. unsigned long MeterReadingVARhLeading; //Optional
  1326. unsigned long MeterReadingVARhLagging; //Optional
  1327. unsigned char SignatureMeterReading[64]; //Optional
  1328. short MeterStatus; //Optional
  1329. short TimeStampMeter; //Optional
  1330. BOOL ReceiptRequired; //Optional
  1331. };
  1332. struct PnC_CLReqIdentificationModeType
  1333. {
  1334. BOOL MeteringReceiptRequested;
  1335. };
  1336. struct Dynamic_CSReqControlModeType
  1337. {
  1338. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  1339. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  1340. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  1341. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  1342. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  1343. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  1344. };
  1345. struct Scheduled_CSReqControlModeType
  1346. {
  1347. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  1348. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  1349. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  1350. BOOL Standby;
  1351. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  1352. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  1353. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  1354. };
  1355. struct DisplayParametersType
  1356. {
  1357. unsigned short CurrentRange;
  1358. unsigned char CurrentSOC; //0~100%
  1359. unsigned char MinimumSOC; //0~100%
  1360. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  1361. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  1362. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  1363. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  1364. BOOL ChargingComplete;
  1365. BOOL BulkChargingComplete;
  1366. BOOL InletHot;
  1367. };
  1368. struct PnC_CLResIdentificationModeType
  1369. {
  1370. struct MeterInfoType_ISO15118_2018 MeterInfo;
  1371. };
  1372. struct Dynamic_CSResControlModeType
  1373. {
  1374. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  1375. };
  1376. struct Scheduled_CDResControlModeType
  1377. {
  1378. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  1379. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  1380. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  1381. };
  1382. struct LFA_EVFinePositioningSetupParametersType
  1383. {
  1384. unsigned char NumberOfSensors;
  1385. //NOT complete yet, to be continue.....
  1386. };
  1387. /****SupportedAppProtocolRequest****/
  1388. struct SupportedAppProtocolRequest_DIN70121
  1389. {
  1390. struct AppProtocolType AppProtocol[20];
  1391. };
  1392. struct SupportedAppProtocolRequest_ISO15118_2014
  1393. {
  1394. struct AppProtocolType AppProtocol[20];
  1395. };
  1396. struct SupportedAppProtocolRequest_ISO15118_2018
  1397. {
  1398. struct AppProtocolType AppProtocol[20];
  1399. };
  1400. /****SupportedAppProtocolResponse****/
  1401. struct SupportedAppProtocolResponse_DIN70121
  1402. {
  1403. enum ResponseCodeType_DIN70121 ResponseCode;
  1404. unsigned char SchemaID; //Optional
  1405. };
  1406. struct SupportedAppProtocolResponse_ISO15118_2014
  1407. {
  1408. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1409. unsigned char SchemaID; //Optional
  1410. };
  1411. struct SupportedAppProtocolResponse_ISO15118_2018
  1412. {
  1413. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1414. unsigned char SchemaID; //Optional
  1415. };
  1416. /****SessionSetupRequest****/
  1417. struct SessionSetupRequest_DIN70121
  1418. {
  1419. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1420. };
  1421. struct SessionSetupRequest_ISO15118_2014
  1422. {
  1423. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1424. };
  1425. struct SessionSetupRequest_ISO15118_2018
  1426. {
  1427. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  1428. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  1429. };
  1430. /****SessionSetupResponse****/
  1431. struct SessionSetupResponse_DIN70121
  1432. {
  1433. enum ResponseCodeType_DIN70121 ResponseCode;
  1434. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1435. unsigned int EVSETimeStamp; //EPOCH format, Optional
  1436. };
  1437. struct SessionSetupResponse_ISO15118_2014
  1438. {
  1439. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1440. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1441. unsigned int EVSETimeStamp; //EPOCH format, Optional
  1442. };
  1443. struct SessionSetupResponse_ISO15118_2018
  1444. {
  1445. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1446. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1447. struct EVSEStatusType EVSEStatus; //Optional
  1448. };
  1449. /****ServiceDiscoveryRequest****/
  1450. struct ServiceDiscoveryRequest_DIN70121
  1451. {
  1452. unsigned char ServiceScope[32]; //Optional
  1453. enum ServiceCategoryType ServiceCategory; //Optional
  1454. };
  1455. struct ServiceDiscoveryRequest_ISO15118_2014
  1456. {
  1457. unsigned char ServiceScope[32]; //Optional
  1458. enum ServiceCategoryType ServiceCategory; //Optional
  1459. };
  1460. struct ServiceDiscoveryRequest_ISO15118_2018
  1461. {
  1462. struct ServiceIDListType SupportedServiceIDs; //Optional
  1463. };
  1464. /****ServiceDiscoveryResponse****/
  1465. struct ServiceDiscoveryResponse_DIN70121
  1466. {
  1467. enum ResponseCodeType_DIN70121 ResponseCode;
  1468. struct PaymentOptionListType PaymentOptions;
  1469. struct ServiceChargeType ChargeService_DIN70121;
  1470. };
  1471. struct ServiceDiscoveryResponse_ISO15118_2014
  1472. {
  1473. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1474. struct PaymentOptionListType PaymentOptions;
  1475. struct ChargeServiceType ChargeService;
  1476. struct ServiceListType ServiceList; //Optional
  1477. };
  1478. struct ServiceDiscoveryResponse_ISO15118_2018
  1479. {
  1480. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1481. struct EVSEStatusType EVSEStatus; //Optional
  1482. struct IdentificationOptionListType IdentificationOptionList;
  1483. struct ServiceListType EnergyTransferServiceList;
  1484. struct ServiceListType VASList; //Optional
  1485. };
  1486. /****ServiceDetailRequest****/
  1487. //Only in ISO15118_2014 and ISO15118_2018
  1488. struct ServiceDetailRequest_ISO15118_2014
  1489. {
  1490. unsigned short ServiceID;
  1491. };
  1492. struct ServiceDetailRequest_ISO15118_2018
  1493. {
  1494. unsigned short ServiceID;
  1495. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  1496. };
  1497. /****ServiceDetailResponse****/
  1498. struct ServiceDetailResponse_ISO15118_2014
  1499. {
  1500. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1501. unsigned short ServiceID;
  1502. struct ServiceParameterListType ServiceParameterList;
  1503. };
  1504. struct ServiceDetailResponse_ISO15118_2018
  1505. {
  1506. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1507. unsigned short ServiceID;
  1508. struct ServiceParameterListType ServiceParameterList;
  1509. struct EVSEStatusType EVSEStatus; //Optional
  1510. };
  1511. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  1512. struct ServiceAndPaymentSelectionRequest_DIN70121
  1513. {
  1514. enum PaymentOptionType SelectedPaymentOption;
  1515. struct SelectedServiceListType SelectedServiceList;
  1516. };
  1517. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  1518. {
  1519. enum PaymentOptionType SelectedPaymentOption;
  1520. struct SelectedServiceListType SelectedServiceList;
  1521. };
  1522. struct ServiceSelectionRequest_ISO15118_2018
  1523. {
  1524. enum PaymentOptionType SelectedPaymentOption;
  1525. struct SelectedServiceType SelectedEnergyTransferService;
  1526. struct SelectedServiceListType SelectedVASList;
  1527. enum ProcessingType EVProcessing;
  1528. };
  1529. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  1530. struct ServiceAndPaymentSelectionResponse_DIN70121
  1531. {
  1532. enum ResponseCodeType_DIN70121 ResponseCode;
  1533. };
  1534. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  1535. {
  1536. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1537. };
  1538. struct ServiceSelectionResponse_ISO15118_2018
  1539. {
  1540. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1541. struct EVSEStatusType EVSEStatus; //Optional
  1542. };
  1543. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  1544. struct PaymentDetailsRequest_ISO15118_2014
  1545. {
  1546. unsigned char eMAID[16];
  1547. struct CertificateChainType ContractSignatureCertChain;
  1548. };
  1549. struct IdentificationDetailsRequest_ISO15118_2018
  1550. {
  1551. struct CertificateChainType ContractSignatureCertChain;
  1552. };
  1553. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  1554. struct PaymentDetailsResponse_ISO15118_2014
  1555. {
  1556. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1557. unsigned char GenChallenge[16];
  1558. long EVSETimeStamp;
  1559. };
  1560. struct IdentificationDetailsResponse_ISO15118_2018
  1561. {
  1562. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1563. struct EVSEStatusType EVSEStatus; //Optional
  1564. unsigned char GenChallenge[16];
  1565. enum ProcessingType EVSEProcessing;
  1566. };
  1567. /****ContractAuthenticationRequest / AuthorizationRequest****/
  1568. struct ContractAuthenticationRequest_DIN70121
  1569. {
  1570. //None
  1571. };
  1572. struct AuthorizationRequest_ISO15118_2014
  1573. {
  1574. unsigned char GenChallenge[16]; //Optional
  1575. unsigned char Id[32]; //Optional
  1576. };
  1577. struct AuthorizationRequest_ISO15118_2018
  1578. {
  1579. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  1580. };
  1581. /****ContractAuthenticationResponse / AuthorizationResponse****/
  1582. struct ContractAuthenticationResponse_DIN70121
  1583. {
  1584. enum ResponseCodeType_DIN70121 ResponseCode;
  1585. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1586. };
  1587. struct AuthorizationResponse_ISO15118_2014
  1588. {
  1589. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1590. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1591. };
  1592. struct AuthorizationResponse_ISO15118_2018
  1593. {
  1594. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1595. enum ProcessingType EVSEProcessing;
  1596. struct EVSEStatusType EVSEStatus; //Optional
  1597. };
  1598. /****ChargeParameterDiscoveryRequest****/
  1599. struct ChargeParameterDiscoveryRequest_DIN70121
  1600. {
  1601. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  1602. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  1603. };
  1604. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  1605. {
  1606. unsigned short MaxEntriesSAScheduleTuple; //Optional
  1607. enum EnergyTransferModeType RequestedEnergyTransferMode;
  1608. struct AC_EVChargeParameterType AC_EVChargeParameter;
  1609. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  1610. };
  1611. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  1612. {
  1613. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  1614. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  1615. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  1616. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  1617. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  1618. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  1619. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  1620. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  1621. };
  1622. /****ChargeParameterDiscoveryResponse****/
  1623. struct ChargeParameterDiscoveryResponse_DIN70121
  1624. {
  1625. enum ResponseCodeType_DIN70121 ResponseCode;
  1626. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1627. struct SAScheduleListType SAScheduleList;
  1628. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  1629. };
  1630. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  1631. {
  1632. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1633. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1634. struct SAScheduleListType SAScheduleList;
  1635. struct AC_EVSEChargeParameterType AC_EVSEChargeParameter;
  1636. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  1637. };
  1638. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  1639. {
  1640. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1641. struct EVSEStatusType EVSEStatus; //Optional
  1642. enum ProcessingType EVSEProcessing;
  1643. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  1644. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  1645. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  1646. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  1647. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  1648. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  1649. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  1650. };
  1651. /****PowerDeliveryRequest****/
  1652. struct PowerDeliveryRequest_DIN70121
  1653. {
  1654. BOOL ReadyToChargeState;
  1655. struct ChargingProfileType_DIN70121 ChargingProfile;
  1656. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  1657. };
  1658. struct PowerDeliveryRequest_ISO15118_2014
  1659. {
  1660. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  1661. short SAScheduleTupleID;
  1662. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  1663. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  1664. };
  1665. struct PowerDeliveryRequest_ISO15118_2018
  1666. {
  1667. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  1668. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  1669. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  1670. };
  1671. /****PowerDeliveryResponse****/
  1672. struct PowerDeliveryResponse_DIN70121
  1673. {
  1674. enum ResponseCodeType_DIN70121 ResponseCode;
  1675. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1676. };
  1677. struct PowerDeliveryResponse_ISO15118_2014
  1678. {
  1679. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1680. struct AC_EVSEStatusType AC_EVSEStatus;
  1681. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1682. };
  1683. struct PowerDeliveryResponse_ISO15118_2018
  1684. {
  1685. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1686. struct EVSEStatusType EVSEStatus; //Optional
  1687. };
  1688. /****CertificateUpdateRequest****/
  1689. struct CertificateUpdateRequest_ISO15118_2014
  1690. {
  1691. unsigned char Id[32];
  1692. struct CertificateChainType ContractSignatureCertChain;
  1693. unsigned char eMAID[16];
  1694. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1695. };
  1696. /****CertificateUpdateResponse****/
  1697. struct CertificateUpdateResponse_ISO15118_2014
  1698. {
  1699. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1700. struct CertificateChainType SAProvisioningCertificateChain;
  1701. struct CertificateChainType ContractSignatureCertChain;
  1702. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  1703. struct DiffieHellmanPublickeyType DHpublickey;
  1704. unsigned char eMAID[16];
  1705. short RetryCounter; //Optional
  1706. };
  1707. /****CertificateInstallationRequest****/
  1708. struct CertificateInstallationRequest_ISO15118_2014
  1709. {
  1710. unsigned char Id[32];
  1711. unsigned char OEMProvisioningCert[800];
  1712. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1713. };
  1714. struct CertificateInstallationRequest_ISO15118_2018
  1715. {
  1716. unsigned char Id[32];
  1717. struct CertificateChainType OEMProvisioningCertChain;
  1718. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  1719. unsigned short MaxSupportedCerts;
  1720. };
  1721. /****CertificateInstallationResponse****/
  1722. struct CertificateInstallationResponse_ISO15118_2014
  1723. {
  1724. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1725. struct CertificateChainType SAProvisioningCertificateChain;
  1726. struct CertificateChainType ContractSignatureCertChain;
  1727. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  1728. struct DiffieHellmanPublickeyType DHpublickey;
  1729. unsigned char eMAID[16];
  1730. };
  1731. struct CertificateInstallationResponse_ISO15118_2018
  1732. {
  1733. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1734. struct EVSEStatusType EVSEStatus; //Optional
  1735. struct CertificateChainType SAProvisioningCertificateChain;
  1736. struct CertificateChainType ContractCertificateChain;
  1737. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  1738. struct DiffieHellmanPublickeyType DHpublickey;
  1739. enum ProcessingType EVSEProcessing;
  1740. unsigned short RemainingContractCertificateChains;
  1741. };
  1742. /****SystemStatusRequest****/
  1743. struct SystemStatusRequest_ISO15118_2018
  1744. {
  1745. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  1746. struct EVTechnicalStatusType EVTechnicalStatus;
  1747. unsigned char EV_OEMStatus[800]; //Optional
  1748. };
  1749. /****SystemStatusResponse****/
  1750. struct SystemStatusResponse_ISO15118_2018
  1751. {
  1752. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1753. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  1754. BOOL EVSE_ReadyToCharge;
  1755. enum IsolationStatusType EVSE_IsolationStatus;
  1756. BOOL EVSE_Disabled;
  1757. BOOL EVSE_UtilityInterruptEvent;
  1758. BOOL EVSE_EmergencyShutdown;
  1759. BOOL EVSE_Malfunction;
  1760. BOOL EV_InChargePosition;
  1761. BOOL EV_AssociationStatus;
  1762. };
  1763. /****SessionStopRequest****/
  1764. struct SessionStopRequest_DIN70121
  1765. {
  1766. //No member in standard
  1767. };
  1768. struct SessionStopRequest_ISO15118_2014
  1769. {
  1770. enum ChargingSessionType ChargingSession;
  1771. };
  1772. struct SessionStopRequest_ISO15118_2018
  1773. {
  1774. enum ChargingSessionType ChargingSession;
  1775. };
  1776. /****SessionStopResponse****/
  1777. struct SessionStopResponse_DIN70121
  1778. {
  1779. enum ResponseCodeType_DIN70121 ResponseCode;
  1780. };
  1781. struct SessionStopResponse_ISO15118_2014
  1782. {
  1783. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1784. };
  1785. struct SessionStopResponse_ISO15118_2018
  1786. {
  1787. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1788. struct EVSEStatusType EVSEStatus; //Optional
  1789. };
  1790. /****MeteringReceiptRequest****/
  1791. struct MeteringReceiptRequest_ISO15118_2014
  1792. {
  1793. unsigned char Id[32]; //Optional
  1794. unsigned char SessionID[8];
  1795. short SAScheduleTupleID; //Optional
  1796. struct MeterInfoType_ISO15118_2014 MeterInfo;
  1797. };
  1798. struct MeteringReceiptRequest_ISO15118_2018
  1799. {
  1800. unsigned char Id[32]; //Optional
  1801. unsigned char SessionID[8];
  1802. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  1803. struct MeterInfoType_ISO15118_2018 MeterInfo;
  1804. };
  1805. /****MeteringReceiptResponse****/
  1806. struct MeteringReceiptResponse_ISO15118_2014
  1807. {
  1808. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1809. struct AC_EVSEStatusType AC_EVSEStatus;
  1810. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1811. };
  1812. struct MeteringReceiptResponse_ISO15118_2018
  1813. {
  1814. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1815. struct EVSEStatusType EVSEStatus; //Optional
  1816. };
  1817. /****ChargingStatusRequest (AC Only)****/
  1818. struct ChargingStatusRequest_ISO15118_2014
  1819. {
  1820. //No member in standard
  1821. };
  1822. struct ChargingStatusRequest_ISO15118_2018
  1823. {
  1824. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  1825. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  1826. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  1827. struct DisplayParametersType DisplayParameters;
  1828. };
  1829. /****ChargingStatusResponse (AC Only)****/
  1830. struct ChargingStatusResponse_ISO15118_2014
  1831. {
  1832. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1833. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1834. short SAScheduleTupleID;
  1835. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  1836. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  1837. BOOL ReceiptRequired; //Optional
  1838. struct AC_EVSEStatusType AC_EVSEStatus;
  1839. };
  1840. struct ChargingStatusResponse_ISO15118_2018
  1841. {
  1842. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1843. struct EVSEStatusType EVSEStatus; //Optional
  1844. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1845. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  1846. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  1847. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  1848. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  1849. };
  1850. /****CableCheckRequest (DC Only)****/
  1851. struct CableCheckRequest_DIN70121
  1852. {
  1853. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1854. };
  1855. struct CableCheckRequest_ISO15118_2014
  1856. {
  1857. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1858. };
  1859. struct CableCheckRequest_ISO15118_2018
  1860. {
  1861. //No member in standard
  1862. };
  1863. /****CableCheckResponse (DC Only)****/
  1864. struct CableCheckResponse_DIN70121
  1865. {
  1866. enum ResponseCodeType_DIN70121 ResponseCode;
  1867. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1868. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  1869. };
  1870. struct CableCheckResponse_ISO15118_2014
  1871. {
  1872. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1873. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1874. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  1875. };
  1876. struct CableCheckResponse_ISO15118_2018
  1877. {
  1878. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1879. struct EVSEStatusType EVSEStatus; //Optional
  1880. enum ProcessingType EVSEProcessing;
  1881. };
  1882. /****PreChargeRequest (DC Only)****/
  1883. struct PreChargeRequest_DIN70121
  1884. {
  1885. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1886. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  1887. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  1888. };
  1889. struct PreChargeRequest_ISO15118_2014
  1890. {
  1891. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1892. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  1893. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  1894. };
  1895. struct PreChargeRequest_ISO15118_2018
  1896. {
  1897. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  1898. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  1899. };
  1900. /****PreChargeResponse (DC Only)****/
  1901. struct PreChargeResponse_DIN70121
  1902. {
  1903. enum ResponseCodeType_DIN70121 ResponseCode;
  1904. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1905. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1906. };
  1907. struct PreChargeResponse_ISO15118_2014
  1908. {
  1909. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1910. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1911. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  1912. };
  1913. struct PreChargeResponse_ISO15118_2018
  1914. {
  1915. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1916. struct EVSEStatusType EVSEStatus; //Optional
  1917. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  1918. };
  1919. /****CurrentDemandRequest (DC Only)****/
  1920. struct CurrentDemandRequest_DIN70121
  1921. {
  1922. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  1923. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  1924. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  1925. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  1926. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  1927. BOOL BulkChargingComplete; //Optional
  1928. BOOL ChargingComplete;
  1929. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  1930. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  1931. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  1932. };
  1933. struct CurrentDemandRequest_ISO15118_2014
  1934. {
  1935. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  1936. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  1937. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  1938. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  1939. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  1940. BOOL BulkChargingComplete; //Optional
  1941. BOOL ChargingComplete;
  1942. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  1943. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  1944. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  1945. };
  1946. struct CurrentDemandRequest_ISO15118_2018
  1947. {
  1948. struct DisplayParametersType DisplayParameters; //Optional
  1949. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  1950. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  1951. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  1952. };
  1953. /****CurrentDemandResponse (DC Only)****/
  1954. struct CurrentDemandResponse_DIN70121
  1955. {
  1956. enum ResponseCodeType_DIN70121 ResponseCode;
  1957. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  1958. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  1959. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  1960. BOOL EVSECurrentLimitAchieved;
  1961. BOOL EVSEVoltageLimitAchieved;
  1962. BOOL EVSEPowerLimitAchieved;
  1963. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  1964. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  1965. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  1966. };
  1967. struct CurrentDemandResponse_ISO15118_2014
  1968. {
  1969. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  1970. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  1971. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  1972. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  1973. BOOL EVSECurrentLimitAchieved;
  1974. BOOL EVSEVoltageLimitAchieved;
  1975. BOOL EVSEPowerLimitAchieved;
  1976. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  1977. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  1978. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  1979. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1980. short SAScheduleTupleID;
  1981. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  1982. BOOL ReceiptRequired; //Optional
  1983. };
  1984. struct CurrentDemandResponse_ISO15118_2018
  1985. {
  1986. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  1987. struct EVSEStatusType EVSEStatus; //Optional
  1988. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  1989. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  1990. BOOL EVSECurrentLimitAchieved;
  1991. BOOL EVSEVoltageLimitAchieved;
  1992. BOOL EVSEPowerLimitAchieved;
  1993. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  1994. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  1995. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  1996. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  1997. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  1998. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  1999. };
  2000. /****WeldingDetectionRequest (DC Only)*****/
  2001. struct WeldingDetectionRequest_DIN70121
  2002. {
  2003. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2004. };
  2005. struct WeldingDetectionRequest_ISO15118_2014
  2006. {
  2007. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2008. };
  2009. struct WeldingDetectionRequest_ISO15118_2018
  2010. {
  2011. //No member in Standard
  2012. };
  2013. /****WeldingDetectionResponse (DC Only)****/
  2014. struct WeldingDetectionResponse_DIN70121
  2015. {
  2016. enum ResponseCodeType_DIN70121 ResponseCode;
  2017. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2018. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  2019. };
  2020. struct WeldingDetectionResponse_ISO15118_2014
  2021. {
  2022. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2023. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2024. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2025. };
  2026. struct WeldingDetectionResponse_ISO15118_2018
  2027. {
  2028. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2029. struct EVSEStatusType EVSEStatus; //Optional
  2030. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2031. };
  2032. /****FinePositioningSetupRequest (WPT Only)****/
  2033. struct FinePositioningSetupRequest_ISO15118_2018
  2034. {
  2035. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  2036. };
  2037. /****FinePositioningSetupResponse (WPT Only)****/
  2038. struct FinePositioningSetupResponse_ISO15118_2018
  2039. {
  2040. //NOT complete yet, to be continue.....
  2041. };
  2042. struct V2GMessageType_DIN70121
  2043. {
  2044. unsigned char PresentMsgFlowStatus;
  2045. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2046. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2047. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2048. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2049. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2050. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2051. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2052. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2053. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2054. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2055. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2056. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2057. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2058. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2059. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2060. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2061. 52: SessionStopRequest, 53: SessionStopResponse
  2062. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2063. */
  2064. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  2065. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  2066. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  2067. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  2068. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  2069. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  2070. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  2071. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  2072. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  2073. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  2074. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  2075. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  2076. struct CableCheckRequest_DIN70121 CableCheckRequest;
  2077. struct CableCheckResponse_DIN70121 CableCheckResponse;
  2078. struct PreChargeRequest_DIN70121 PreChargeRequest;
  2079. struct PreChargeResponse_DIN70121 PreChargeResponse;
  2080. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  2081. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  2082. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  2083. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  2084. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  2085. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  2086. struct SessionStopRequest_DIN70121 SessionStopRequest;
  2087. struct SessionStopResponse_DIN70121 SessionStopResponse;
  2088. };
  2089. struct V2GMessageType_ISO15118_2014
  2090. {
  2091. unsigned char PresentMsgFlowStatus;
  2092. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2093. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2094. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2095. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2096. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2097. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2098. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2099. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2100. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2101. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2102. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2103. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2104. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2105. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2106. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2107. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2108. 52: SessionStopRequest, 53: SessionStopResponse
  2109. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2110. */
  2111. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  2112. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  2113. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  2114. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  2115. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  2116. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  2117. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  2118. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  2119. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  2120. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  2121. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  2122. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  2123. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  2124. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  2125. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  2126. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  2127. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  2128. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  2129. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  2130. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  2131. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  2132. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  2133. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  2134. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  2135. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  2136. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  2137. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  2138. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  2139. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  2140. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  2141. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  2142. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  2143. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  2144. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  2145. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  2146. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  2147. };
  2148. struct V2GMessageType_ISO15118_2018
  2149. {
  2150. unsigned char PresentMsgFlowStatus;
  2151. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  2152. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  2153. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  2154. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  2155. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  2156. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  2157. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  2158. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  2159. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  2160. 28: AuthorizationRequest, 29: AuthorizationResponse,
  2161. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  2162. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  2163. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  2164. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  2165. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  2166. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  2167. 52: SessionStopRequest, 53: SessionStopResponse
  2168. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  2169. */
  2170. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  2171. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  2172. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  2173. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  2174. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  2175. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  2176. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  2177. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  2178. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  2179. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  2180. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  2181. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  2182. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  2183. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  2184. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  2185. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  2186. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  2187. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  2188. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  2189. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  2190. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  2191. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  2192. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  2193. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  2194. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  2195. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  2196. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  2197. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  2198. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  2199. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  2200. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  2201. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  2202. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  2203. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  2204. };
  2205. struct CcsData
  2206. {
  2207. unsigned char CommProtocol; // 1: V2GMessage_DIN70121, 2:V2GMessage_ISO15118_2014, 3:V2GMessage_ISO15118_2018
  2208. struct V2GMessageType_DIN70121 V2GMessage_DIN70121[CCS_QUANTITY];
  2209. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014[CCS_QUANTITY];
  2210. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018[CCS_QUANTITY];
  2211. };
  2212. /**************************************************************************************/
  2213. /***************STM32F407 Communication Share memory**************************/
  2214. /**************************************************************************************/
  2215. struct PrimaryMcuData
  2216. {
  2217. unsigned char version[16]; //STM32F407 firmware version
  2218. unsigned int InputVoltage; //value comes from external meter
  2219. unsigned int InputCurrent; //value comes from external meter
  2220. union
  2221. {
  2222. unsigned char OutputDrvValue[1];
  2223. struct
  2224. {
  2225. //OutputDrvValue[0]
  2226. unsigned char AcContactorDrv:1; //bit 0, H: ON, L:OFF
  2227. unsigned char Button1LedDrv:1; //bit 1, H: ON, L:OFF
  2228. unsigned char Button2LedDrv:1; //bit 2, H: ON, L:OFF
  2229. unsigned char SystemLed1Drv:1; //bit 3, H: ON, L:OFF
  2230. unsigned char SystemLed2Drv:1; //bit 4, H: ON, L:OFF
  2231. unsigned char SystemLed3Drv:1; //bit 5, H: ON, L:OFF
  2232. unsigned char SystemLed4Drv:1; //bit 6, H: ON, L:OFF
  2233. unsigned char:1; //bit 7 reserved
  2234. }bits;
  2235. }OutputDrv;
  2236. union
  2237. {
  2238. unsigned char InputDetValue[2];
  2239. struct
  2240. {
  2241. //InputDetValue[0]
  2242. unsigned char AcContactorDetec:1; //bit 0, H: ON, L:OFF
  2243. unsigned char AcMainBreakerDetec:1; //bit 1, H: ON, L:OFF
  2244. unsigned char SpdDetec:1; //bit 2, H: ON, L:OFF
  2245. unsigned char DoorOpen:1; //bit 3, H: Open, L:Close
  2246. unsigned char Gfd1:1; //bit 4, H: Trigger, L:Normal
  2247. unsigned char Gfd2:1; //bit 5, H: Trigger, L:Normal
  2248. unsigned char Button1:1; //bit 6 , H: Push, L:Release
  2249. unsigned char Button2:1; //bit 7, H: Push, L:Release
  2250. //InputDetValue[1]
  2251. unsigned char EmergencyButton:1; //bit 0, H: Push, L:Release
  2252. unsigned char :7; //bit 1~7, Reserved
  2253. }bits;
  2254. }InputDet;
  2255. };
  2256. /**************************************************************************************/
  2257. /*************Fan power module Communication Share memory******************/
  2258. /**************************************************************************************/
  2259. struct FanModuleData
  2260. {
  2261. unsigned char version[16]; //fan power module firmware version
  2262. unsigned short PresentFan1Speed; //RPM
  2263. unsigned short PresentFan2Speed; //RPM
  2264. unsigned short PresentFan3Speed; //RPM
  2265. unsigned short PresentFan4Speed; //RPM
  2266. unsigned short SetFan1Speed; //RPM
  2267. unsigned short SetFan2Speed; //RPM
  2268. unsigned short SetFan3Speed; //RPM
  2269. unsigned short SetFan4Speed; //RPM
  2270. unsigned char DiffOfAirPressure; //pa
  2271. unsigned char UpdateFW; //1:do update
  2272. };
  2273. /**************************************************************************************/
  2274. /***********Relay control module Communication Share memory******************/
  2275. /**************************************************************************************/
  2276. struct RelayModuleData
  2277. {
  2278. unsigned char version[16]; //fan power module firmware version
  2279. unsigned short InputL1Volt; //XXXXX.x volt
  2280. unsigned short InputL2Volt; //XXXXX.x volt
  2281. unsigned short InputL3Volt; //XXXXX.x volt
  2282. unsigned short Gun1FuseOutputVolt; //XXXXX.x volt
  2283. unsigned short Gun2FuseOutputVolt; //XXXXX.x volt
  2284. unsigned short Gun1RelayOutputVolt; //XXXXX.x volt
  2285. unsigned short Gun2RelayOutputVolt; //XXXXX.x volt
  2286. unsigned short Gun1OutputCurrent; //XXXXX.x amp
  2287. unsigned short Gun2OutputCurrent; //XXXXX.x amp
  2288. unsigned char UpdateFW; //1:do update
  2289. };
  2290. /**************************************************************************************/
  2291. /************************OCPP Share memory***************************************/
  2292. /**************************************************************************************/
  2293. struct StructIdTagInfo
  2294. {
  2295. unsigned char ExpiryDate[28];
  2296. unsigned char ParentIdTag[20];
  2297. unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
  2298. };
  2299. struct StructLocalAuthorizationList
  2300. {
  2301. unsigned char IdTag[20];
  2302. struct StructIdTagInfo IdTagInfo;
  2303. };
  2304. struct StructSampledValue
  2305. {
  2306. unsigned char Value[128];
  2307. unsigned char Context[20];//Interruption.Begin, Interruption.End, Sample.Clock, Sample.Periodic, Transaction.Begin, Transaction.End, Trigger, Other
  2308. unsigned char Format[12];//Raw,SignedData
  2309. unsigned char Measurand[32];/* "Energy.Active.Export.Register",
  2310. "Energy.Active.Import.Register",
  2311. "Energy.Reactive.Export.Register",
  2312. "Energy.Reactive.Import.Register",
  2313. "Energy.Active.Export.Interval",
  2314. "Energy.Active.Import.Interval",
  2315. "Energy.Reactive.Export.Interval",
  2316. "Energy.Reactive.Import.Interval",
  2317. "Power.Active.Export",
  2318. "Power.Active.Import",
  2319. "Power.Offered",
  2320. "Power.Reactive.Export",
  2321. "Power.Reactive.Import",
  2322. "Power.Factor",
  2323. "Current.Import",
  2324. "Current.Export",
  2325. "Current.Offered",
  2326. "Voltage",
  2327. "Frequency",
  2328. "Temperature",
  2329. "SoC",
  2330. "RPM"
  2331. */
  2332. unsigned char Phase[8]; /* "L1",
  2333. "L2",
  2334. "L3",
  2335. "N",
  2336. "L1-N",
  2337. "L2-N",
  2338. "L3-N",
  2339. "L1-L2",
  2340. "L2-L3",
  2341. "L3-L1"
  2342. */
  2343. unsigned char Location[8]; //Cable,EV,Inlet,Outlet,Body
  2344. unsigned char Unit[12]; /* "Wh",
  2345. "kWh",
  2346. "varh",
  2347. "kvarh",
  2348. "W",
  2349. "kW",
  2350. "VA",
  2351. "kVA",
  2352. "var",
  2353. "kvar",
  2354. "A",
  2355. "V",
  2356. "K",
  2357. "Celcius",
  2358. "Fahrenheit",
  2359. "Percent"
  2360. */
  2361. };
  2362. struct StructMeterValue
  2363. {
  2364. unsigned char TimeStamp[28];
  2365. struct StructSampledValue *SampledValue;
  2366. };
  2367. struct StructConfigurationKeyItems
  2368. {
  2369. unsigned char Item[50];
  2370. };
  2371. struct StructConfigurationKey
  2372. {
  2373. unsigned char Key[50];
  2374. unsigned char ReadOnly[8]; //boolean
  2375. unsigned char Value[500];
  2376. };
  2377. struct StructChargingSchedulePeriod
  2378. {
  2379. int StartPeriod;
  2380. float Limit;//0.1;
  2381. int NumberPhases;
  2382. };
  2383. struct StructChargingSchedule
  2384. {
  2385. int Duration;
  2386. unsigned char StartSchedule[28];
  2387. unsigned char ChargingRateUnit[4]; //A, W
  2388. struct StructChargingSchedulePeriod *ChargingSchedulePeriod;
  2389. float MinChargingRate; //0.1;
  2390. };
  2391. struct StructChargingProfile
  2392. {
  2393. int ChargingProfileId;
  2394. int TransactionId;
  2395. int StackLevel;
  2396. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  2397. unsigned char ChargingProfileKind[12]; //Absolute, Recurring, Relative
  2398. unsigned char RecurrencyKind[8]; //Daily, Weekly
  2399. unsigned char ValidFrom[28];
  2400. unsigned char ValidTo[28];
  2401. struct StructChargingSchedule ChargingSchedule;
  2402. };
  2403. struct StructBootNotification
  2404. {
  2405. unsigned char CpVendor[20]; //chargePointVendor //mandatory
  2406. unsigned char CpModel[20]; //chargePointModel //mandatory
  2407. unsigned char CpSN[25]; //chargePointSerialNumber
  2408. unsigned char CbSN[25]; //chargeBoxSerialNumber
  2409. unsigned char CpFwVersion[50]; //firmwareVersion
  2410. unsigned char CpIccid[20]; //iccid
  2411. unsigned char CpImsi[20]; //imsi
  2412. unsigned char CpMeterType[25]; //meterType
  2413. unsigned char CpMeterSerialNumber[25]; //meterSerialNumber
  2414. unsigned char ResponseStatus[16]; //Accepted, Pending, Rejected
  2415. unsigned char ResponseCurrentTime[28]; //currentTime //mandatory
  2416. int ResponseHeartbeatInterval; //interval //mandatory
  2417. };
  2418. struct StructHeartbeat
  2419. {
  2420. unsigned char ResponseCurrentTime[28];
  2421. };
  2422. struct StructAuthorize
  2423. {
  2424. unsigned char IdTag[20];
  2425. struct StructIdTagInfo ResponseIdTagInfo;
  2426. };
  2427. struct StructStartTransaction
  2428. {
  2429. int ConnectorId;
  2430. unsigned char IdTag[20];
  2431. int MeterStart;
  2432. int ReservationId;
  2433. unsigned char Timestamp[28];
  2434. struct StructIdTagInfo ResponseIdTagInfo;
  2435. int ResponseTransactionId;
  2436. };
  2437. struct StructStopTransaction
  2438. {
  2439. unsigned char IdTag[20];
  2440. int MeterStop;
  2441. unsigned char Timestamp[28];
  2442. int TransactionId;
  2443. unsigned char StopReason; /* "EmergencyStop",
  2444. "EVDisconnected",
  2445. "HardReset",
  2446. "Local",
  2447. "Other",
  2448. "PowerLoss",
  2449. "Reboot",
  2450. "Remote",
  2451. "SoftReset",
  2452. "UnlockCommand",
  2453. "DeAuthorized"
  2454. */
  2455. struct StructMeterValue *TransactionData;
  2456. struct StructIdTagInfo ResponseIdTagInfo;
  2457. };
  2458. struct StructStatusNotification
  2459. {
  2460. int ConnectorId;
  2461. unsigned char ErrorCode; /* "ConnectorLockFailure",
  2462. "EVCommunicationError",
  2463. "GroundFailure",
  2464. "HighTemperature",
  2465. "InternalError",
  2466. "LocalListConflict",
  2467. "NoError",
  2468. "OtherError",
  2469. "OverCurrentFailure",
  2470. "PowerMeterFailure",
  2471. "PowerSwitchFailure",
  2472. "ReaderFailure",
  2473. "ResetFailure",
  2474. "UnderVoltage",
  2475. "OverVoltage",
  2476. "WeakSignal"
  2477. */
  2478. unsigned char Info[50];
  2479. unsigned char Status; /* "Available",
  2480. "Preparing",
  2481. "Charging",
  2482. "SuspendedEVSE",
  2483. "SuspendedEV",
  2484. "Finishing",
  2485. "Reserved",
  2486. "Unavailable",
  2487. "Faulted"
  2488. */
  2489. unsigned char Timestamp[28];
  2490. unsigned char VendorId[256];
  2491. unsigned char VendorErrorCode[50];
  2492. };
  2493. struct StructCancelReservation
  2494. {
  2495. int ReservationId;
  2496. unsigned char ResponseStatus[16]; //Accepted, Rejected
  2497. };
  2498. struct StructChangeAvailability
  2499. {
  2500. int ConnectorId;
  2501. unsigned char Type[16]; //Inoperative, Operative
  2502. unsigned char ResponseStatus[16]; //Accepted, Rejected, Scheduled
  2503. };
  2504. struct StructChangeConfiguration
  2505. {
  2506. unsigned char Key[50];
  2507. unsigned char Value[500];
  2508. unsigned char ResponseStatus[16]; //Accepted, Rejected, RebootRequired, NotSupported
  2509. };
  2510. struct StructClearCache
  2511. {
  2512. unsigned char ResponseStatus[16]; //Accepted, Rejected
  2513. };
  2514. struct StructClearChargingProfile
  2515. {
  2516. int Id;
  2517. int ConnectorId;
  2518. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  2519. int StackLevel;
  2520. unsigned char ResponseStatus[16]; //Accepted, Unknown
  2521. };
  2522. struct StructDataTransfer
  2523. {
  2524. unsigned char VendorId[256];
  2525. unsigned char MessageId[52];
  2526. unsigned char Data[512];
  2527. unsigned char ResponseStatus[18]; //Accepted, Rejected,UnknownMessageId,UnknownVendorId
  2528. unsigned char ResponseData[256];
  2529. };
  2530. struct StructDiagnosticsStatusNotification
  2531. {
  2532. unsigned char Status[16]; //Idle,Uploaded,UploadFailed,Uploading
  2533. };
  2534. struct StructFirmwareStatusNotification
  2535. {
  2536. unsigned char Status[20]; //Downloaded,DownloadFailed,Downloading,Idle,InstallationFailed,Installing,Installed
  2537. };
  2538. struct StructGetCompositeSchedule
  2539. {
  2540. int ConnectorId;
  2541. int Duration;
  2542. unsigned char ChargingRateUnit[4]; //A,W
  2543. unsigned char ResponseStatus[12]; //Accepted,Rejected
  2544. int ResponseConnectorId;
  2545. unsigned char ResponseScheduleStart[28];
  2546. struct StructChargingSchedule ResponseChargingSchedule;
  2547. };
  2548. struct StructGetConfiguration
  2549. {
  2550. struct StructConfigurationKeyItems *Key;
  2551. struct StructConfigurationKey *ResponseConfigurationKey;
  2552. struct StructConfigurationKeyItems *ResponseUnknownKey;
  2553. };
  2554. struct StructGetDiagnostics
  2555. {
  2556. unsigned char Location[256];
  2557. int Retries;
  2558. int RetryInterval;
  2559. unsigned char StartTime[28];
  2560. unsigned char StopTime[28];
  2561. unsigned char ResponseFileName[256];
  2562. };
  2563. struct StructGetLocalListVersion
  2564. {
  2565. int ResponseListVersion;
  2566. };
  2567. struct StructMeterValues
  2568. {
  2569. int ConnectorId;
  2570. int TransactionId;
  2571. struct StructMeterValue *MeterValue;
  2572. };
  2573. struct StructRemoteStartTransaction
  2574. {
  2575. int ConnectorId;
  2576. unsigned char IdTag[20];
  2577. struct StructChargingProfile ChargingProfile;
  2578. unsigned char ResponseStatus[10]; //Accepted, Rejected
  2579. };
  2580. struct StructRemoteStopTransaction
  2581. {
  2582. int TransactionId;
  2583. unsigned char ResponseStatus[10]; //Accepted, Rejected
  2584. };
  2585. struct StructReserveNow
  2586. {
  2587. int ConnectorId;
  2588. unsigned char ExpiryDate[28];
  2589. unsigned char IdTag[20];
  2590. unsigned char ParentIdTag[20];
  2591. int ReservationId;
  2592. unsigned char ResponseStatus[12]; //Accepted, Faulted, Occupied, Rejected, Unavailable
  2593. };
  2594. struct StructReset
  2595. {
  2596. unsigned char Type[8]; //Hard, Soft
  2597. unsigned char ResponseStatus[10]; //Accepted, Rejected
  2598. };
  2599. struct StructSendLocalList
  2600. {
  2601. int ListVersion;
  2602. unsigned char UpdateType[16]; //Differential, Full
  2603. struct StructLocalAuthorizationList *LocalAuthorizationList;
  2604. unsigned char ResponseStatus[16]; //Accepted, Failed, NotSupported, VersionMismatch
  2605. };
  2606. struct StructSetChargingProfile
  2607. {
  2608. int ConnectorId;
  2609. struct StructChargingProfile ChargingProfile;
  2610. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotSupported
  2611. };
  2612. struct StructTriggerMessage
  2613. {
  2614. unsigned char RequestedMessage[32]; /*
  2615. "BootNotification",
  2616. "DiagnosticsStatusNotification",
  2617. "FirmwareStatusNotification",
  2618. "Heartbeat",
  2619. "MeterValues",
  2620. "StatusNotification"
  2621. */
  2622. int ConnectorId;
  2623. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotImplemented
  2624. };
  2625. struct StructUnlockConnector
  2626. {
  2627. int ConnectorId;
  2628. unsigned char ResponseStatus[16]; //Unlocked, UnlockFailed, NotSupported
  2629. };
  2630. struct StructUpdateFirmware
  2631. {
  2632. unsigned char Location[256];
  2633. int Retries;
  2634. unsigned char RetrieveDate[28];
  2635. int RetryInterval;
  2636. };
  2637. struct OCPP16ConfigurationItem
  2638. {
  2639. unsigned char ItemName[64];
  2640. unsigned char ItemAccessibility;//0:RO, 1:RW
  2641. unsigned char ItemData[128];
  2642. };
  2643. struct OCPP16ConfigurationTable
  2644. {
  2645. //please refer to OCPP 1.6 chapter 9
  2646. struct OCPP16ConfigurationItem CoreProfile[28];
  2647. struct OCPP16ConfigurationItem LocalAuthListManagementProfile[3];
  2648. struct OCPP16ConfigurationItem ReservationProfile[1];
  2649. struct OCPP16ConfigurationItem SmartChargingProfile[5];
  2650. };
  2651. struct OCPP16Data
  2652. {
  2653. 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"
  2654. unsigned char ChargeBoxId[128];
  2655. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  2656. union
  2657. {
  2658. //Operations Initiated by Charge Point
  2659. unsigned char CpMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
  2660. struct
  2661. {
  2662. //CpMsgValue[0]
  2663. unsigned char DataTransferReq:1; //bit 0,
  2664. unsigned char DataTransferConf:1; //bit 1,
  2665. unsigned char StartTransactionReq:1; //bit 2,
  2666. unsigned char StartTransactionConf:1; //bit 3,
  2667. unsigned char StopTransactionReq:1; //bit 4,
  2668. unsigned char StopTransactionConf:1; //bit 5,
  2669. unsigned char :2; //bit 6,7 , reserved
  2670. }bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
  2671. }CpMsg;
  2672. union
  2673. {
  2674. //Operations Initiated by Sequence Point
  2675. unsigned char SpMsgValue[1];
  2676. struct {
  2677. //SpMsgValue[0]
  2678. unsigned char BootNotificationReq :1; //bit 0,
  2679. unsigned char BootNotificationConf :1; //bit 1,
  2680. unsigned char AuthorizeReq :1; //bit 2,
  2681. unsigned char AuthorizeConf :1; //bit 3,
  2682. unsigned char DiagnosticsStatusNotificationReq :1; //bit 4,
  2683. unsigned char DiagnosticsStatusNotificationConf :1; //bit 5,
  2684. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  2685. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  2686. } bits;
  2687. } SpMsg;
  2688. union
  2689. {
  2690. //Operations Initiated by Central System
  2691. unsigned char CsMsgValue[3 * (CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY)];
  2692. struct
  2693. {
  2694. //CsMsgValue[0]
  2695. unsigned char CancelReservationReq :1; //bit 0,
  2696. unsigned char CancelReservationConf :1; //bit 1,
  2697. unsigned char ChangeAvailabilityReq :1; //bit 2,
  2698. unsigned char ChangeAvailabilityConf :1; //bit 3,
  2699. unsigned char ReserveNowReq :1; //bit 4,
  2700. unsigned char ReserveNowConf :1; //bit 5,
  2701. unsigned char SetChargingProfileReq :1; //bit 6,
  2702. unsigned char SetChargingProfileConf :1; //bit 7,
  2703. //CsMsgValue[1]
  2704. unsigned char TriggerMessageReq :1; //bit 0,
  2705. unsigned char TriggerMessageConf :1; //bit 1,
  2706. unsigned char UnlockConnectorReq :1; //bit 2,
  2707. unsigned char UnlockConnectorConf :1; //bit 3,
  2708. unsigned char RemoteStartTransactionReq :1; //bit 4,
  2709. unsigned char RemoteStartTransactionConf :1; //bit 5,
  2710. unsigned char RemoteStopTransactionReq :1; //bit 6,
  2711. unsigned char RemoteStopTransactionConf :1; //bit 7,
  2712. //CsMsgValue[2]
  2713. unsigned char ClearChargingProfileReq :1; //bit 0,
  2714. unsigned char ClearChargingProfileConf :1; //bit 1,
  2715. unsigned char DataTransferReq :1; //bit 2,
  2716. unsigned char DataTransferConf :1; //bit 3,
  2717. unsigned char GetCompositeScheduleReq :1; //bit 4,
  2718. unsigned char GetCompositeScheduleConf :1; //bit 5,
  2719. unsigned char :2; //bit 6,7
  2720. }bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
  2721. }CsMsg;
  2722. union
  2723. {
  2724. //Operations Initiated by Main System
  2725. unsigned char MsMsgValue[2];
  2726. struct {
  2727. //CsMsgValue[0]
  2728. unsigned char ChangeConfigurationReq :1; //bit 0,
  2729. unsigned char ChangeConfigurationConf :1; //bit 1,
  2730. unsigned char ClearCacheReq :1; //bit 2,
  2731. unsigned char ClearCacheConf :1; //bit 3,
  2732. unsigned char GetConfigurationReq :1; //bit 4,
  2733. unsigned char GetConfigurationConf :1; //bit 5,
  2734. unsigned char UpdateFirmwareReq :1; //bit 6,
  2735. unsigned char UpdateFirmwareConf :1; //bit 7,
  2736. //CsMsgValue[1]
  2737. unsigned char GetDiagnosticsReq :1; //bit 0,
  2738. unsigned char GetDiagnosticsConf :1; //bit 1,
  2739. unsigned char GetLocalListVersionReq :1; //bit 2,
  2740. unsigned char GetLocalListVersionConf :1; //bit 3,
  2741. unsigned char ResetReq :1; //bit 4,
  2742. unsigned char ResetConf :1; //bit 5,
  2743. unsigned char SendLocalListReq :1; //bit 6,
  2744. unsigned char SendLocalListConf :1; //bit 7,
  2745. } bits;
  2746. } MsMsg;
  2747. struct StructBootNotification BootNotification;
  2748. struct StructHeartbeat Heartbeat;
  2749. struct StructAuthorize Authorize;
  2750. struct StructStartTransaction StartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2751. struct StructStopTransaction StopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2752. struct StructStatusNotification StatusNotification[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2753. struct StructCancelReservation CancelReservation[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2754. struct StructChangeAvailability ChangeAvailability[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2755. struct StructChangeConfiguration ChangeConfiguration;
  2756. struct StructClearCache ClearCache;
  2757. struct StructClearChargingProfile ClearChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2758. struct StructDataTransfer DataTransfer[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2759. struct StructDiagnosticsStatusNotification DiagnosticsStatusNotification;
  2760. struct StructFirmwareStatusNotification FirmwareStatusNotification;
  2761. struct StructGetCompositeSchedule GetCompositeSchedule[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2762. struct StructGetConfiguration GetConfiguration;
  2763. struct StructGetDiagnostics GetDiagnostics;
  2764. struct StructGetLocalListVersion GetLocalListVersion;
  2765. struct StructMeterValues MeterValues[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2766. struct StructRemoteStartTransaction RemoteStartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2767. struct StructRemoteStopTransaction RemoteStopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2768. struct StructReserveNow ReserveNow[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2769. struct StructReset Reset;
  2770. struct StructSendLocalList SendLocalList;
  2771. struct StructSetChargingProfile SetChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2772. struct StructTriggerMessage TriggerMessage[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2773. struct StructUnlockConnector UnlockConnector[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY];
  2774. struct StructUpdateFirmware UpdateFirmware;
  2775. struct OCPP16ConfigurationTable ConfigurationTable;
  2776. struct StructChargingProfile CHAdeMOChargingProfile[CHAdeMO_QUANTITY];
  2777. struct StructChargingProfile CcsChargingProfile[CCS_QUANTITY];
  2778. };
  2779. #endif // DEFINE_H_