define.h 147 KB

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