ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Member Functions | List of all members
ocpp::v2::DataTransfer Class Reference
Inheritance diagram for ocpp::v2::DataTransfer:
ocpp::v2::DataTransferInterface ocpp::v2::MessageHandlerInterface

Public Member Functions

 DataTransfer (const FunctionalBlockContext &functional_block_context, const std::optional< std::function< DataTransferResponse(const DataTransferRequest &request)> > &data_transfer_callback, const std::chrono::seconds response_timeout)
 
void handle_message (const EnhancedMessage< MessageType > &message) override
 Handles the given message from the CSMS. This includes dispatching a CALLRESULT as a response to the incoming message . More...
 
std::optional< DataTransferResponsedata_transfer_req (const CiString< 255 > &vendorId, const std::optional< CiString< 50 > > &messageId, const std::optional< json > &data) override
 Sends a DataTransfer.req message to the CSMS using the given parameters. More...
 
std::optional< DataTransferResponsedata_transfer_req (const DataTransferRequest &request) override
 Sends a DataTransfer.req message to the CSMS using the given request. More...
 
virtual std::optional< DataTransferResponsedata_transfer_req (const CiString< 255 > &vendorId, const std::optional< CiString< 50 > > &messageId, const std::optional< json > &data)=0
 Sends a DataTransfer.req message to the CSMS using the given parameters. More...
 
virtual std::optional< DataTransferResponsedata_transfer_req (const DataTransferRequest &request)=0
 Sends a DataTransfer.req message to the CSMS using the given request. More...
 
virtual void handle_message (const EnhancedMessage< MessageType > &message)=0
 Handles the given message from the CSMS. This includes dispatching a CALLRESULT as a response to the incoming message . More...
 

Member Function Documentation

◆ data_transfer_req() [1/2]

std::optional< DataTransferResponse > ocpp::v2::DataTransfer::data_transfer_req ( const CiString< 255 > &  vendorId,
const std::optional< CiString< 50 > > &  messageId,
const std::optional< json > &  data 
)
overridevirtual

Sends a DataTransfer.req message to the CSMS using the given parameters.

Parameters
vendorId
messageId
data
Returns
DataTransferResponse containing the result from CSMS

Implements ocpp::v2::DataTransferInterface.

◆ data_transfer_req() [2/2]

std::optional< DataTransferResponse > ocpp::v2::DataTransfer::data_transfer_req ( const DataTransferRequest request)
overridevirtual

Sends a DataTransfer.req message to the CSMS using the given request.

Parameters
requestmessage shall be sent to the CSMS
Returns
DataTransferResponse containing the result from CSMS. In case no response is received from the CSMS because the message timed out or the charging station is offline, std::nullopt is returned

Implements ocpp::v2::DataTransferInterface.

◆ handle_message()

void ocpp::v2::DataTransfer::handle_message ( const EnhancedMessage< MessageType > &  message)
overridevirtual

Handles the given message from the CSMS. This includes dispatching a CALLRESULT as a response to the incoming message .

Parameters
message

Implements ocpp::v2::MessageHandlerInterface.


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