define.h 166 KB

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