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