StatusConditionImpl.cpp

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
00009 #include "StatusConditionImpl.h"
00010 #include "EntityImpl.h"
00011 
00012 namespace OpenDDS {
00013 namespace DCPS {
00014 
00015 CORBA::Boolean StatusConditionImpl::get_trigger_value()
00016 {
00017   if (DCPS_debug_level > 9) {
00018     ACE_DEBUG((LM_DEBUG,
00019                ACE_TEXT("(%P|%t) StatusConditionImpl::get_trigger_value() - ")
00020                ACE_TEXT("mask==0x%x, changes==0x%x.\n"),
00021                this->mask_,
00022                this->parent_->get_status_changes()));
00023   }
00024 
00025   ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, g, lock_, false);
00026   return (parent_->get_status_changes() & mask_) > 0;
00027 }
00028 
00029 DDS::StatusMask StatusConditionImpl::get_enabled_statuses()
00030 {
00031   ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, g, lock_, 0);
00032   return mask_;
00033 }
00034 
00035 DDS::ReturnCode_t
00036 StatusConditionImpl::set_enabled_statuses(DDS::StatusMask mask)
00037 {
00038   ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, g, lock_,
00039                    DDS::RETCODE_OUT_OF_RESOURCES);
00040   mask_ = mask;
00041   signal_all();
00042   return DDS::RETCODE_OK;
00043 }
00044 
00045 DDS::Entity_ptr StatusConditionImpl::get_entity()
00046 {
00047   return DDS::Entity::_duplicate(parent_);
00048 }
00049 
00050 } // namespace DCPS
00051 } // namespace OpenDDS

Generated on Fri Feb 12 20:05:27 2016 for OpenDDS by  doxygen 1.4.7