Skip to main content

SomeIpSDSetServiceStatus

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long SomeIpSDSetServiceStatus( dword psiHandle, long up );

Description

The status of the Provided Service Instance is set at the node (producer).

Parameters

  • psiHandle: Handle of the required Consumed Service Instance (see SomeIpCreateProvidedServiceInstance).
  • up:
    • 1: The status is changed to up. The sending of OfferServices is started.
    • 0: The status is changed to down. A StopOfferService message is sent if the service was previously in up status.

Return Values

  • 0: The function was successfully executed
  • >0: Error code

Example

dword appEndpointHandle;
dword serviceHandle;

appEndpointHandle = SomeIpOpenLocalApplicationEndpoint(kUDP, 30501);
serviceHandle  = SomeIpCreateConsumedServiceInstance(appEndpointHandle, 1 /*serviceId*/, 1 /*instanceId*/);
SomeIpSDSetServiceStatus(serviceHandle, 0); //do not offer this service
See Also