define.h 169 KB

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