define.h 151 KB

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