Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::pubsub::SomeIpPubSubClient Class Reference

SOME/IP publish/subscribe client. More...

#include <someip_pubsub_client.h>

Public Member Functions

 SomeIpPubSubClient (helper::NetworkLayer< sd::SomeIpSdMessage > *networkLayer, uint8_t counter)
 Constructor. More...
 
void Subscribe (uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint16_t eventgroupId)
 Subscribe to an event-group. More...
 
void Unsubscribe (uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint16_t eventgroupId)
 Unsubscribe from a subscribed event-group. More...
 
bool TryGetProcessedSubscription (int duration, sd::SomeIpSdMessage &message)
 Try to wait unitl the server processes a subscription request. More...
 

Detailed Description

SOME/IP publish/subscribe client.

Constructor & Destructor Documentation

◆ SomeIpPubSubClient()

ara::com::someip::pubsub::SomeIpPubSubClient::SomeIpPubSubClient ( helper::NetworkLayer< sd::SomeIpSdMessage > *  networkLayer,
uint8_t  counter 
)

Constructor.

Parameters
networkLayerNetwork communication abstraction layer
counterCounter to make the client distinguishable among other subscribers

Member Function Documentation

◆ Subscribe()

void ara::com::someip::pubsub::SomeIpPubSubClient::Subscribe ( uint16_t  serviceId,
uint16_t  instanceId,
uint8_t  majorVersion,
uint16_t  eventgroupId 
)

Subscribe to an event-group.

Parameters
serviceIdService in interest ID
instanceIdService in interest instance ID
majorVersionService in interest major version
eventgroupIdEvent-group in interest ID

◆ TryGetProcessedSubscription()

bool ara::com::someip::pubsub::SomeIpPubSubClient::TryGetProcessedSubscription ( int  duration,
sd::SomeIpSdMessage message 
)

Try to wait unitl the server processes a subscription request.

Parameters
durationWaiting timeout in milliseconds
messageThe first processed subscription message in the buffer
Returns
True, if the service offering is stopped before the timeout; otherwise false

◆ Unsubscribe()

void ara::com::someip::pubsub::SomeIpPubSubClient::Unsubscribe ( uint16_t  serviceId,
uint16_t  instanceId,
uint8_t  majorVersion,
uint16_t  eventgroupId 
)

Unsubscribe from a subscribed event-group.

Parameters
serviceIdService in interest ID
instanceIdService in interest instance ID
majorVersionService in interest major version
eventgroupIdEvent-group in interest ID