> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionDiagCheckObjectMatch

# diagCheckObjectMatch

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

## Function Syntax

```plaintext theme={null}
long diagCheckObjectMatch( diagRequest request, diagResponse response);
```

## Method Syntax

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

```plaintext theme={null}
long diagRequest::CheckObjectMatch( diagResponse response);
```

## Description

Checks if the response service id is a valid (positive or negative) response for the request.

## Parameters

* **request**: Diagnostics request
* **response**: Diagnostics response

## Return Values

* **1**: Objects match.
* **0**: Objects do not match.

[Error code](../CAPLfunctionsDiagnosticsErrorCode.md)

## Example

```plaintext theme={null}
DiagRequest AirbaContr_Read req;
DiagResponse AirbaContr_Read resp;

if( 1 == diagCheckObjectMatch( req, resp))
    write( "Request and response match!");
```
