DDS4CCM
1.1.2
|
Helper class. More...
#include <ConditionManager.h>
Helper class.
Manages the read and query conditions for the Getter, Reader and listeners.
Constructor.
Destructor.
|
private |
Getter functionality.
Attaches the query condition for the getter to the waitset. It the waitset doesn't exist, it will be created.
bool CIAO::DDS4CCM::ConditionManager::check_condition | ( | ::DDS::Condition_ptr | condition | ) |
Proxy method. See WaitSet::check_condition in ndds/WaitSet.h for more information on this.
DDS::InstanceHandle_t CIAO::DDS4CCM::ConditionManager::check_handle | ( | DDS_INSTANCE_HANDLE_T_IN | instance_handle, |
DDS_INSTANCE_HANDLE_T_IN | lookup_handle | ||
) |
Proxy method. See WaitSet::check_handle in ndds/WaitSet.h for more information on this.
If WaitSet::check_handle set 'error' to true, a CCM_DDS::InternalError exception is called. Error will be DDS::RETCODE_ERROR
If WaitSet::check_handle set 'non_existent' to true, a CCM_DDS::NonExistent exception is thrown.
|
private |
Internal getter for the DataReader. If the internal dds_entity is not set before this method is called, a CORBA::BAD_INV_ORDER exception is thrown.
Retrieves the internal datareader.
Returns the query condition for the getter.
Returns the query condition for the listener.
Returns the query condition for the reader.
Returns the read condition in general.
void CIAO::DDS4CCM::ConditionManager::init_readcondition | ( | void | ) |
Getter functionality. Creates a read_condition for the getter. It'll also initialize the waitset and attaches the read_condition to the waitset.
void CIAO::DDS4CCM::ConditionManager::passivate | ( | void | ) |
Detaches conditions from the waitset and removes all conditions by calling delete_readcondition on the DataReader.
Returns the internal filter. This is the DDS4CCM QueryFilter (a representive of the DDS query).
If the QueryFilter hasn't been initialized, a CCM_DDS::InternalError exception with error code DDS::RETCODE_ERROR is thrown.
void CIAO::DDS4CCM::ConditionManager::query | ( | const ::CCM_DDS::QueryFilter & | filter | ) |
Sets the DDS4CCM query filter. The following rules apply when a filter is set:
If there's a read condition set, this will be removed. The read condition is replaced by a query condition.
If there're no query conditions yet (i.e. the filter hasn't been set before), three query conditions are created:
Off course the query condition for the getter will be attached to the waitset.
If the internal filter has already been set, this method sets the new parameters for this filter on all three query conditions.
If the filter expression (the actual query) is empty, all three query conditions will be removed (the query condition for the getter will be detached from the waitset first) and the initial read condition will created (see init_readcondition).
|
private |
Removes the internal (read/query) condition by invoking delete_condition on the DataReader.
|
private |
Calling 'remove_condition' for each query and read condition.
The query condition for the getter will be detached from the waitset first.
Sets the internal datareader. Applies to Getter, Reader and Listener
|
private |
Generic method which sets the parameters of the given filter on the given query condition.
bool CIAO::DDS4CCM::ConditionManager::wait | ( | ::DDS::ConditionSeq & | active_conditions, |
::DDS::Duration_t & | time_out | ||
) |
Getter functionality waits for the attached conditions. If a condition is triggered, DDS has filled active_conditions with the triggered conditions. See WaitSet::wait in ndds/WaitSet.h for more information.
Different QueryConditions since the sample mask differs for all entities.