define.h 152 KB

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