define.h 151 KB

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