/**************************************************************************** Copyright 2007 Virginia Polytechnic Institute and State University This file is part of the OSSIE c2. OSSIE c2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OSSIE c2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OSSIE c2; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ****************************************************************************/ #ifndef C2_IMPL_H #define C2_IMPL_H #include #include "ossie/cf.h" #include "ossie/PortTypes.h" #include "ossie/Resource_impl.h" #include "ossie/debug.h" /** \brief * * */ class c2_i : public virtual Resource_impl { public: /// Initializing constructor c2_i(const char *uuid, omni_condition *sem); /// Destructor ~c2_i(void); /// Static function for omni thread static void Run( void * data ); /// void start() throw (CF::Resource::StartError, CORBA::SystemException); /// void stop() throw (CF::Resource::StopError, CORBA::SystemException); /// CORBA::Object_ptr getPort( const char* portName ) throw (CF::PortSupplier::UnknownPort, CORBA::SystemException); /// void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException); /// void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException); /// Query properties from .prf.xml void query(CF::Properties&) throw (CORBA::SystemException, CF::UnknownProperties); /// Configures properties read from .prf.xml void configure(const CF::Properties&) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration); private: /// Disallow default constructor c2_i(); /// Disallow copy constructor c2_i(c2_i&); /// Main signal processing method void ProcessData(); bool continue_processing(); volatile bool thread_started; omni_mutex processing_mutex; omni_condition *component_running; ///< for component shutdown omni_thread *processing_thread; ///< for component writer function // list components provides and uses ports }; #endif