define.h 146 KB

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