> ## 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.

# CAPLfunctionOnSDServiceDiscovery

# on SD\_service\_discovery (obsolete)

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

## Function Syntax

```
on SD_service_discovery <Service>;
```

## Description

The event procedure is called when service discovery is triggered by a consumer.

## Parameters

* **`<Service>`**: Designates the Service on which the event procedure shall react.

## Selectors

* **consumer**: Consumer which triggered the service discovery, the type is [serviceConsumerRef \*](../Objects/CAPLfunctionServiceConsumerRef.md)

## Example

```plaintext theme={null}
on SD_service_discovery Mirrors::MirrorAdjustment
{
  dword i;
  for (i = 0; i < getNrOfCOProviders(MirrorAdjustment); ++i)
  {
    SD_AnnounceProvider(MirrorAdjustment.providerSide[this.consumer.ConsumerIndex, i]);
  }
}
```

[Programming with the Communication Concept (C#, Python and CAPL)](../../../CANoeCANalyzer/CommunicationConcept/Programming/CCP.md) • [on SD\_consumer\_discovered](CAPLfunctionOnSDConsumerDiscovered.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.