define.h 162 KB

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