DDS4CCM
1.0.8
|
Representative (proxy) class for the RTI waitset. More...
#include <WaitSet.h>
Public Member Functions | |
DDS_WaitSet_i () | |
Constructor. | |
virtual | ~DDS_WaitSet_i (void) |
Destructor. | |
virtual ::DDS::ReturnCode_t | wait (::DDS::ConditionSeq &active_conditions, const ::DDS::Duration_t &timeout) |
virtual ::DDS::ReturnCode_t | attach_condition (::DDS::Condition_ptr cond) |
virtual ::DDS::ReturnCode_t | detach_condition (::DDS::Condition_ptr cond) |
virtual ::DDS::ReturnCode_t | get_conditions (::DDS::ConditionSeq &attached_conditions) |
DDSWaitSet * | get_rti_entity (void) |
::DDS::InstanceHandle_t | check_handle (const ::DDS::InstanceHandle_t &instance_handle, const ::DDS::InstanceHandle_t &lookup_handle, bool &error, bool &non_existent) |
bool | check_condition (::DDS::ReadCondition_ptr rc,::DDS::QueryCondition_ptr qc,::DDS::Condition_ptr condition) |
void | init (void) |
Private Member Functions | |
DDSWaitSet * | rti_entity () |
void | convert_conditions (const DDSConditionSeq &dds_conditions,::DDS::ConditionSeq &conditions) |
Private Attributes | |
DDSWaitSet * | rti_entity_ |
Representative (proxy) class for the RTI waitset.
Implementation of the RTI waitset functionality.
CIAO::NDDS::DDS_WaitSet_i::DDS_WaitSet_i | ( | ) |
Constructor.
CIAO::NDDS::DDS_WaitSet_i::~DDS_WaitSet_i | ( | void | ) | [virtual] |
Destructor.
DDS::ReturnCode_t CIAO::NDDS::DDS_WaitSet_i::attach_condition | ( | ::DDS::Condition_ptr | cond | ) | [virtual] |
Attaches a condition to the waitset. 'wait' will be waiting for this condition.
Implements DDS::WaitSet.
bool CIAO::NDDS::DDS_WaitSet_i::check_condition | ( | ::DDS::ReadCondition_ptr | rc, |
::DDS::QueryCondition_ptr | qc, | ||
::DDS::Condition_ptr | condition | ||
) |
With this method, the caller is able to find out which conditions had triggered 'wait'.
DDS::InstanceHandle_t CIAO::NDDS::DDS_WaitSet_i::check_handle | ( | const ::DDS::InstanceHandle_t & | instance_handle, |
const ::DDS::InstanceHandle_t & | lookup_handle, | ||
bool & | error, | ||
bool & | non_existent | ||
) |
Used in the Reader in order to check whether whether the user has supplied the correct handle with the type specific instance. See Reader_T::read_one_last and the DDS4CCM spec for more info.
Checks whether two DDS-handles are equal. If no error occurs and the lookup_handle exists, this method will return the lookup_handle.
TODO: We actually want this method to be in the DDS4CCM connector but since we're not allowed to use RTI specific code there it's located here.
'error' will be true if instance_handle != DDS_HANDLE_NIL and when instance_handle != lookup_handle.
non_existent will be true is lookup_hnd is DDS_HANDLE_NIL
void CIAO::NDDS::DDS_WaitSet_i::convert_conditions | ( | const DDSConditionSeq & | dds_conditions, |
::DDS::ConditionSeq & | conditions | ||
) | [private] |
Converts the RTI condition(s) to the DDS4CCM condition(s)
DDS::ReturnCode_t CIAO::NDDS::DDS_WaitSet_i::detach_condition | ( | ::DDS::Condition_ptr | cond | ) | [virtual] |
Detaches a condition from the waitset. 'wait' won't be waiting for this condition anymore.
Implements DDS::WaitSet.
DDS::ReturnCode_t CIAO::NDDS::DDS_WaitSet_i::get_conditions | ( | ::DDS::ConditionSeq & | attached_conditions | ) | [virtual] |
Retrieves a list of attached conditions.
Implements DDS::WaitSet.
DDSWaitSet * CIAO::NDDS::DDS_WaitSet_i::get_rti_entity | ( | void | ) |
Returns the RTI waitset
void CIAO::NDDS::DDS_WaitSet_i::init | ( | void | ) |
Creates the RTI waitset.
DDSWaitSet * CIAO::NDDS::DDS_WaitSet_i::rti_entity | ( | void | ) | [private] |
DDS::ReturnCode_t CIAO::NDDS::DDS_WaitSet_i::wait | ( | ::DDS::ConditionSeq & | active_conditions, |
const ::DDS::Duration_t & | timeout | ||
) | [virtual] |
Waits for DDS until the attached read/query conditions are met or when a timeout occurs.
active_conditions will contain conditions DDS has found. The caller should check whether the appropriate conditions for him has been set, using check_conditions
Implements DDS::WaitSet.
DDSWaitSet* CIAO::NDDS::DDS_WaitSet_i::rti_entity_ [private] |