ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Member Functions | Public Attributes | List of all members
ocpp::v2::EnhancedTransaction Struct Reference

Struct that enhances the OCPP Transaction by some meta data and functionality. More...

#include <transaction.hpp>

Inheritance diagram for ocpp::v2::EnhancedTransaction:
ocpp::v2::Transaction

Public Member Functions

 EnhancedTransaction (DatabaseHandler &database_handler, bool database_enabled)
 
int32_t get_seq_no ()
 Get the current sequence number of the transaction message. More...
 
Transaction get_transaction ()
 
void update_charging_state (const ChargingStateEnum charging_state)
 Update the charging state of the transaction. More...
 
void set_id_token_sent ()
 

Public Attributes

bool id_token_sent = false
 
int32_t connector_id = 0
 
int32_t seq_no = 0
 
std::optional< float > active_energy_import_start_value
 
DateTime start_time
 
bool check_max_active_import_energy = false
 
ClockAlignedTimer sampled_tx_updated_meter_values_timer
 
ClockAlignedTimer sampled_tx_ended_meter_values_timer
 
ClockAlignedTimer aligned_tx_updated_meter_values_timer
 
ClockAlignedTimer aligned_tx_ended_meter_values_timer
 
- Public Attributes inherited from ocpp::v2::Transaction
CiString< 36 > transactionId
 
std::optional< CustomData > customData
 
std::optional< ChargingStateEnum > chargingState
 
std::optional< int32_t > timeSpentCharging
 
std::optional< ReasonEnum > stoppedReason
 
std::optional< int32_t > remoteStartId
 

Detailed Description

Struct that enhances the OCPP Transaction by some meta data and functionality.

Member Function Documentation

◆ get_seq_no()

int32_t ocpp::v2::EnhancedTransaction::get_seq_no ( )

Get the current sequence number of the transaction message.

This method also increments the sequence number.

Returns
int32_t seq number

◆ update_charging_state()

void ocpp::v2::EnhancedTransaction::update_charging_state ( const ChargingStateEnum  charging_state)

Update the charging state of the transaction.

Also update the charging state in the database

Parameters
charging_state

The documentation for this struct was generated from the following files: