define.h 127 KB

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