define.h 151 KB

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