9#include "component_state_manager.hpp"
10#include "database_handler.hpp"
11#include <ocpp/v2/ocpp_enums.hpp>
18enum class ConnectorEvent {
29namespace conversions {
32std::string connector_event_to_string(ConnectorEvent e);
45 std::shared_ptr<ComponentStateManagerInterface> component_state_manager;
48 std::mutex status_mutex;
55 Connector(
const int32_t evse_id,
const int32_t connector_id,
56 std::shared_ptr<ComponentStateManagerInterface> component_state_manager);
Represents a Connector, thus electrical outlet on a Charging Station. Single physical Connector.
Definition: connector.hpp:36
OperationalStatusEnum get_effective_operational_status()
Gets the effective Operative/Inoperative status of this connector.
Definition: connector.cpp:97
Connector(const int32_t evse_id, const int32_t connector_id, std::shared_ptr< ComponentStateManagerInterface > component_state_manager)
Construct a new Connector object.
Definition: connector.cpp:42
ConnectorStatusEnum get_effective_connector_status()
Gets the effective Available/Unavailable/Faulted/Reserved/Occupied status of this connector.
Definition: connector.cpp:101
void submit_event(ConnectorEvent event)
Adjust the state of the connector according to the event that was submitted.
Definition: connector.cpp:47
void restore_connector_operative_status()
Restores the operative status of the connector to the persisted status and recomputes its effective s...
Definition: connector.cpp:82
void set_connector_operative_status(OperationalStatusEnum new_status, bool persist)
Switches the operative status of the connector and recomputes its effective status.
Definition: connector.cpp:77