DDS4CCM
1.1.6
|
Helper class. More...
#include <ConditionManager.h>
Public Member Functions | |
ConditionManager (void) | |
Constructor. | |
~ConditionManager (void) | |
Destructor. | |
::DDS::ReadCondition_ptr | get_readcondition (void) |
Returns the read condition in general. | |
::DDS::QueryCondition_ptr | get_querycondition_getter (void) |
Returns the query condition for the getter. | |
::DDS::QueryCondition_ptr | get_querycondition_reader (void) |
Returns the query condition for the reader. | |
::DDS::QueryCondition_ptr | get_querycondition_listener (void) |
Returns the query condition for the listener. | |
::DDS::InstanceHandle_t | check_handle (DDS_INSTANCE_HANDLE_T_IN instance_handle, DDS_INSTANCE_HANDLE_T_IN lookup_handle) |
void | init_readcondition (void) |
bool | wait (const ::DDS::Duration_t &time_out) |
::CCM_DDS::QueryFilter * | query (void) |
void | query (const ::CCM_DDS::QueryFilter &filter) |
void | set_dds_entity (::DDS::DataReader_ptr dr) |
::DDS::DataReader_ptr | get_dds_entity (void) |
void | passivate (void) |
Private Member Functions | |
::DDS::DataReader_ptr | dds_entity (void) |
void | remove_condition (::DDS::QueryCondition_ptr qc, const char *type) |
void | remove_conditions (void) |
void | attach_querycondition (void) |
void | set_parameters (const ::CCM_DDS::QueryFilter &filter,::DDS::QueryCondition_ptr qc) |
Private Attributes | |
::DDS::DataReader_var | dr_ |
::DDS::QueryCondition_var | qc_reader_ |
::DDS::QueryCondition_var | qc_getter_ |
::DDS::QueryCondition_var | qc_listener_ |
::DDS::ReadCondition_var | rd_condition_ |
Helper class.
Manages the read and query conditions for the Getter, Reader and listeners.
CIAO::DDS4CCM::ConditionManager::ConditionManager | ( | void | ) |
Constructor.
CIAO::DDS4CCM::ConditionManager::~ConditionManager | ( | void | ) |
Destructor.
|
private |
Getter functionality.
Attaches the query condition for the getter to the waitset. It the waitset doesn't exist, it will be created.
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.
DDS::DataReader_ptr CIAO::DDS4CCM::ConditionManager::get_dds_entity | ( | void | ) |
Retrieves the internal datareader.
DDS::QueryCondition_ptr CIAO::DDS4CCM::ConditionManager::get_querycondition_getter | ( | void | ) |
Returns the query condition for the getter.
DDS::QueryCondition_ptr CIAO::DDS4CCM::ConditionManager::get_querycondition_listener | ( | void | ) |
Returns the query condition for the listener.
DDS::QueryCondition_ptr CIAO::DDS4CCM::ConditionManager::get_querycondition_reader | ( | void | ) |
Returns the query condition for the reader.
DDS::ReadCondition_ptr CIAO::DDS4CCM::ConditionManager::get_readcondition | ( | void | ) |
Returns the read condition in general.
void CIAO::DDS4CCM::ConditionManager::init_readcondition | ( | void | ) |
Getter functionality. Creates a read_condition for the getter. It will 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.
CCM_DDS::QueryFilter * CIAO::DDS4CCM::ConditionManager::query | ( | void | ) |
Returns the internal filter. This is the DDS4CCM QueryFilter (a representation 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.
void CIAO::DDS4CCM::ConditionManager::set_dds_entity | ( | ::DDS::DataReader_ptr | dr | ) |
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 | ( | const ::DDS::Duration_t & | time_out | ) |
Getter functionality, waits for the attached conditions. Only returns true when one of the getter conditions has triggered and we have data
|
private |
|
private |
|
private |
|
private |
Different QueryConditions since the sample mask differs for all entities.
|
private |