define.h 127 KB

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