define.h 149 KB

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