define.h.bak 151 KB

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