IEVController.java 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*******************************************************************************
  2. * The MIT License (MIT)
  3. *
  4. * Copyright (c) 2015 - 2019 Dr. Marc Mültin (V2G Clarity)
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to deal
  8. * in the Software without restriction, including without limitation the rights
  9. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. * copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22. * THE SOFTWARE.
  23. *******************************************************************************/
  24. package com.v2gclarity.risev2g.evcc.evController;
  25. import com.v2gclarity.risev2g.evcc.session.V2GCommunicationSessionEVCC;
  26. import com.v2gclarity.risev2g.shared.enumerations.CPStates;
  27. import com.v2gclarity.risev2g.shared.v2gMessages.msgDef.ChargingProfileType;
  28. import com.v2gclarity.risev2g.shared.v2gMessages.msgDef.EnergyTransferModeType;
  29. import com.v2gclarity.risev2g.shared.v2gMessages.msgDef.PaymentOptionListType;
  30. import com.v2gclarity.risev2g.shared.v2gMessages.msgDef.PaymentOptionType;
  31. public interface IEVController {
  32. /**
  33. * Provides a reference to the current communication session for
  34. * this controller instance.
  35. * @param commSessionContext The active communication session
  36. */
  37. public void setCommSessionContext(V2GCommunicationSessionEVCC commSessionContext);
  38. /**
  39. * Returns the user-chosen payment method, either external identification means (EIM) such as an
  40. * RFID card or via Plug-and-Charge (PnC)
  41. * @return The payment option Contract or ExternalPayment
  42. */
  43. public PaymentOptionType getPaymentOption();
  44. /**
  45. * Returns the EnergyTransferMode chosen by the driver
  46. * @return The chosen EnergyTransferMode
  47. */
  48. public EnergyTransferModeType getRequestedEnergyTransferMode();
  49. /**
  50. * Returns the specific charging profile for the current charging session
  51. * (i.e. maximum amount of power drawn over time)
  52. * @return The charging profile with a list of profile entries
  53. */
  54. public ChargingProfileType getChargingProfile();
  55. /**
  56. * Returns the unique identifier within a charging session for a SAScheduleTuple element
  57. * contained in the list of SASchedules delivered by the EVSE. An SAScheduleTupleID remains a
  58. * unique identifier for one schedule throughout a charging session.
  59. * @return The unique ID given as a short value
  60. */
  61. public short getChosenSAScheduleTupleID();
  62. /**
  63. * Signals a CP state according to IEC 61851-1 (State A, B, C or D)
  64. * @param state
  65. * @return True, if the state signaling was successful, false otherwise
  66. */
  67. public boolean setCPState(CPStates state);
  68. /**
  69. * Returns the current CP state according IEC 61851-1 (State A, B, C or D)
  70. * @return The respective CP state
  71. */
  72. public CPStates getCPState();
  73. /**
  74. * Provides information on whether the charging loop should be active to charge the EV's battery, or not
  75. *
  76. * @return True, if charging process should be continued, false otherwise
  77. */
  78. public boolean isChargingLoopActive();
  79. }