|
ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
|
Contains transactions for all available connectors and manages access to these transactions. More...
#include <transaction.hpp>
Public Member Functions | |
| TransactionHandler (int32_t number_of_connectors) | |
Creates and manages transactions for the provided number_of_connectors. | |
| int32_t | get_negative_random_transaction_id () |
| Returns a negative random transaction_id. | |
| void | add_transaction (std::shared_ptr< Transaction > transaction) |
Adds the given transaction the vector of transactions. | |
| void | add_stopped_transaction (int32_t connector) |
Adds the transaction at the connector to the vector of stopped transactions. | |
| bool | remove_active_transaction (int32_t connector) |
Removes a transaction from the provided connector. More... | |
| void | erase_stopped_transaction (std::string stop_transaction_message_id) |
Erases a transaction with the provided stop_transaction_message_id. | |
| std::shared_ptr< Transaction > | get_transaction (int32_t connector) |
Returns the transaction associated with the transaction at the provided connector. More... | |
| std::shared_ptr< Transaction > | get_transaction (const std::string &start_transaction_message_id) |
Returns the transaction associated with the transaction with the provided start_transaction_message_id. More... | |
| std::shared_ptr< Transaction > | get_transaction_from_id_tag (const std::string &id_tag) |
| Returns the transaction associated with the given id tag. More... | |
| int32_t | get_connector_from_transaction_id (int32_t transaction_id) |
Provides the connector on which a transaction with the given transaction_id is running. More... | |
| void | add_meter_value (int32_t connector, const MeterValue &meter_value) |
Adds a clock aligned meter_value to the transaction on the provided connector. | |
| void | change_meter_values_sample_intervals (int32_t interval) |
Modifies the sample interval of the meter values sample timer on all connectors. The provided interval is expected to be given in seconds. | |
| std::optional< CiString< 20 > > | get_authorized_id_tag (const std::string &stop_transaction_message_id) |
| bool | transaction_active (int32_t connector) |
Indicates if there is an active transaction at the proveded connector. More... | |
Contains transactions for all available connectors and manages access to these transactions.
| std::optional< CiString< 20 > > ocpp::v16::TransactionHandler::get_authorized_id_tag | ( | const std::string & | stop_transaction_message_id | ) |
stop_transaction_message_id
| int32_t ocpp::v16::TransactionHandler::get_connector_from_transaction_id | ( | int32_t | transaction_id | ) |
Provides the connector on which a transaction with the given transaction_id is running.
| std::shared_ptr< Transaction > ocpp::v16::TransactionHandler::get_transaction | ( | const std::string & | start_transaction_message_id | ) |
Returns the transaction associated with the transaction with the provided start_transaction_message_id.
| std::shared_ptr< Transaction > ocpp::v16::TransactionHandler::get_transaction | ( | int32_t | connector | ) |
Returns the transaction associated with the transaction at the provided connector.
| std::shared_ptr< Transaction > ocpp::v16::TransactionHandler::get_transaction_from_id_tag | ( | const std::string & | id_tag | ) |
Returns the transaction associated with the given id tag.
| id_tag | The id tag. |
| bool ocpp::v16::TransactionHandler::remove_active_transaction | ( | int32_t | connector | ) |
Removes a transaction from the provided connector.
| bool ocpp::v16::TransactionHandler::transaction_active | ( | int32_t | connector | ) |
Indicates if there is an active transaction at the proveded connector.