define.h 125 KB

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