1+ /*
2+ Copyright (c) 2020 Cedric Jimenez
3+ This file is part of OpenOCPP.
4+
5+ OpenOCPP is free software: you can redistribute it and/or modify
6+ it under the terms of the GNU Lesser General Public License as published by
7+ the Free Software Foundation, either version 2.1 of the License, or
8+ (at your option) any later version.
9+
10+ OpenOCPP is distributed in the hope that it will be useful,
11+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+ GNU Lesser General Public License for more details.
14+
15+ You should have received a copy of the GNU Lesser General Public License
16+ along with OpenOCPP. If not, see <http://www.gnu.org/licenses/>.
17+ */
18+
19+ #ifndef OPENOCPP_OCPP20_TXSTARTSTOPTYPE_H
20+ #define OPENOCPP_OCPP20_TXSTARTSTOPTYPE_H
21+
22+ #include " EnumToStringFromString.h"
23+
24+ namespace ocpp
25+ {
26+ namespace types
27+ {
28+ namespace ocpp20
29+ {
30+
31+ /* * @brief Points used to marks the start of a transaction */
32+ enum class TxStartStopPointType
33+ {
34+ /* * @brief An object (probably an EV) is detected in the parking/charging bay. */
35+ ParkingBayOccupancy,
36+ /* *
37+ * @brief Both ends of the Charging Cable have been connected
38+ * (if this can be detected, else detection of a cable being plugged into
39+ * the socket), or for wireless charging:
40+ * initial communication between EVSE and EV is established.
41+ */
42+ EVConnected,
43+ /* *
44+ * @brief Driver or EV has been authorized, this can also be some form of
45+ * anonymous authorization like a start button.
46+ */
47+ Authorized,
48+ /* *
49+ * @brief All preconditions for charging have been met, power can flow. This
50+ * event is the logical AND of EVConnected and Authorized and
51+ * should be used if a transaction is supposed to start when EV is
52+ * connected and authorized. Despite its name, this event is not
53+ * related to the state of the power relay.
54+ *
55+ * @note There may be situations where PowerPathClosed does not
56+ * imply that charging starts at that moment, e.g. because of delayed
57+ * charging or a battery that is too hot.
58+ */
59+ PowerPathClosed,
60+ /* *
61+ * @brief Energy is being transferred between EV and EVSE.
62+ * @note Energy is not being transferred between EV and EVSE.
63+ * This is not recommended to use as a TxStopPoint, because it
64+ * will stop the transaction as soon as EV or EVSE (temporarily)
65+ * suspend the charging.
66+ */
67+ EnergyTransfer,
68+ /* *
69+ * @brief The moment when the signed meter value is received from the
70+ * fiscal meter, that is used in the TransactionEventRequest with
71+ * context = Transaction.Begin and triggerReason = SignedDataReceived.
72+ * This TxStartPoint might be applicable when legislation exists that only
73+ * allows a billable transaction to start when the first signed meter value
74+ * has been received.
75+ * @note This condition has no meaning as a TxStopPoint and should not
76+ * be used as such.
77+ */
78+ DataSigned
79+ };
80+
81+ /* * @brief Helper to convert a TxStartPointType enum to string */
82+ extern const EnumToStringFromString<TxStartStopPointType> TxStartStopPointTypeHelper;
83+
84+ } // namespace ocpp20
85+ } // namespace types
86+ } // namespace ocpp
87+
88+ #endif // OPENOCPP_OCPP20_TXSTARTSTOPTYPE_H
0 commit comments