Files
cariflex/tools/EVerest-main/modules/API/RpcApi/rpc/notifications/Evse.hpp
Eric F d398a6ced2 Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter
- CitrineOS core extracted (CSMS OCPP 2.0.1)
- OpenOCPP extracted (firmware OCPP 1.6J/2.0.1)
- ShapeShifter library installed (pip install -e)
- ShapeShifter specification extracted
- EVerest extracted

TODO updated with progress
2026-06-08 00:38:27 -04:00

43 lines
1.4 KiB
C++

// SPDX-License-Identifier: Apache-2.0
// Copyright chargebyte GmbH and Contributors to EVerest
#ifndef NOTIFICATIONS_EVSE_HPP
#define NOTIFICATIONS_EVSE_HPP
#include "../../data/DataStore.hpp"
#include <jsonrpccxx/client.hpp>
namespace RPCDataTypes = types::json_rpc_api;
// forward declaration
namespace rpc {
class JsonRpc2ServerWithClient;
}
namespace notifications {
class Evse {
public:
// Constructor and Destructor
// Deleting the default constructor to ensure the class is always initialized with a DataStoreCharger object
Evse() = delete;
// This needs to take a copy of rpc_server for reference counting, not a reference to it
Evse(std::shared_ptr<rpc::JsonRpc2ServerWithClient> rpc_server, data::DataStoreCharger& dataobj, int precision = 3);
~Evse() = default;
// Notifications
void send_hardware_capabilities_changed(int32_t evse_index, const RPCDataTypes::HardwareCapabilitiesObj& hwcap);
void send_status_changed(int32_t evse_index, const RPCDataTypes::EVSEStatusObj& status);
void send_meterdata_changed(int32_t evse_index, const RPCDataTypes::MeterDataObj& meter);
private:
// Reference to the DataStoreCharger object that holds EVSE data
data::DataStoreCharger& m_dataobj;
std::shared_ptr<rpc::JsonRpc2ServerWithClient> m_rpc_server;
int m_precision = 3;
};
} // namespace notifications
#endif // NOTIFICATIONS_EVSE_HPP