define.h 128 KB

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