The generated Proxy/Skeleton API provides the classes to instantiate the service proxy. In the folder you defined as SRC_GEN_DIR you can look up the generated APIs for your application.

Example Code

// class declaration in header file
class RPortExampleServiceClient final {
public:

using TyServiceProxy = services::exampleservice::proxy::ExampleServiceProxy;

}

// use class in main cpp file
#include "rport_example_service_client.h"

void RPortExampleServiceClient::StartClient(ara::core::InstanceSpecifier example_instance_spec) noexcept {

  opt_find_service_handle_ = TyServiceProxy::StartFindService(…)
}

Subscribe to Event

When a client application connects to a server, it can subscribe to the server's service events using the Subscribe() function. When event data becomes available, the server application sends this data to the communication management middleware, which notifies all subscribed client applications.

Retrieve Event Samples

The subscribers can retrieve the event samples using GetNewSamples(), either directly or through a callback defined by SetReceiveHandler(), which is activated by the notification.

Subscribe to Value Changes

Similar to events, clients can subscribe to value changes and receive notifications using the same mechanisms (SetReceiveHandler()).

Get/Set Values

Using methods, clients can retrieve the current field value with a get-operation (Get()) or set a new field value with a set-operation (Set()).