define.h 146 KB

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