Class ServiceDescription

Nested Relationships

Nested Types

Class Documentation

class ServiceDescription

class for the identification of a communication event including information on the service, the service instance and the event id. A class object can be serialized/deserialized, so it is possible to send the information e.g. over a IPC channel.

Unnamed Group

const IdString_t &getServiceIDString() const noexcept

Getters for the string IDs

const IdString_t &getInstanceIDString() const noexcept
const IdString_t &getEventIDString() const noexcept

Unnamed Group

ClassHash getClassHash() const noexcept

Getter for class hash

Public Functions

ServiceDescription() noexcept

default C’tor

ServiceDescription(const ServiceDescription&) noexcept = default
ServiceDescription(ServiceDescription&&) noexcept = default
~ServiceDescription() noexcept = default
ServiceDescription(const IdString_t &service, const IdString_t &instance, const IdString_t &event, ClassHash m_classHash = {0U, 0U, 0U, 0U}, Interfaces interfaceSource = Interfaces::INTERNAL) noexcept

construction of the capro service description using fixed strings to create an event service description

bool operator==(const ServiceDescription &rhs) const noexcept

compare operator.

bool operator!=(const ServiceDescription &rhs) const noexcept

negation of compare operator.

bool operator<(const ServiceDescription &rhs) const noexcept

Uses the underlying m_**String compare method to provide an order. This is needed to use ServiceDescription in sorted containers like map or set.

ServiceDescription &operator=(const ServiceDescription&) noexcept = default
ServiceDescription &operator=(ServiceDescription&&) noexcept = default
explicit operator cxx::Serialization() const noexcept

serialization of the capro description.

bool isLocal() const noexcept
void setLocal() noexcept
Scope getScope() const noexcept

Returns the scope of a ServiceDescription.

Interfaces getSourceInterface() const noexcept

Returns the interface form where the service is coming from.

Public Static Functions

static cxx::expected<ServiceDescription, cxx::Serialization::Error> deserialize(const cxx::Serialization &serialized) noexcept

de-serialization of a ServiceDescription.

Parameters:

serialized, Serialization[in] object from which the ServiceDescription shall be created

Returns:

cxx::expected that either has a ServiceDescription or cxx::Serialization::Error stored inside

struct ClassHash

Public Functions

ClassHash() noexcept
ClassHash(const std::initializer_list<uint32_t> &values) noexcept
uint32_t &operator[](iox::cxx::range<uint64_t, 0, CLASS_HASH_ELEMENT_COUNT - 1> index) noexcept
const uint32_t &operator[](iox::cxx::range<uint64_t, 0, CLASS_HASH_ELEMENT_COUNT - 1> index) const noexcept
bool operator==(const ClassHash &rhs) const noexcept
bool operator!=(const ClassHash &rhs) const noexcept