RTI Connext Modern C++ API  Version 5.3.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::core::cond::StatusCondition Class Reference

<<reference-type>> A condition associated with each dds::core::Entity More...

#include <dds/core/cond/StatusCondition.hpp>

Inheritance diagram for dds::core::cond::StatusCondition:
dds::core::cond::Condition

Public Member Functions

 StatusCondition (const dds::core::Entity &the_entity)
 Obtains a reference to the StatusCondition in an entity.
 
void enabled_statuses (const dds::core::status::StatusMask &status)
 Defines the list of communication statuses that determine the trigger value.
 
const dds::core::status::StatusMask enabled_statuses () const
 Gets the list of enabled statuses.
 
dds::core::Entity entity () const
 Get the dds::core::Entity associated with this StatusCondition.
 
template<typename Functor >
void handler (const Functor &func)
 <<extension>> Registers a custom handler with this condition.
 
void reset_handler ()
 <<extension>> Resets the handler for this condition.
 
- Public Member Functions inherited from dds::core::cond::Condition
void dispatch ()
 Dispatches the functors that have been registered with the condition.
 
bool trigger_value () const
 This operation retrieves the trigger_value of the Condition.
 

Detailed Description

<<reference-type>> A condition associated with each dds::core::Entity

The trigger_value of the dds::core::cond::StatusCondition depends on the communication status of that entity (e.g., arrival of data, loss of information, etc.), 'filtered' by the set of enabled_statuses on the dds::core::cond::StatusCondition.

See Also
Status Kinds
dds::core::cond::WaitSet, dds::core::cond::Condition
Listener

.

Note
There is exactly one StatusCondition per Entity and one Entity per StatusCondition.
Warning
Destroying an Entity invalidates all references to its StatusCondition. To avoid that, always keep a reference to the Entity while you also have one to its StatusCondition or retain the Entity.

Constructor & Destructor Documentation

dds::core::cond::StatusCondition::StatusCondition ( const dds::core::Entity the_entity)
inline

Obtains a reference to the StatusCondition in an entity.

Parameters
the_entityThe Entity whose status condition we're getting a reference to. There is exactly one StatusCondition per Entity and one Entity per StatusCondition.
Note
This constructor doesn't create a new Condition. It obtains a reference to the StatusCondition that each Entity owns. You can use this constructor as many times as needed to obtain a reference to the same StatusCondition.

Member Function Documentation

void dds::core::cond::StatusCondition::enabled_statuses ( const dds::core::status::StatusMask status)
inline

Defines the list of communication statuses that determine the trigger value.

This operation may change the trigger_value of the dds::core::cond::StatusCondition.

dds::core::cond::WaitSet objects' behavior depends on the changes of the trigger_value of their attached conditions. Therefore, any dds::core::cond::WaitSet to which the dds::core::cond::StatusCondition is attached is potentially affected by this operation.

If this function is not invoked, the default list of enabled statuses includes all the statuses.

Exceptions
Oneof the Standard Exceptions
const dds::core::status::StatusMask dds::core::cond::StatusCondition::enabled_statuses ( ) const
inline

Gets the list of enabled statuses.

See Also
enabled_statuses(const dds::core::status::StatusMask&)
dds::core::Entity dds::core::cond::StatusCondition::entity ( ) const
inline

Get the dds::core::Entity associated with this StatusCondition.

There is exactly one Entity associated with each StatusCondition.

template<typename Functor >
void handler ( const Functor &  func)

<<extension>> Registers a custom handler with this condition.

For information about condition handlers, see this ReadCondition constructor

Note
Changing this handler will affect any other references to this Entity's StatusCondition.
MT Safety:
It is not safe to call handler() or reset_handler() while this condition is attached to a waitset being dispatched.
void reset_handler ( )

<<extension>> Resets the handler for this condition.

After the invocation of this method no handler will be registered with this condition.

Note
Changing this handler will affect any other references to this Entity's StatusCondition.
MT Safety:
It is not safe to call handler() or reset_handler() while this condition is attached to a waitset being dispatched.

RTI Connext Modern C++ API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc