3.16 Get Composite Schedule
The GetCompositeSchedule message in OCPP 1.6J is sent by the central system to request a combined charging schedule from the charge point, which includes multiple charging profiles. The request may specify a time period, and the charge point responds with the composite schedule, detailing active charging profiles and their parameters. This helps the central system monitor and adjust charging behavior.
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
SetGetCompositeScheduleStatus | This function updates the status field in the GetCompositeSchedule_response_t structure based on the provided Status. It is used to indicate whether the schedule was accepted or rejected. | GET_COMPOSITE_SCHEDULE_STATUS_T status | void |
Example:
if ((RX_GET_COMPOSITE_SCHEDULE_STATUS_T)responsecode == RX_GET_COMPOSITE_SCHEDULE_MISSING_CONNECTOR_ID)
{
SetGetCompositeScheduleStatus(GET_COMPOSITE_SCHEDULE_REJECTED);
}
else if ((RX_GET_COMPOSITE_SCHEDULE_STATUS_T)responsecode == RX_GET_COMPOSITE_SCHEDULE_MISSING_DURATION)
{
SetGetCompositeScheduleStatus(GET_COMPOSITE_SCHEDULE_REJECTED);
}
else
{
GetGetCompositeScheduleParams(&compositeparams);
/* GetSetChargingProfileParams(¶ms[chargingprofilecount]); */
LogDebug("APP_LOG", " GetCompositeSchedule Params connectorId: %d duration: %d chargingRateUnit: %s \n", compositeparams.connectorId, compositeparams.duration, GetChargingRateUnitType(compositeparams.chargingRateUnit));
(void)CreateCompositeScheduleResponse(&compositeparams);
SetGetCompositeScheduleStatus(GET_COMPOSITE_SCHEDULE_ACCEPTED);
}
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
GetGetCompositeScheduleParams | This function copies the parameters from the global RX_GetCompositeSchedule_t structure to the provided Params structure. It includes the connector ID, duration and charging rate unit. | RX_GETCOMPOSITESCHEDULE_T *params | void |
Example:
else
{
GetGetCompositeScheduleParams(&compositeparams);
/* GetSetChargingProfileParams(¶ms[chargingprofilecount]); */
LogDebug("APP_LOG", " GetCompositeSchedule Params connectorId: %d duration: %d chargingRateUnit: %s \n", compositeparams.connectorId, compositeparams.duration, GetChargingRateUnitType(compositeparams.chargingRateUnit));
CreateCompositeScheduleResponse(&compositeparams);
SetGetCompositeScheduleStatus(GET_COMPOSITE_SCHEDULE_ACCEPTED);
}
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
GetCompositeScheduleInit | This function sets the initial status of the GetCompositeSchedule response to GET_COMPOSITE_SCHEDULE_REJECTED. It should be called at the beginning of processing a new GetCompositeSchedule request. | void | void |
Example:
void OCPPMessagesInit(void)
{
DataTransferInit();
ResetInit();
MeterValueStructInit();
SetLocalListVersionNumber(DEFAULT_SEND_LOCAL_LIST_VERSION);
SetChargePointConnectorId(CHARGEPOINT_DEFAULT_CONTROLLER);
ChargePointStatusInit();
(void)SetAuthorizeStatus(AUTHORIZE_INVALID);
SetOCPPWebsocketOnlineMode();
UnlockConnectorInit();
ReserveNowInit();
ChangeAvailabilityInit();
ClearCacheInit();
ChangeConfigurationInit();
CancelReservationInit();
GetAllIDsFromDB();
CheckAndStartClockAlignedMeterValueTimer();
ClearChargingProfileInit();
GetCompositeScheduleInit();
GetLocalListVersionInit();
SendLocalListInit();
SetChargingProfileInit();
TriggerMessageInit();
RemoteStopTransactionInit();
RemoteStartTransactionInit();
}
|
Syntax |
Description |
Constants/Members |
|---|---|---|
GETCOMPOSITESCHEDULE_RESPONSE_T | Structure for GetCompositeSchedule response data | GET_COMPOSITE_SCHEDULE_STATUS_T status; int16_t connectorId; char scheduleStart[]; CHARGEINGSCHEDULE_DATA_T chargingSchedule; |
RX_GETCOMPOSITESCHEDULE_T | Structure for received GetCompositeSchedule request data | char uuid[]; uint16_t connectorId; uint32_t duration; CHARGING_RATE_UNIT_TYPE_T chargingRateUnit[]; |
CHARGEINGSCHEDULE_DATA_T | Structure to define the data for charging schedule | uint32_t duration; char startSchedule[]; char chargingRateUnit CHARGEINGSCHEDULEPERIOD_DATA_T *chargingSchedulePeriod float minChargingRate; |
CHARGING_RATE_UNIT_TYPE_T | Enumeration for charging rate unit types | CHARGING_RATE_UNIT_TYPE_A CHARGING_RATE_UNIT_TYPE_W CHARGING_RATE_UNIT_TYPE_NA |
RX_GET_COMPOSITE_SCHEDULE_STATUS_T | Enumeration for GetCompositeSchedule request processing status | RX_GET_COMPOSITE_SCHEDULE_MISSING_CONNECTOR_ID RX_GET_COMPOSITE_SCHEDULE_MISSING_DURATION RX_GET_COMPOSITE_SCHEDULE_GOOD |
GET_COMPOSITE_SCHEDULE_STATUS_T | Enumeration for possible GetCompositeSchedule status responses | GET_COMPOSITE_SCHEDULE_ACCEPTED GET_COMPOSITE_SCHEDULE_REJECTED |
