SOME/IP service discovery client. More...
#include <someip_sd_client.h>
Public Member Functions | |
SomeIpSdClient (helper::NetworkLayer< SomeIpSdMessage > *networkLayer, uint16_t serviceId, int initialDelayMin, int initialDelayMax, int repetitionBaseDelay=30, uint32_t repetitionMax=3) | |
Constructor. More... | |
bool | TryWaitUntiServiceOffered (int duration) |
Try to wait unitl the server offers the service. More... | |
bool | TryWaitUntiServiceOfferStopped (int duration) |
Try to wait unitl the server stops offering the service. More... | |
bool | TryGetOfferedEndpoint (std::string &ipAddress, uint16_t &port) |
Try to the offered unicast endpoint from the SD server. More... | |
Public Member Functions inherited from ara::com::someip::sd::SomeIpSdAgent< helper::SdClientState > | |
SomeIpSdAgent (helper::NetworkLayer< SomeIpSdMessage > *networkLayer) | |
Constructor. More... | |
void | Start () |
Start the service discovery agent. | |
helper::SdClientState | GetState () const noexcept |
Get the current server state. More... | |
void | Join () |
Join to the timer's thread. | |
void | Stop () |
Stop the service discovery agent. More... | |
Protected Member Functions | |
void | StartAgent (helper::SdClientState state) override |
Start the service discovery agent. More... | |
void | StopAgent () override |
Stop the service discovery agent. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ara::com::someip::sd::SomeIpSdAgent< helper::SdClientState > | |
helper::FiniteStateMachine< helper::SdClientState > | StateMachine |
Agent's FSM. | |
std::future< void > | Future |
Agent running state future object. | |
helper::NetworkLayer< SomeIpSdMessage > * | CommunicationLayer |
Network communication abstraction layer. | |
SOME/IP service discovery client.
ara::com::someip::sd::SomeIpSdClient::SomeIpSdClient | ( | helper::NetworkLayer< SomeIpSdMessage > * | networkLayer, |
uint16_t | serviceId, | ||
int | initialDelayMin, | ||
int | initialDelayMax, | ||
int | repetitionBaseDelay = 30 , |
||
uint32_t | repetitionMax = 3 |
||
) |
Constructor.
networkLayer | Network communication abstraction layer |
serviceId | Server's service ID |
initialDelayMin | Minimum initial delay |
initialDelayMax | Maximum initial delay |
repetitionBaseDelay | Repetition phase delay |
repetitionMax | Maximum message count in the repetition phase |
|
overrideprotectedvirtual |
Start the service discovery agent.
state | Current FSM state before start |
Implements ara::com::someip::sd::SomeIpSdAgent< helper::SdClientState >.
|
overrideprotectedvirtual |
Stop the service discovery agent.
state | Current FSM state before stop |
Implements ara::com::someip::sd::SomeIpSdAgent< helper::SdClientState >.
bool ara::com::someip::sd::SomeIpSdClient::TryGetOfferedEndpoint | ( | std::string & | ipAddress, |
uint16_t & | port | ||
) |
Try to the offered unicast endpoint from the SD server.
[out] | ipAddress | Offered unicast IPv4 address |
[out] | port | Offered TCP port number |
bool ara::com::someip::sd::SomeIpSdClient::TryWaitUntiServiceOffered | ( | int | duration | ) |
Try to wait unitl the server offers the service.
duration | Waiting timeout in milliseconds |
bool ara::com::someip::sd::SomeIpSdClient::TryWaitUntiServiceOfferStopped | ( | int | duration | ) |
Try to wait unitl the server stops offering the service.
duration | Waiting timeout in milliseconds |