define.h 151 KB

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