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

# CAPLfunctionSDSetAddress

# SD\_SetAddress (obsolete)

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

## Function Syntax

* `long SD_SetAddress(serviceConsumerRef * consumer, addressHandle address, serviceConsumerRef * simulatedEndpoint); // from 1`
* `long SD_SetAddress(serviceConsumerRef * consumer, addressHandle address, serviceProviderRef * simulatedEndpoint); // from 2`
* `long SD_SetAddress(serviceProviderRef * provider, addressHandle address, serviceConsumerRef * simulatedEndpoint); // from 3`
* `long SD_SetAddress(serviceProviderRef * provider, addressHandle address, serviceProviderRef * simulatedEndpoint); // from 4`

## Description

Sets the address for an endpoint, normally after it has been added dynamically to a service. The address can be created with binding specific functions. The third parameter is the simulated endpoint where the new endpoint has been discovered and where the address for the new endpoint is now known.

## Parameters

* **consumer**: Consumer endpoint of which the address shall be set.
* **provider**: Provider endpoint of which the address shall be set.
* **address**: Address for the endpoint.
* **simulatedEndpoint**: Endpoint from which the function is called.

## Return Values

* **0**: Success
* **1**: The service does not allow dynamic endpoint changes
* **\< 0**: Other error, e.g. variable not initialized

## Example

```plaintext theme={null}
SD_SetAddress(newProvider, Abstract_CreateAddress(MirrorAdjustment, "RearMirror"), MirrorAdjustment[CANoe]);
```

[Programming with the Communication Concept (C#, Python and CAPL)](../../../CANoeCANalyzer/CommunicationConcept/Programming/CCP.md) • [Abstract\_CreateAddress](CAPLfunctionAbstractCreateAddress.md) • [SD\_AddProvider](CAPLfunctionSDAddProvider.md) • [SD\_AddConsumer](CAPLfunctionSDAddConsumer.md)


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