define.h 150 KB

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