define.h 162 KB

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