define.h 127 KB

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