3.13 Change Configuration

The ChangeConfiguration message in OCPP 1.6J allows the central system to modify configuration settings on the charge point, such as communication or operational parameters. It includes the configuration key and the new value. The charge point responds to confirm whether the change was successful or if an error occurred. This helps manage charge point settings remotely.

API Syntax

Description

Input Params

Return Value

SetChangeConfigurationStatus

This function sets the status of the Change Configuration response based on the provided status value.

CHANGE_CONFIGURATION_STATUS_T status

void

Example:

	        if((strcmp(key, "MeterValuesSampledData") == 0))
        {
            LogDebug("APP_LOG", " Reboot required to reflect change configuration..\n");
            SetChangeConfigurationStatus(CHANGE_CONFIGURATION_REBOOT_REQUIRED);
        }
        else
        {
            SetChangeConfigurationStatus(CHANGE_CONFIGURATION_ACCEPTED);
        }

API Syntax

Description

Input Params

Return Value

ChangeConfigurationInit

This function initializes the Change Configuration response status to "Rejected" by default.

void

void

Example:

       void OCPPMessagesInit(void)
{
    DataTransferInit();
    ResetInit();
    MeterValueStructInit();
    SetLocalListVersionNumber(DEFAULT_SEND_LOCAL_LIST_VERSION);   
    SetChargePointConnectorId(CHARGEPOINT_DEFAULT_CONTROLLER);
    SetChargePointError(NOERROR);
    SetChargePointStatus(AVAILABLE);
    SetAuthorizeStatus(AUTHORIZE_INVALID);
    SetRemoteStartTransactionStatus(REMOTE_START_STOP_REJECTED);
    SetOCPPWebsocketOnlineMode();
    UnlockConnectorInit();
    ReserveNowInit();
    ChangeAvailabilityInit();
    ClearCacheInit();
    ChangeConfigurationInit();
    CancelReservationInit();
    GetAllIDsFromDB();
    CheckAndStartClockAlignedMeterValueTimer();
}

API Syntax

Description

Input Params

Return Value

GetChangeConfigurationParms

This function retrieves the key and value parameters from the received Change Configuration request.

char *key, char *value

void

Example:

	
    if((CHANGE_CONFIGURATION_STATUS_T)response == CHANGE_CONFIGURATION_ACCEPTED)
    {
        char key[CISTRING_50TYPE_LENGTH];    /* Key of the configuration changed. */
        char value[CISTRING_500TYPE_LENGTH]; /* New value set of the configuration key. */

        GetChangeConfigurationParms(key, value);
        /* Below check just an example on how to handle reboot required w.r.t application requirement */
        /* Below example explains whenever there is a change in MeterValuesSampledData configuration, then charepoint should 
           reboot to reflect the updated configuration */
        if((strcmp(key, "MeterValuesSampledData") == 0))
        {
            LogDebug("APP_LOG", " Reboot required to reflect change configuration..\n");
            SetChangeConfigurationStatus(CHANGE_CONFIGURATION_REBOOT_REQUIRED);
        }
        else
        {
            SetChangeConfigurationStatus(CHANGE_CONFIGURATION_ACCEPTED);
        }
        SendSetChargerConfigResponse();
    }
       	 

Syntax

Description

Constants/Members

CHANGE_CONFIGURATION_STATUS_T

This enum defines the possible statuses for a Change Configuration response.

CHANGE_CONFIGURATION_ACCEPTED

CHANGE_CONFIGURATION_REJECTED

CHANGE_CONFIGURATION_REBOOT_REQUIRED

CHANGE_CONFIGURATION_NOT_SUPPORTED

RX_CHANGECONFIGURATION_T

This structure contains the UUID, key and value for the Change Configuration request.

char uuid[];

char key[];

char value[];

char *ChangeConfigurationStatusType[]

Array to store the string representations of ChangeConfiguration statuses

Accepted

Rejected

RebootRequired

NotSupported

CHANGECONFIGURATION_RESPONSE_T

This structure contains the status of the Change Configuration response.

CHANGE_CONFIGURATION_STATUS_T status;