ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Member Functions | List of all members
ocpp::v2::ConnectivityManagerInterface Class Referenceabstract
Inheritance diagram for ocpp::v2::ConnectivityManagerInterface:
ocpp::v2::ConnectivityManager

Public Member Functions

virtual void set_websocket_authorization_key (const std::string &authorization_key)=0
 Set the websocket authorization_key. More...
 
virtual void set_websocket_connection_options (const WebsocketConnectionOptions &connection_options)=0
 Set the websocket connection_options. More...
 
virtual void set_websocket_connection_options_without_reconnect ()=0
 Set the websocket connection options without triggering a reconnect. More...
 
virtual void set_websocket_connected_callback (WebsocketConnectionCallback callback)=0
 Set the callback that is called when the websocket is connected. More...
 
virtual void set_websocket_disconnected_callback (WebsocketConnectionCallback callback)=0
 Set the callback that is called when the websocket is disconnected. More...
 
virtual void set_websocket_connection_failed_callback (WebsocketConnectionFailedCallback callback)=0
 Set the callback that is called when the websocket could not connect with a specific reason. More...
 
virtual void set_configure_network_connection_profile_callback (ConfigureNetworkConnectionProfileCallback callback)=0
 Set the callback that is called to configure a network connection profile when none is configured. More...
 
virtual std::optional< NetworkConnectionProfileget_network_connection_profile (const int32_t configuration_slot) const =0
 Gets the cached NetworkConnectionProfile based on the given configuration_slot. This returns the value from the cached network connection profiles. More...
 
virtual std::optional< int32_t > get_priority_from_configuration_slot (const int configuration_slot) const =0
 Get the priority of the given configuration slot. More...
 
virtual const std::vector< int > & get_network_connection_slots () const =0
 Get the network connection slots sorted by priority. Each item in the vector contains the configured configuration slots, where the slot with index 0 has the highest priority. More...
 
virtual bool is_websocket_connected ()=0
 Check if the websocket is connected. More...
 
virtual void connect (std::optional< int32_t > network_profile_slot=std::nullopt)=0
 Connect to the websocket. More...
 
virtual void disconnect ()=0
 Disconnect the websocket. More...
 
virtual bool send_to_websocket (const std::string &message)=0
 send a message over the websocket More...
 
virtual void on_network_disconnected (OCPPInterfaceEnum ocpp_interface)=0
 Can be called when a network is disconnected, for example when an ethernet cable is removed. More...
 
virtual void on_charging_station_certificate_changed ()=0
 Called when the charging station certificate is changed. More...
 
virtual void confirm_successful_connection ()=0
 Confirms the connection is successful so the security profile requirements can be handled. More...
 

Member Function Documentation

◆ confirm_successful_connection()

virtual void ocpp::v2::ConnectivityManagerInterface::confirm_successful_connection ( )
pure virtual

Confirms the connection is successful so the security profile requirements can be handled.

Implemented in ocpp::v2::ConnectivityManager.

◆ connect()

virtual void ocpp::v2::ConnectivityManagerInterface::connect ( std::optional< int32_t >  network_profile_slot = std::nullopt)
pure virtual

Connect to the websocket.

Parameters
configuration_slotOptional the network_profile_slot to connect to. std::nullopt will select the slot internally.

Implemented in ocpp::v2::ConnectivityManager.

◆ disconnect()

virtual void ocpp::v2::ConnectivityManagerInterface::disconnect ( )
pure virtual

Disconnect the websocket.

Implemented in ocpp::v2::ConnectivityManager.

◆ get_network_connection_profile()

virtual std::optional< NetworkConnectionProfile > ocpp::v2::ConnectivityManagerInterface::get_network_connection_profile ( const int32_t  configuration_slot) const
pure virtual

Gets the cached NetworkConnectionProfile based on the given configuration_slot. This returns the value from the cached network connection profiles.

Returns
Returns a profile if the slot is found

Implemented in ocpp::v2::ConnectivityManager.

◆ get_network_connection_slots()

virtual const std::vector< int > & ocpp::v2::ConnectivityManagerInterface::get_network_connection_slots ( ) const
pure virtual

