define.h 154 KB

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