define.h 150 KB

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