define.h 128 KB

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