v2g_serviceDataTypes.c 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. /*
  2. * Copyright (C) 2007-2010 Siemens AG
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Lesser General Public License as published
  6. * by the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. /*******************************************************************
  18. *
  19. * @author Sebastian.Kaebisch.EXT@siemens.com
  20. * @version 0.3
  21. * @contact Joerg.Heuer@siemens.com
  22. *
  23. ********************************************************************/
  24. #include "EXITypes.h"
  25. #include "v2g_serviceDataTypes.h"
  26. static void init_SessionInformationType_SessionID(struct SessionInformationType_SessionID* type)
  27. {
  28. type->arraylen.data=0;
  29. }
  30. static void init_SessionInformationType_ServiceSessionID(struct SessionInformationType_ServiceSessionID* type)
  31. {
  32. type->arraylen.data=0;
  33. }
  34. static void init_SessionInformationType_ProtocolVersion(struct SessionInformationType_ProtocolVersion* type)
  35. {
  36. type->arraylen.data=0;
  37. }
  38. static void init_SessionInformationType(struct SessionInformationType* type)
  39. {
  40. init_SessionInformationType_SessionID(&(type->SessionID));
  41. init_SessionInformationType_ServiceSessionID(&(type->ServiceSessionID));
  42. type->isused.ServiceSessionID=0;
  43. init_SessionInformationType_ProtocolVersion(&(type->ProtocolVersion));
  44. type->isused.ProtocolVersion=0;
  45. }
  46. static void init_NotificationType_FaultMsg(struct NotificationType_FaultMsg* type)
  47. {
  48. type->arraylen.data=0;
  49. }
  50. static void init_NotificationType(struct NotificationType* type)
  51. {
  52. type->isused.FaultCode=0;
  53. init_NotificationType_FaultMsg(&(type->FaultMsg));
  54. type->isused.FaultMsg=0;
  55. type->isused.EventList=0;
  56. }
  57. static void init_HeaderType(struct HeaderType* type)
  58. {
  59. init_SessionInformationType(&(type->SessionInformation));
  60. init_NotificationType(&(type->Notification));
  61. type->isused.Notification=0;
  62. }
  63. static void init_SessionSetupReqType_PEVID(struct SessionSetupReqType_PEVID* type)
  64. {
  65. type->arraylen.data=0;
  66. }
  67. static void init_SessionSetupReqType(struct SessionSetupReqType* type)
  68. {
  69. init_SessionSetupReqType_PEVID(&(type->PEVID));
  70. type->isused.PEVID=0;
  71. }
  72. static void init_SessionSetupResType_EVSEID(struct SessionSetupResType_EVSEID* type)
  73. {
  74. type->arraylen.data=0;
  75. }
  76. static void init_SessionSetupResType(struct SessionSetupResType* type)
  77. {
  78. init_SessionSetupResType_EVSEID(&(type->EVSEID));
  79. }
  80. static void init_ServiceDiscoveryReqType_ServiceScope(struct ServiceDiscoveryReqType_ServiceScope* type)
  81. {
  82. type->arraylen.data=0;
  83. }
  84. static void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type)
  85. {
  86. type->isused.ServiceType=0;
  87. init_ServiceDiscoveryReqType_ServiceScope(&(type->ServiceScope));
  88. type->isused.ServiceScope=0;
  89. }
  90. static void init_ServiceDescriptionType_ServiceID(struct ServiceDescriptionType_ServiceID* type)
  91. {
  92. type->arraylen.data=0;
  93. }
  94. static void init_ServiceDescriptionType_ServiceName(struct ServiceDescriptionType_ServiceName* type)
  95. {
  96. type->arraylen.data=0;
  97. }
  98. static void init_ServiceDescriptionType_ServiceScope(struct ServiceDescriptionType_ServiceScope* type)
  99. {
  100. type->arraylen.data=0;
  101. }
  102. static void init_ServiceDescriptionType(struct ServiceDescriptionType* type)
  103. {
  104. init_ServiceDescriptionType_ServiceID(&(type->ServiceID));
  105. init_ServiceDescriptionType_ServiceName(&(type->ServiceName));
  106. type->isused.ServiceName=0;
  107. type->isused.ServiceType=0;
  108. init_ServiceDescriptionType_ServiceScope(&(type->ServiceScope));
  109. type->isused.ServiceScope=0;
  110. }
  111. static void init_ServiceListType(struct ServiceListType* type)
  112. {
  113. int i_loop;
  114. for(i_loop=0; i_loop<8;i_loop++)
  115. {
  116. init_ServiceDescriptionType(&(type->Service[i_loop]));
  117. }
  118. type->arraylen.Service=0;
  119. }
  120. static void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type)
  121. {
  122. init_ServiceListType(&(type->ServiceList));
  123. type->isused.ServiceList=0;
  124. }
  125. static void init_ServicePaymentSelectionReqType_PEVPubKey(struct ServicePaymentSelectionReqType_PEVPubKey* type)
  126. {
  127. type->arraylen.data=0;
  128. }
  129. static void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type)
  130. {
  131. init_ServiceListType(&(type->ServiceList));
  132. init_ServicePaymentSelectionReqType_PEVPubKey(&(type->PEVPubKey));
  133. }
  134. static void init_ServicePaymentSelectionResType_MeteringAuthPubKey(struct ServicePaymentSelectionResType_MeteringAuthPubKey* type)
  135. {
  136. type->arraylen.data=0;
  137. }
  138. static void init_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type)
  139. {
  140. init_ServicePaymentSelectionResType_MeteringAuthPubKey(&(type->MeteringAuthPubKey));
  141. type->isused.MeteringAuthPubKey=0;
  142. }
  143. static void init_PaymentDetailsReqType_ContractID(struct PaymentDetailsReqType_ContractID* type)
  144. {
  145. type->arraylen.data=0;
  146. }
  147. static void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type)
  148. {
  149. init_PaymentDetailsReqType_ContractID(&(type->ContractID));
  150. }
  151. static void init_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type)
  152. {
  153. }
  154. static void init_PowerDiscoveryResType_EnergyProvider(struct PowerDiscoveryResType_EnergyProvider* type)
  155. {
  156. type->arraylen.data=0;
  157. }
  158. static void init_TariffTableType_Currency(struct TariffTableType_Currency* type)
  159. {
  160. type->arraylen.data=0;
  161. }
  162. static void init_TariffDescrType_TariffDescription(struct TariffDescrType_TariffDescription* type)
  163. {
  164. type->arraylen.data=0;
  165. }
  166. static void init_TariffEntryType(struct TariffEntryType* type)
  167. {
  168. type->isused.EPrice=0;
  169. }
  170. static void init_TariffEntriesType(struct TariffEntriesType* type)
  171. {
  172. int i_loop;
  173. for(i_loop=0; i_loop<8;i_loop++)
  174. {
  175. init_TariffEntryType(&(type->TariffEntry[i_loop]));
  176. }
  177. type->arraylen.TariffEntry=0;
  178. }
  179. static void init_TariffDescrType(struct TariffDescrType* type)
  180. {
  181. init_TariffDescrType_TariffDescription(&(type->TariffDescription));
  182. type->isused.TariffDescription=0;
  183. init_TariffEntriesType(&(type->TariffEntries));
  184. }
  185. static void init_TariffTableType(struct TariffTableType* type)
  186. {
  187. int i_loop;
  188. init_TariffTableType_Currency(&(type->Currency));
  189. for(i_loop=0; i_loop<6;i_loop++)
  190. {
  191. init_TariffDescrType(&(type->Tariff[i_loop]));
  192. }
  193. type->arraylen.Tariff=0;
  194. }
  195. static void init_PowerDiscoveryResType(struct PowerDiscoveryResType* type)
  196. {
  197. init_PowerDiscoveryResType_EnergyProvider(&(type->EnergyProvider));
  198. type->isused.EnergyProvider=0;
  199. init_TariffTableType(&(type->TariffTable));
  200. type->isused.TariffTable=0;
  201. }
  202. static void init_LineLockReqType(struct LineLockReqType* type)
  203. {
  204. }
  205. static void init_LineLockResType(struct LineLockResType* type)
  206. {
  207. }
  208. static void init_ChargingProfileType(struct ChargingProfileType* type)
  209. {
  210. }
  211. static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type)
  212. {
  213. type->isused.Tariff=0;
  214. init_ChargingProfileType(&(type->ChargingProfile));
  215. type->isused.ChargingProfile=0;
  216. }
  217. static void init_MeteringStatusResType_EVSEID(struct MeteringStatusResType_EVSEID* type)
  218. {
  219. type->arraylen.data=0;
  220. }
  221. static void init_MeterInfoType_MeterID(struct MeterInfoType_MeterID* type)
  222. {
  223. type->arraylen.data=0;
  224. }
  225. static void init_MeterInfoType(struct MeterInfoType* type)
  226. {
  227. init_MeterInfoType_MeterID(&(type->MeterID));
  228. type->isused.MeterID=0;
  229. type->isused.MeterReading=0;
  230. type->isused.MeterStatus=0;
  231. type->isused.TMeter=0;
  232. }
  233. static void init_MeteringStatusResType(struct MeteringStatusResType* type)
  234. {
  235. init_MeteringStatusResType_EVSEID(&(type->EVSEID));
  236. type->isused.PCurrent=0;
  237. init_MeterInfoType(&(type->MeterInfo));
  238. type->isused.MeterInfo=0;
  239. }
  240. static void init_MeteringReceiptReqType_PEVID(struct MeteringReceiptReqType_PEVID* type)
  241. {
  242. type->arraylen.data=0;
  243. }
  244. static void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type)
  245. {
  246. init_MeteringReceiptReqType_PEVID(&(type->PEVID));
  247. type->isused.PEVID=0;
  248. type->isused.TCurrent=0;
  249. init_MeterInfoType(&(type->MeterInfo));
  250. }
  251. static void init_BodyType(struct BodyType* type)
  252. {
  253. init_SessionSetupReqType(&(type->SessionSetupReq));
  254. type->isused.SessionSetupReq=0;
  255. init_SessionSetupResType(&(type->SessionSetupRes));
  256. type->isused.SessionSetupRes=0;
  257. init_ServiceDiscoveryReqType(&(type->ServiceDiscoveryReq));
  258. type->isused.ServiceDiscoveryReq=0;
  259. init_ServiceDiscoveryResType(&(type->ServiceDiscoveryRes));
  260. type->isused.ServiceDiscoveryRes=0;
  261. init_ServicePaymentSelectionReqType(&(type->ServicePaymentSelectionReq));
  262. type->isused.ServicePaymentSelectionReq=0;
  263. init_ServicePaymentSelectionResType(&(type->ServicePaymentSelectionRes));
  264. type->isused.ServicePaymentSelectionRes=0;
  265. init_PaymentDetailsReqType(&(type->PaymentDetailsReq));
  266. type->isused.PaymentDetailsReq=0;
  267. type->isused.PaymentDetailsRes=0;
  268. init_PowerDiscoveryReqType(&(type->PowerDiscoveryReq));
  269. type->isused.PowerDiscoveryReq=0;
  270. init_PowerDiscoveryResType(&(type->PowerDiscoveryRes));
  271. type->isused.PowerDiscoveryRes=0;
  272. init_LineLockReqType(&(type->LineLockReq));
  273. type->isused.LineLockReq=0;
  274. init_LineLockResType(&(type->LineLockRes));
  275. type->isused.LineLockRes=0;
  276. init_PowerDeliveryReqType(&(type->PowerDeliveryReq));
  277. type->isused.PowerDeliveryReq=0;
  278. type->isused.PowerDeliveryRes=0;
  279. type->isused.MeteringStatusReq=0;
  280. init_MeteringStatusResType(&(type->MeteringStatusRes));
  281. type->isused.MeteringStatusRes=0;
  282. init_MeteringReceiptReqType(&(type->MeteringReceiptReq));
  283. type->isused.MeteringReceiptReq=0;
  284. type->isused.MeteringReceiptRes=0;
  285. }
  286. void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type)
  287. {
  288. init_HeaderType(&(type->Header));
  289. init_BodyType(&(type->Body));
  290. }