define.h 128 KB

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