define.h 148 KB

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