6#include <ocpp/common/custom_iterators.hpp>
7#include <ocpp/v2/evse.hpp>
18void set_evse_connectors_unavailable(EvseInterface& evse,
bool persist);
81 std::vector<std::unique_ptr<EvseInterface>> evses;
85 std::shared_ptr<DatabaseHandler> database_handler,
86 std::shared_ptr<ComponentStateManagerInterface> component_state_manager,
88 transaction_meter_value_req,
89 const std::function<
void(int32_t evse_id)>& pause_charging_callback);
94 virtual bool does_connector_exist(
const int32_t evse_id,
const ConnectorEnum connector_type)
const override;
This class manages access to the device model representation and to the device model interface and pr...
Definition: device_model.hpp:96
Class used to access the Evse instances.
Definition: evse_manager.hpp:21
virtual EvseInterface & get_evse(int32_t id)=0
Get a reference to the evse with id.
virtual size_t get_number_of_evses() const =0
Get the number of evses.
virtual EvseIterator begin()=0
Gets an iterator pointing to the first evse.
virtual std::optional< int32_t > get_transaction_evseid(const CiString< 36 > &transaction_id) const =0
Get evseid for the given transaction id.
virtual ~EvseManagerInterface()=default
Default destructor.
virtual bool any_transaction_active(const std::optional< EVSE > &evse) const =0
Helper function to determine if there is any active transaction for the given evse.
virtual bool are_all_connectors_effectively_inoperative() const =0
Checks if all connectors are effectively inoperative. If this is the case, calls the all_connectors_u...
virtual bool is_valid_evse(const EVSE &evse) const =0
Check if the given evse is valid.
virtual EvseIterator end()=0
Gets an iterator pointing past the last evse.
virtual bool does_evse_exist(int32_t id) const =0
Check if an evse with id exists.
virtual bool does_connector_exist(const int32_t evse_id, ConnectorEnum connector_type) const =0
Check if the connector exists on the given evse id.
virtual const EvseInterface & get_evse(int32_t id) const =0
Get a const reference to the evse with id.
Definition: evse_manager.hpp:79
size_t get_number_of_evses() const override
Get the number of evses.
Definition: evse_manager.cpp:75
bool any_transaction_active(const std::optional< EVSE > &evse) const override
Helper function to determine if there is any active transaction for the given evse.
Definition: evse_manager.cpp:91
virtual bool does_connector_exist(const int32_t evse_id, const ConnectorEnum connector_type) const override
Check if the connector exists on the given evse id.
Definition: evse_manager.cpp:46
bool does_evse_exist(const int32_t id) const override
Check if an evse with id exists.
Definition: evse_manager.cpp:58
EvseIterator begin() override
Gets an iterator pointing to the first evse.
Definition: evse_manager.cpp:25
bool is_valid_evse(const EVSE &evse) const override
Check if the given evse is valid.
Definition: evse_manager.cpp:103
EvseInterface & get_evse(int32_t id) override
Get a reference to the evse with id.
Definition: evse_manager.cpp:32
EvseIterator end() override
Gets an iterator pointing past the last evse.
Definition: evse_manager.cpp:28
std::optional< int32_t > get_transaction_evseid(const CiString< 36 > &transaction_id) const override
Get evseid for the given transaction id.
Definition: evse_manager.cpp:79
bool are_all_connectors_effectively_inoperative() const override
Checks if all connectors are effectively inoperative. If this is the case, calls the all_connectors_u...
Definition: evse_manager.cpp:62
Helper struct that allows the use of an iterator in an interface, can be implemented using any forwar...
Definition: custom_iterators.hpp:41
Definition: ocpp_types.hpp:155
Struct that enhances the OCPP Transaction by some meta data and functionality.
Definition: transaction.hpp:16
Definition: ocpp_types.hpp:436