The generated Proxy/Skeleton API provides the abstract base classes to implement the service skeleton:

  1. Open the folder you defined as SRC_GEN_DIR.
  2. Go to the relevant skeleton classes for your executable.
  3. Find the class your skeleton should inherit from.
  4. In your application create a class that inherits from the skeleton class.

Example Code

// class declaration in header file
class PPortExampleServiceProvider : public services::exampleservice::skeleton::ExampleServiceSkeleton {..}

// main cpp file
PPortExampleServiceProvider::PPortExampleServiceProvider(ara::core::InstanceSpecifier instance_specifier)
  :services::exampleservice::skeleton::ExampleServiceSkeleton(instance_specifier) {…}

Offer/Stop a Service

The service must be instantiated with a corresponding InstanceSpecifier and then offered on the server side using OfferService(). To stop the service, StopOfferService() can be called.

Update Values

On the server side, a callback is defined to handle updates from clients (RegisterSetHandler()), and an update method (Update()) is called to publish new values to clients.