# null

# diagInterpretRespAs

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE

## Function Syntax

```c
long diagInterpretRespAs(diagRequest response, char primitiveQualifier[]);
```

## Method Syntax

[Method](../../../Shared/CAPL/General/ClassesAndObjects.md) Syntax

```c
diagRequest::InterpretRespAs(char primitiveQualifier[]);
```

## Description

Treats the data of the request's response as the specified primitive. This will cause a reinterpretation of the data, but the data will **not** be changed.

**Note**: The specified primitive must be defined for the service the response currently refers to! Please refer to [diagnostic descriptions with overloaded responses](../CAPLfunctionsDiagnosticsDescriptionsOverloadResponses.md) for details.

## Parameters

* **request**: Request that has to contain a response object received by waiting for a response.
* **primitiveQualifier**: Qualifier of the service primitive that should be used for reinterpretation.

## Return Values

* **0**: No error, OK
* **`< 0`**: [Error code](../CAPLfunctionsDiagnosticsErrorCode.md)

## Example

A tester module tries to interpret the response received for a request.

```plaintext
if( 1 == testWaitForDiagResponse( request, 2000))
{ 
   if( 0 == diagInterpretRespAs( request, "ServiEcu1PR"))
   {
      if( 27.5 < diagGetRespParameter( request, "Voltage"))
         TestStepPass( "Voltage is high enough");
      else
         TestStepFail( "Voltage too low");
   } else
   { 
      TestStepFail( "Unexpected response version");
   }
} else
{ 
   TestStepFail( "No response received");
}
```
