Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/common/DefaultLocalControllerEventsHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void DefaultLocalControllerEventsHandler::chargePointConnected(std::shared_ptr<o
// Specific handling of heartbeat message
auto heartbeat_handler = [p_chargepoint](const ocpp::messages::HeartbeatReq& request,
ocpp::messages::HeartbeatConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message)
{
bool ret = true;
Expand All @@ -71,12 +71,10 @@ void DefaultLocalControllerEventsHandler::chargePointConnected(std::shared_ptr<o
std::cout << "[" << chargepoint->identifier() << "] - Heartbeat received" << std::endl;

// Forward message
std::string error;
ret = chargepoint->centralSystemProxy()->call(request, response, error, error_message);
ret = chargepoint->centralSystemProxy()->call(request, response, error_code, error_message);
if (!ret)
{
std::cout << "[" << chargepoint->identifier() << "] - Unable to forward heartbeat" << std::endl;
error_code = error.c_str();
}
}
return ret;
Expand Down
56 changes: 28 additions & 28 deletions src/centralsystem/chargepoint/ChargePointHandler.cpp

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions src/centralsystem/chargepoint/ChargePointHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,144 +96,144 @@ class ChargePointHandler

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::AuthorizeReq& request,
ocpp::messages::AuthorizeConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::BootNotificationReq& request,
ocpp::messages::BootNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::DataTransferReq& request,
ocpp::messages::DataTransferConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::DiagnosticsStatusNotificationReq& request,
ocpp::messages::DiagnosticsStatusNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::FirmwareStatusNotificationReq& request,
ocpp::messages::FirmwareStatusNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::HeartbeatReq& request,
ocpp::messages::HeartbeatConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::MeterValuesReq& request,
ocpp::messages::MeterValuesConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::StartTransactionReq& request,
ocpp::messages::StartTransactionConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::StatusNotificationReq& request,
ocpp::messages::StatusNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::StopTransactionReq& request,
ocpp::messages::StopTransactionConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

// Security extensions

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::LogStatusNotificationReq& request,
ocpp::messages::LogStatusNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::SecurityEventNotificationReq& request,
ocpp::messages::SecurityEventNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::SignCertificateReq& request,
ocpp::messages::SignCertificateConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool handleMessage(const ocpp::messages::SignedFirmwareStatusNotificationReq& request,
ocpp::messages::SignedFirmwareStatusNotificationConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

private:
Expand Down
4 changes: 2 additions & 2 deletions src/centralsystem/chargepoint/ChargePointProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,12 +1059,12 @@ void ChargePointProxy::rpcError()
/** @copydoc bool IRpc::IListener::rpcCallReceived(const std::string&,
const rapidjson::Value&,
rapidjson::Document&,
const char*&,
std::string&,
std::string&) */
bool ChargePointProxy::rpcCallReceived(const std::string& action,
const rapidjson::Value& payload,
rapidjson::Document& response,
const char*& error_code,
std::string& error_code,
std::string& error_message)
{
return m_msg_dispatcher.dispatchMessage(action, payload, response, error_code, error_message);
Expand Down
4 changes: 2 additions & 2 deletions src/centralsystem/chargepoint/ChargePointProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ class ChargePointProxy : public ICentralSystem::IChargePoint, public ocpp::rpc::
/** @copydoc bool IRpc::IListener::rpcCallReceived(const std::string&,
const rapidjson::Value&,
rapidjson::Document&,
const char*&,
std::string&,
std::string&) */
bool rpcCallReceived(const std::string& action,
const rapidjson::Value& payload,
rapidjson::Document& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

// IRpc::ISpy interface
Expand Down
4 changes: 2 additions & 2 deletions src/chargepoint/ChargePoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@ void ChargePoint::rpcError()
/** @copydoc void IRpc::IListener::rpcCallReceived(const std::string&,
const rapidjson::Value&,
rapidjson::Document&,
const char*&,
std::string&,
std::string&) */
bool ChargePoint::rpcCallReceived(const std::string& action,
const rapidjson::Value& payload,
rapidjson::Document& response,
const char*& error_code,
std::string& error_code,
std::string& error_message)
{
return m_msg_dispatcher->dispatchMessage(action, payload, response, error_code, error_message);
Expand Down
4 changes: 2 additions & 2 deletions src/chargepoint/ChargePoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ class ChargePoint : public IChargePoint,
/** @copydoc void IRpc::IListener::rpcCallReceived(const std::string&,
const rapidjson::Value&,
rapidjson::Document&,
const char*&,
std::string&,
std::string&) */
bool rpcCallReceived(const std::string& action,
const rapidjson::Value& payload,
rapidjson::Document& response,
const char*& error_code,
std::string& error_code,
std::string& error_message) override;

/// IRpc::ISpy interface
Expand Down
4 changes: 2 additions & 2 deletions src/chargepoint/authent/AuthentCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ AuthentCache::~AuthentCache() { }

/** @copydoc bool GenericMessageHandler<RequestType, ResponseType>::handleMessage(const RequestType& request,
* ResponseType& response,
* const char*& error_code,
* std::string& error_code,
* std::string& error_message)
*/
bool AuthentCache::handleMessage(const ocpp::messages::ClearCacheReq& request,
ocpp::messages::ClearCacheConf& response,
const char*& error_code,
std::string& error_code,
std::string& error_message)
{
(void)request;
Expand Down
Loading