ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Types | Public Member Functions | List of all members
ocpp::v2::EvseManagerInterface Class Referenceabstract

Class used to access the Evse instances. More...

#include <evse_manager.hpp>

Inheritance diagram for ocpp::v2::EvseManagerInterface:
ocpp::v2::EvseManager

Public Types

using EvseIterator = ForwardIterator< EvseInterface >
 

Public Member Functions

virtual ~EvseManagerInterface ()=default
 Default destructor.
 
virtual EvseInterfaceget_evse (int32_t id)=0
 Get a reference to the evse with id. More...
 
virtual const EvseInterfaceget_evse (int32_t id) const =0
 Get a const reference to the evse with id. More...
 
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. More...
 
virtual bool does_evse_exist (int32_t id) const =0
 Check if an evse with id exists. More...
 
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_unavailable_callback This is used e.g. to allow firmware updates once all transactions have finished. More...
 
virtual size_t get_number_of_evses () const =0
 Get the number of evses. More...
 
virtual std::optional< int32_t > get_transaction_evseid (const CiString< 36 > &transaction_id) const =0
 Get evseid for the given transaction id. More...
 
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. More...
 
virtual bool is_valid_evse (const EVSE &evse) const =0
 Check if the given evse is valid. More...
 
virtual EvseIterator begin ()=0
 Gets an iterator pointing to the first evse. More...
 
virtual EvseIterator end ()=0
 Gets an iterator pointing past the last evse. More...
 

Detailed Description

Class used to access the Evse instances.

Member Function Documentation

◆ any_transaction_active()

virtual bool ocpp::v2::EvseManagerInterface::any_transaction_active ( const std::optional< EVSE > &  evse) const
pure virtual

Helper function to determine if there is any active transaction for the given evse.

Parameters
evseif optional is not set, this function will check if there is any transaction active for the whole charging station
Returns

Implemented in ocpp::v2::EvseManager.

◆ are_all_connectors_effectively_inoperative()

virtual bool ocpp::v2::EvseManagerInterface::are_all_connectors_effectively_inoperative ( ) const
pure virtual

Checks if all connectors are effectively inoperative. If this is the case, calls the all_connectors_unavailable_callback This is used e.g. to allow firmware updates once all transactions have finished.

Implemented in ocpp::v2::EvseManager.

◆ begin()

virtual EvseIterator ocpp::v2::EvseManagerInterface::begin ( )
pure virtual

Gets an iterator pointing to the first evse.

Implemented in ocpp::v2::EvseManager.

◆ does_connector_exist()

virtual bool ocpp::v2::EvseManagerInterface::does_connector_exist ( const int32_t  evse_id,
ConnectorEnum  connector_type 
) const
pure virtual

Check if the connector exists on the given evse id.

Parameters
evse_idThe evse id to check for.
connector_typeThe connector type.
Returns
False if evse id does not exist or evse does not have the given connector type.

Implemented in ocpp::v2::EvseManager.

◆ does_evse_exist()

virtual bool ocpp::v2::EvseManagerInterface::does_evse_exist ( int32_t  id) const
pure virtual

Check if an evse with id exists.

Implemented in ocpp::v2::EvseManager.

◆ end()

virtual EvseIterator ocpp::v2::EvseManagerInterface::end ( )
pure virtual

Gets an iterator pointing past the last evse.

Implemented in ocpp::v2::EvseManager.

◆ get_evse() [1/2]

virtual const EvseInterface & ocpp::v2::EvseManagerInterface::get_evse ( int32_t  id) const
pure virtual

Get a const reference to the evse with id.

Note
If id is not present this could throw an EvseOutOfRangeException

Implemented in ocpp::v2::EvseManager.

◆ get_evse() [2/2]

virtual EvseInterface & ocpp::v2::EvseManagerInterface::get_evse ( int32_t  id)
pure virtual

Get a reference to the evse with id.

Note
If id is not present this could throw an EvseOutOfRangeException

Implemented in ocpp::v2::EvseManager.

◆ get_number_of_evses()

virtual size_t ocpp::v2::EvseManagerInterface::get_number_of_evses ( ) const
pure virtual

Get the number of evses.

Implemented in ocpp::v2::EvseManager.

◆ get_transaction_evseid()

virtual std::optional< int32_t > ocpp::v2::EvseManagerInterface::get_transaction_evseid ( const CiString< 36 > &  transaction_id) const
pure virtual

Get evseid for the given transaction id.

Parameters
transaction_idThe transactionid
Returns
The evse id belonging the the transaction id. std::nullopt if there is no transaction with the given transaction id.

Implemented in ocpp::v2::EvseManager.

◆ is_valid_evse()

virtual bool ocpp::v2::EvseManagerInterface::is_valid_evse ( const EVSE evse) const
pure virtual

Check if the given evse is valid.

Parameters
evseThe evse to check.
Returns
True when evse is valid.

Implemented in ocpp::v2::EvseManager.


The documentation for this class was generated from the following file: