Skip to main content
Open topic with navigation CAPL Functions » Smart Charging » SCC Modeling Libraries (Simulation Setup) » V2G Simulation Data (write) » EV Functions » SCC_SetChargingProfileData

SCC_SetChargingProfileData

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long SCC_SetChargingProfileData(long Index, long Start, double MaxPower, long NumberOfPhases);

Description

This function allows to dynamically adapt a pre-loaded ChargingProfile to the SASchedule previously received from an EVSE. It overwrites the fields ChargingProfileEntryStart, ChargingProfileEntryMaxPower and/or ChargingProfileEntryMaxNumberOfPhasesInUse in a pre-loaded ChargingProfile of a PowerDeliveryReq (start) message. The ChargingProfile must have previously been loaded from the vehicle XML-config by calling SCC_SetOptionalParameterFromConfig. An error will be returned if no profile has been loaded. Note
  • This function is only available in passive mode (EV messages are created by application code).
  • This function does not create any missing optional fields or new entries.

Parameters

  • Index: The index of the ProfileEntry to be modified, starting at 0 (zero). An error will be returned if the index is invalid.
  • Start: The new value for ChargingProfileEntryStart. No changes will be made if the value is < 0.
  • MaxPower: The new value for ChargingProfileEntryMaxPower. No changes will be made if the value is < 0.
  • NumberOfPhases: The new value for ChargingProfileEntryMaxNumberOfPhasesInUse. This optional field must already exist in the (XML) profile, it will not be created. No changes will be made if the value is \< 0.

Return Values

  • 0: error
  • 1: success

Example

Example
// create a PowerDeliveryReq message
SCC_CreatePowerDeliveryReqAC_ISO( SessionId, "Start", SAScheduleTupleId);
// add the ChargingProfile from the XML config section #10
SCC_SetOptionalParameterFromConfig(0, 10);
// modify only the MaxPower value of entry #1
SCC_SetChargingProfileData(1, -1, 3000.0, -1)
// send the modified message
SCC_SendPreparedMessage();
SCC_CreatePowerDeliveryReqAC_ISOSCC_CreatePowerDeliveryReqDC_ISO