v2g_serviceMethods.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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.2.1
  21. * @contact Joerg.Heuer@siemens.com
  22. *
  23. ********************************************************************/
  24. #include "v2g_serviceMethods.h"
  25. #include "v2g_serviceDataTypes.h"
  26. #include <stdio.h>
  27. int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result)
  28. {
  29. printf("EVSE: sessionSetup called\n" );
  30. printf("\tReceived data:\n");
  31. printf("\t\t PEVStatus ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
  32. printf("\t\t PEVStatus ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
  33. /* Prepare data for PEV */
  34. result->ResponseCode = OK_SessionSetup;
  35. result->EVSEID.data[0]='E';
  36. result->EVSEID.arraylen.data=1;
  37. result->EVSEStatus.ConnectorLocked=0;
  38. result->EVSEStatus.EVSEStandby=1;
  39. result->EVSEStatus.FatalError=0;
  40. result->EVSEStatus.PowerSwitchClosed=1;
  41. result->EVSEStatus.RCD=1;
  42. result->EVSEStatus.ShutDownTime=12345678L;
  43. result->TCurrent=12345678L;
  44. return 0;
  45. }
  46. int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result)
  47. {
  48. return 0;
  49. }
  50. int selectedServicePayment(struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result)
  51. {
  52. return 0;
  53. }
  54. int paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result)
  55. {
  56. return 0;
  57. }
  58. int powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result)
  59. {
  60. return 0;
  61. }
  62. int lineLock(struct LineLockReqType* param, struct LineLockResType* result)
  63. {
  64. return 0;
  65. }
  66. int powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result)
  67. {
  68. return 0;
  69. }
  70. int meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result)
  71. {
  72. return 0;
  73. }
  74. int meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result)
  75. {
  76. return 0;
  77. }