define.h 149 KB

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