define.h 150 KB

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