iox::roudi::PortIntrospection::PortData🔗
Public Functions🔗
Name | |
---|---|
PortData() | |
bool | addPublisher(typename PublisherPort::MemberType_t & port) add a publisher port to be tracked by introspection |
bool | addSubscriber(typename SubscriberPort::MemberType_t & portData) add a subscriber port to be tracked by introspection |
bool | removePublisher(const PublisherPort & port) remove a publisher port from introspection |
bool | removeSubscriber(const SubscriberPort & port) remove a subscriber port from introspection |
bool | updateConnectionState(const capro::CaproMessage & message) update the state of any connection identified by the capro id of a given message according to the message type (e.g. capro::SUB for a subscription request) |
bool | updateSubscriberConnectionState(const capro::CaproMessage & message, const UniquePortId & id) update the subscriber connection state identified by the unique port id and the capro id of a given message according to the message type (e.g. capro::SUB for a subscription request) |
void | prepareTopic(PortIntrospectionTopic & topic) prepare the topic to be send based on the internal connection state of all tracked ports |
void | prepareTopic(PortThroughputIntrospectionTopic & topic) |
void | prepareTopic(SubscriberPortChangingIntrospectionFieldTopic & topic) |
template \<typename T ,std::enable_if_t< std::is_same< T, iox::build::OneToManyPolicy >::value > * =nullptr> PortIntrospection::ConnectionState |
getNextState(ConnectionState currentState, capro::CaproMessageType messageType) compute the next connection state based on the current connection state and a capro message type when the communication policy is OneToMany |
template \<typename T ,std::enable_if_t< std::is_same< T, iox::build::ManyToManyPolicy >::value > * =nullptr> PortIntrospection::ConnectionState |
getNextState(ConnectionState currentState, capro::CaproMessageType messageType) compute the next connection state based on the current connection state and a capro message type when the communication policy is ManyToMany |
bool | isNew() const indicates whether the logical object state has changed (i.e. the data is new) |
void | setNew(bool value) sets the internal flag indicating new data |
Public Functions Documentation🔗
function PortData🔗
inline PortData()
function addPublisher🔗
inline bool addPublisher(
typename PublisherPort::MemberType_t & port
)
add a publisher port to be tracked by introspection
Parameters:
- port to be added
Return: returns false if the port could not be added and true otherwise
function addSubscriber🔗
inline bool addSubscriber(
typename SubscriberPort::MemberType_t & portData
)
add a subscriber port to be tracked by introspection
Parameters:
- portData to be added
Return: returns false if the port could not be added and true otherwise
function removePublisher🔗
inline bool removePublisher(
const PublisherPort & port
)
remove a publisher port from introspection
Parameters:
- port publisher port to be removed
Return: returns false if the port could not be removed (since it did not exist) and true otherwise
function removeSubscriber🔗
inline bool removeSubscriber(
const SubscriberPort & port
)
remove a subscriber port from introspection
Parameters:
- port subscriber port to be removed
Return: returns false if the port could not be removed (since it did not exist) and true otherwise
function updateConnectionState🔗
inline bool updateConnectionState(
const capro::CaproMessage & message
)
update the state of any connection identified by the capro id of a given message according to the message type (e.g. capro::SUB for a subscription request)
Parameters:
- message capro message to be processed
Return: returns false there is no corresponding capro service and true otherwise
function updateSubscriberConnectionState🔗
inline bool updateSubscriberConnectionState(
const capro::CaproMessage & message,
const UniquePortId & id
)
update the subscriber connection state identified by the unique port id and the capro id of a given message according to the message type (e.g. capro::SUB for a subscription request)
Parameters:
- message capro message to be processed
- id unique port id
Return: false if there is no corresponding capro service or unique port id, otherwise true
Note: introduced for identifying the subscriber port whose connection state has to be updated, e.g. if a subscriber unsubscribes only its connection state should be updated - not the states of all subscribers which are subscribed to the same topic
function prepareTopic🔗
inline void prepareTopic(
PortIntrospectionTopic & topic
)
prepare the topic to be send based on the internal connection state of all tracked ports
Parameters:
- topic data structure to be prepared for sending
function prepareTopic🔗
void prepareTopic(
PortThroughputIntrospectionTopic & topic
)
function prepareTopic🔗
inline void prepareTopic(
SubscriberPortChangingIntrospectionFieldTopic & topic
)
function getNextState🔗
template <typename T ,
std::enable_if_t< std::is_same< T, iox::build::OneToManyPolicy >::value > * =nullptr>
inline PortIntrospection::ConnectionState getNextState(
ConnectionState currentState,
capro::CaproMessageType messageType
)
compute the next connection state based on the current connection state and a capro message type when the communication policy is OneToMany
Parameters:
- currentState current connection state (e.g. CONNECTED)
- messageType capro message type
Return: returns the new connection state
function getNextState🔗
template <typename T ,
std::enable_if_t< std::is_same< T, iox::build::ManyToManyPolicy >::value > * =nullptr>
PortIntrospection::ConnectionState getNextState(
ConnectionState currentState,
capro::CaproMessageType messageType
)
compute the next connection state based on the current connection state and a capro message type when the communication policy is ManyToMany
Parameters:
- currentState current connection state (e.g. CONNECTED)
- messageType capro message type
Return: returns the new connection state
function isNew🔗
inline bool isNew() const
indicates whether the logical object state has changed (i.e. the data is new)
Return: returns true if the data is new(e.g. new connections were established), false otherwise
function setNew🔗
inline void setNew(
bool value
)
sets the internal flag indicating new data
Parameters:
- value value to be set
Updated on 31 May 2022 at 15:29:16 CEST