Skip to content

iox::capro::ServiceDescription🔗

class for the identification of a communication event including information on the service, the service instance and the event id. In order to support different communication protocols, two types of members exist: integer and string identifiers. If string IDs are used, the integers are initialized to an invalid number. A class object can be serialized/deserialized, so it is possible to send the information e.g. over a IPC channel.

#include <service_description.hpp>

Public Classes🔗

Name
struct ClassHash

Public Functions🔗

Name
uint16_t getInstanceID() const
uint16_t getServiceID() const
uint16_t getEventID() const
IdString_t getServiceIDString() const
IdString_t getInstanceIDString() const
IdString_t getEventIDString() const
ClassHash getClassHash() const
ServiceDescription(const cxx::Serialization & f_serial)
construction of the capro service description using serialized strings
ServiceDescription()
default C'tor
ServiceDescription(const ServiceDescription & ) =default
ServiceDescription(ServiceDescription && ) =default
~ServiceDescription() =default
ServiceDescription(uint16_t f_serviceID, uint16_t f_instanceID)
construction of the capro service description using integers to create a service service description
ServiceDescription(const IdString_t & f_service, const IdString_t & f_instance)
construction of the capro service description using fixed strings to create a service service description
ServiceDescription(uint16_t f_serviceID, uint16_t f_eventID, uint16_t f_instanceID)
construction of the capro service description using integers to create an event service description
ServiceDescription(const IdString_t & f_service, const IdString_t & f_instance, const IdString_t & f_event, ClassHash m_classHash ={0u, 0u, 0u, 0u}, Interfaces interfaceSource =Interfaces::INTERNAL)
construction of the capro service description using fixed strings to create an event service description
bool operator==(const ServiceDescription & rhs) const
compare operator. If wildcards AnyService, AnyInstance or AnyEvent are used as integer IDs, the corresponding member comparisons are skipped. Otherwise, both the integer and the string members are compared.
bool operator!=(const ServiceDescription & rhs) const
negation of compare operator.
bool operator<(const ServiceDescription & rhs) const
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 & ) =default
ServiceDescription & operator=(ServiceDescription && ) =default
operator cxx::Serialization() const
serialization of the capro description.
bool hasServiceOnlyDescription() const
Returns true if it contains a service description which does not have events, otherwise it returns false.
bool isInternal() const
void setInternal()
Scope getScope()
Returns the scope of a ServiceDescription.
bool isValid() const
Returns true for valid ServiceDescription false for ServiceDescription that contains either of InvalidID/InvalidIDString AnyService/AnyServiceString, AnyInstance/AnyInstanceString, AnyEvent/AnyEventString.
Interfaces getSourceInterface() const
Returns the interface form where the service is coming from.

Public Functions Documentation🔗

function getInstanceID🔗

uint16_t getInstanceID() const

Getters for the integer and string IDs

function getServiceID🔗

uint16_t getServiceID() const

function getEventID🔗

uint16_t getEventID() const

function getServiceIDString🔗

IdString_t getServiceIDString() const

function getInstanceIDString🔗

IdString_t getInstanceIDString() const

function getEventIDString🔗

IdString_t getEventIDString() const

function getClassHash🔗

ClassHash getClassHash() const

Getter for class hash

function ServiceDescription🔗

ServiceDescription(
    const cxx::Serialization & f_serial
)

construction of the capro service description using serialized strings

function ServiceDescription🔗

ServiceDescription()

default C'tor

function ServiceDescription🔗

ServiceDescription(
    const ServiceDescription & 
) =default

function ServiceDescription🔗

ServiceDescription(
    ServiceDescription && 
) =default

function ~ServiceDescription🔗

~ServiceDescription() =default

function ServiceDescription🔗

ServiceDescription(
    uint16_t f_serviceID,
    uint16_t f_instanceID
)

construction of the capro service description using integers to create a service service description

function ServiceDescription🔗

ServiceDescription(
    const IdString_t & f_service,
    const IdString_t & f_instance
)

construction of the capro service description using fixed strings to create a service service description

function ServiceDescription🔗

ServiceDescription(
    uint16_t f_serviceID,
    uint16_t f_eventID,
    uint16_t f_instanceID
)

construction of the capro service description using integers to create an event service description

function ServiceDescription🔗

ServiceDescription(
    const IdString_t & f_service,
    const IdString_t & f_instance,
    const IdString_t & f_event,
    ClassHash m_classHash ={0u, 0u, 0u, 0u},
    Interfaces interfaceSource =Interfaces::INTERNAL
)

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

function operator==🔗

bool operator==(
    const ServiceDescription & rhs
) const

compare operator. If wildcards AnyService, AnyInstance or AnyEvent are used as integer IDs, the corresponding member comparisons are skipped. Otherwise, both the integer and the string members are compared.

function operator!=🔗

bool operator!=(
    const ServiceDescription & rhs
) const

negation of compare operator.

function operator<🔗

bool operator<(
    const ServiceDescription & rhs
) const

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

function operator=🔗

ServiceDescription & operator=(
    const ServiceDescription & 
) =default

function operator=🔗

ServiceDescription & operator=(
    ServiceDescription && 
) =default

function operator cxx::Serialization🔗

operator cxx::Serialization() const

serialization of the capro description.

function hasServiceOnlyDescription🔗

bool hasServiceOnlyDescription() const

Returns true if it contains a service description which does not have events, otherwise it returns false.

function isInternal🔗

bool isInternal() const

function setInternal🔗

void setInternal()

function getScope🔗

Scope getScope()

Returns the scope of a ServiceDescription.

function isValid🔗

bool isValid() const

Returns true for valid ServiceDescription false for ServiceDescription that contains either of InvalidID/InvalidIDString AnyService/AnyServiceString, AnyInstance/AnyInstanceString, AnyEvent/AnyEventString.

function getSourceInterface🔗

Interfaces getSourceInterface() const

Returns the interface form where the service is coming from.


Updated on 31 May 2022 at 15:29:15 CEST