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

Public Member Functions

virtual std::vector< CompositeScheduleget_all_composite_schedules (const int32_t duration, const ChargingRateUnitEnum &unit)=0
 Gets composite schedules for all evse_ids (including 0) for the given duration and unit . If no valid profiles are given for an evse for the specified period, the composite schedule will be empty for this evse. More...
 
virtual void delete_transaction_tx_profiles (const std::string &transaction_id)=0
 for the given transaction_id removes the associated charging profile. More...
 
virtual SetChargingProfileResponse conform_validate_and_add_profile (ChargingProfile &profile, int32_t evse_id, ChargingLimitSourceEnum charging_limit_source=ChargingLimitSourceEnum::CSO, AddChargingProfileSource source_of_request=AddChargingProfileSource::SetChargingProfile)=0
 validates the given profile according to the specification, adding it to our stored list of profiles if valid. More...
 
virtual ProfileValidationResultEnum conform_and_validate_profile (ChargingProfile &profile, int32_t evse_id, AddChargingProfileSource source_of_request=AddChargingProfileSource::SetChargingProfile)=0
 validates the given profile according to the specification. If a profile does not have validFrom or validTo set, we conform the values to a representation that fits the spec. More...
 
virtual GetCompositeScheduleResponse get_composite_schedule (const GetCompositeScheduleRequest &request)=0
 Gets a composite schedule based on the given request. More...
 
virtual std::optional< CompositeScheduleget_composite_schedule (int32_t evse_id, std::chrono::seconds duration, ChargingRateUnitEnum unit)=0
 Gets a composite schedule based on the given parameters. More...
 
- Public Member Functions inherited from ocpp::v2::MessageHandlerInterface
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

◆ conform_and_validate_profile()

virtual ProfileValidationResultEnum ocpp::v2::SmartChargingInterface::conform_and_validate_profile ( ChargingProfile profile,
int32_t  evse_id,
AddChargingProfileSource  source_of_request = AddChargingProfileSource::SetChargingProfile 
)
pure virtual

validates the given profile according to the specification. If a profile does not have validFrom or validTo set, we conform the values to a representation that fits the spec.

Implemented in ocpp::v2::SmartCharging.

◆ conform_validate_and_add_profile()

virtual SetChargingProfileResponse ocpp::v2::SmartChargingInterface::conform_validate_and_add_profile ( ChargingProfile profile,
int32_t  evse_id,
ChargingLimitSourceEnum  charging_limit_source = ChargingLimitSourceEnum::CSO,
AddChargingProfileSource  source_of_request = AddChargingProfileSource::SetChargingProfile 
)
pure virtual

validates the given profile according to the specification, adding it to our stored list of profiles if valid.

Implemented in ocpp::v2::SmartCharging.

◆ delete_transaction_tx_profiles()

virtual void ocpp::v2::SmartChargingInterface::delete_transaction_tx_profiles ( const std::string &  transaction_id)
pure virtual

for the given transaction_id removes the associated charging profile.

Implemented in ocpp::v2::SmartCharging.

◆ get_all_composite_schedules()

virtual std::vector< CompositeSchedule > ocpp::v2::SmartChargingInterface::get_all_composite_schedules ( const int32_t  duration,
const ChargingRateUnitEnum &  unit 
)
pure virtual

Gets composite schedules for all evse_ids (including 0) for the given duration and unit . If no valid profiles are given for an evse for the specified period, the composite schedule will be empty for this evse.

Parameters
durationof the request from. Composite schedules will be retrieved from now to (now + duration)
unitof the period entries of the composite schedules
Returns
vector of composite schedules, one for each evse_id including 0.

Implemented in ocpp::v2::SmartCharging.

◆ get_composite_schedule() [1/2]

virtual GetCompositeScheduleResponse ocpp::v2::SmartChargingInterface::get_composite_schedule ( const GetCompositeScheduleRequest request)
pure virtual

Gets a composite schedule based on the given request.

Parameters
requestspecifies different options for the request
Returns
GetCompositeScheduleResponse containing the status of the operation and the composite schedule if the operation was successful

Implemented in ocpp::v2::SmartCharging.

◆ get_composite_schedule() [2/2]

virtual std::optional< CompositeSchedule > ocpp::v2::SmartChargingInterface::get_composite_schedule ( int32_t  evse_id,
std::chrono::seconds  duration,
ChargingRateUnitEnum  unit 
)
pure virtual

Gets a composite schedule based on the given parameters.

Note
This will ignore TxDefaultProfiles and TxProfiles if no transaction is active on evse_id
Parameters
evse_idEvse to get the schedule for
durationHow long the schedule should be
unitChargingRateUnit to thet the schedule for
Returns
the composite schedule if the operation was successful, otherwise nullopt

Implemented in ocpp::v2::SmartCharging.


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