define.h 169 KB

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