define.h 147 KB

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