# null

[Open topic with navigation](../../../../../CANoeDEFamily.htm#Topics/CAPLFunctions/SmartCharging/CCSBindingFunctions/CAPLfunctionISO20SetNextResponseCode.md)

# SetNextResponseCode

[CAPL Functions](../../CAPLfunctions.md) » [Smart Charging](../CAPLFunctionsSmartChargingOverview.md) » [CCS (Communication Setup)](../CAPLFunctionsSmartChargingOverview.md#BMCCS) » [EVSE Functions](../CAPLFunctionsSmartChargingOverview.md#CCSGeneral) » SetNextResponseCode

Valid for:  CANoe DE • CANoe4SW DE

## Function Syntax

```plaintext
MethodReturnValueType SetNextResponseCode(ISO20ResponseCodeType ISO20ResponseCode);
MethodReturnValueType SetNextResponseCode(SAPResponseCodeType SAPResponseCode);
```

## Description

This function is used on the respective embedded member to overwrite the next ResponseCode sent in a response message. It is available for the following embedded members:

* SAP
* ISO20
* ScheduleRenegotiation (using the ISO20ResponseCodeType)

## Parameters

**SAPResponseCode**

Enum with following values:

* 0 = OK\_SuccessfulNegotiation
* 1 = OK\_SuccessfulNegotiationWithMinorDeviation
* 2 = FAILED\_NoNegotiation

**ISO20ResponseCode**

Enum with following values:

* 0 = OK

* 1 = OK\_CertificateExpiresSoon

* 2 = OK\_NewSessionEstablished

* 3 = OK\_OldSessionJoined

* 4 = OK\_PowerToleranceConfirmed

* 5 = WARNING\_AuthorizationSelectionInvalid

* 6 = WARNING\_CertificateExpired

* 7 = WARNING\_CertificateNotYetValid

* 8 = WARNING\_CertificateRevoked

* 9 = WARNING\_CertValidationError

* 10 = WARNING\_ChallengeInvalid

* 11 = WARNING\_EIMAuthorizationFailure

* 12 = WARNING\_E\_MSPUnknown

* 13 = WARNING\_EVPowerProfileViolation

* 14 = WARNING\_GeneralPNCAuthorizationError

* 15 = WARNING\_NoCertificateAvailable

* 16 = WARNING\_NoContractMatchingPCIDFound

* 17 = WARNING\_PowerToleranceNotConfirmed

* 18 = WARNING\_ScheduleRenegotiationFailed

* 19 = WARNING\_StandbyNotAllowed

* 20 = WARNING\_WPT

* 21 = FAILED

* 22 = FAILED\_AssociationError

* 24 = FAILED\_EVPowerProfileInvalid

* 25 = FAILED\_EVPowerProfileViolation

* 26 = FAILED\_MeteringSignatureNotValid

* 27 = FAILED\_NoEnergyTransferServiceSelected

* 28 = FAILED\_NoServiceRenegotiationSupported

* 29 = FAILED\_PauseNotAllowed

* 30 = FAILED\_PowerDeliveryNotApplied

* 31 = FAILED\_PowerToleranceNotConfirmed

* 32 = FAILED\_ScheduleRenegotiation

* 33 = FAILED\_ScheduleSelectionInvalid

* 34 = FAILED\_SequenceError

* 35 = FAILED\_ServiceIDInvalid

* 36 = FAILED\_ServiceSelectionInvalid

* 37 = FAILED\_SignatureError

* 38 = FAILED\_UnknownSession

* 39 = FAILED\_WrongChargeParameter

## Return Values

**MethodReturnValueType**

All function calls (except for indications) will return a MethodReturnValueType indicating whether the call was successful or not. Possible values:

* 0: OK
* 1: InvalidArgument
* 2: NoMatchingElementFound
* 3: UnknownError

## Example

—
