define.h 154 KB

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