Get the network connection slots sorted by priority. Each item in the vector contains the configured configuration slots, where the slot with index 0 has the highest priority.

Returns
The network connection slots

Implemented in ocpp::v2::ConnectivityManager.

◆ get_priority_from_configuration_slot()

virtual std::optional< int32_t > ocpp::v2::ConnectivityManagerInterface::get_priority_from_configuration_slot ( const int  configuration_slot) const
pure virtual

Get the priority of the given configuration slot.

Parameters
configuration_slotThe configuration slot to get the priority from.
Returns
The priority if the configuration slot exists.

Implemented in ocpp::v2::ConnectivityManager.

◆ is_websocket_connected()

virtual bool ocpp::v2::ConnectivityManagerInterface::is_websocket_connected ( )
pure virtual

Check if the websocket is connected.

Returns
True is the websocket is connected, else false

Implemented in ocpp::v2::ConnectivityManager.

◆ on_charging_station_certificate_changed()

virtual void ocpp::v2::ConnectivityManagerInterface::on_charging_station_certificate_changed ( )
pure virtual

Called when the charging station certificate is changed.

Implemented in ocpp::v2::ConnectivityManager.

◆ on_network_disconnected()

virtual void ocpp::v2::ConnectivityManagerInterface::on_network_disconnected ( OCPPInterfaceEnum  ocpp_interface)
pure virtual

Can be called when a network is disconnected, for example when an ethernet cable is removed.

This is introduced because the websocket can take several minutes to timeout when a network interface becomes unavailable, whereas the system can detect this sooner.

Parameters
ocpp_interfaceThe interface that is disconnected.

Implemented in ocpp::v2::ConnectivityManager.

◆ send_to_websocket()

virtual bool ocpp::v2::ConnectivityManagerInterface::send_to_websocket ( const std::string &  message)
pure virtual

send a message over the websocket

Returns
true if the message was sent successfully

Implemented in ocpp::v2::ConnectivityManager.

◆ set_configure_network_connection_profile_callback()

virtual void ocpp::v2::ConnectivityManagerInterface::set_configure_network_connection_profile_callback ( ConfigureNetworkConnectionProfileCallback  callback)
pure virtual

Set the callback that is called to configure a network connection profile when none is configured.

Implemented in ocpp::v2::ConnectivityManager.

◆ set_websocket_authorization_key()

virtual void ocpp::v2::ConnectivityManagerInterface::set_websocket_authorization_key ( const std::string &  authorization_key)
pure virtual

Set the websocket authorization_key.

Implemented in ocpp::v2::ConnectivityManager.

◆ set_websocket_connected_callback()

virtual void ocpp::v2::ConnectivityManagerInterface::set_websocket_connected_callback ( WebsocketConnectionCallback  callback)
pure virtual

Set the callback that is called when the websocket is connected.

Implemented in ocpp::v2::ConnectivityManager.

◆ set_websocket_connection_failed_callback()

virtual void ocpp::v2::ConnectivityManagerInterface::set_websocket_connection_failed_callback ( WebsocketConnectionFailedCallback  callback)
pure virtual

Set the callback that is called when the websocket could not connect with a specific reason.

Implemented in ocpp::v2::ConnectivityManager.

◆ set_websocket_connection_options()

virtual void ocpp::v2::ConnectivityManagerInterface::set_websocket_connection_options ( const WebsocketConnectionOptions connection_options)
pure virtual

Set the websocket connection_options.

Implemented in ocpp::v2::ConnectivityManager.

◆ set_websocket_connection_options_without_reconnect()

virtual void ocpp::v2::ConnectivityManagerInterface::set_websocket_connection_options_without_reconnect ( )
pure virtual

Set the websocket connection options without triggering a reconnect.

Implemented in ocpp::v2::ConnectivityManager.

◆ set_websocket_disconnected_callback()

virtual void ocpp::v2::ConnectivityManagerInterface::set_websocket_disconnected_callback ( WebsocketConnectionCallback  callback)
pure virtual

Set the callback that is called when the websocket is disconnected.

Implemented in ocpp::v2::ConnectivityManager.


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