| 1 | /**************************************************************************** |
|---|
| 2 | |
|---|
| 3 | Copyright 2008 Virginia Polytechnic Institute and State University |
|---|
| 4 | |
|---|
| 5 | This file is part of the OSSIE WFMdemod. |
|---|
| 6 | |
|---|
| 7 | OSSIE WFMdemod is free software; you can redistribute it and/or modify |
|---|
| 8 | it under the terms of the GNU General Public License as published by |
|---|
| 9 | the Free Software Foundation; either version 2 of the License, or |
|---|
| 10 | (at your option) any later version. |
|---|
| 11 | |
|---|
| 12 | OSSIE WFMdemod is distributed in the hope that it will be useful, |
|---|
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | GNU General Public License for more details. |
|---|
| 16 | |
|---|
| 17 | You should have received a copy of the GNU General Public License |
|---|
| 18 | along with OSSIE WFMdemod; if not, write to the Free Software |
|---|
| 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 20 | |
|---|
| 21 | ****************************************************************************/ |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | #ifndef WFMDEMOD_IMPL_H |
|---|
| 25 | #define WFMDEMOD_IMPL_H |
|---|
| 26 | |
|---|
| 27 | #include <stdlib.h> |
|---|
| 28 | |
|---|
| 29 | #include "ossie/cf.h" |
|---|
| 30 | #include "ossie/PortTypes.h" |
|---|
| 31 | #include "ossie/Resource_impl.h" |
|---|
| 32 | #include "ossie/debug.h" |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | #include "standardinterfaces/complexShort_u.h" |
|---|
| 36 | #include "standardinterfaces/complexShort_p.h" |
|---|
| 37 | |
|---|
| 38 | /** \brief |
|---|
| 39 | * |
|---|
| 40 | * |
|---|
| 41 | */ |
|---|
| 42 | class WFMDemod_i : public virtual Resource_impl |
|---|
| 43 | { |
|---|
| 44 | public: |
|---|
| 45 | /// Initializing constructor |
|---|
| 46 | WFMDemod_i(const char *uuid, omni_condition *sem); |
|---|
| 47 | |
|---|
| 48 | /// Destructor |
|---|
| 49 | ~WFMDemod_i(void); |
|---|
| 50 | |
|---|
| 51 | /// Static function for omni thread |
|---|
| 52 | static void run( void * data ); |
|---|
| 53 | |
|---|
| 54 | /// |
|---|
| 55 | void start() throw (CF::Resource::StartError, CORBA::SystemException); |
|---|
| 56 | |
|---|
| 57 | /// |
|---|
| 58 | void stop() throw (CF::Resource::StopError, CORBA::SystemException); |
|---|
| 59 | |
|---|
| 60 | /// |
|---|
| 61 | CORBA::Object_ptr getPort( const char* portName ) |
|---|
| 62 | throw (CF::PortSupplier::UnknownPort, CORBA::SystemException); |
|---|
| 63 | |
|---|
| 64 | /// |
|---|
| 65 | void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException); |
|---|
| 66 | |
|---|
| 67 | /// |
|---|
| 68 | void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException); |
|---|
| 69 | |
|---|
| 70 | /// Configures properties read from .prf.xml |
|---|
| 71 | void configure(const CF::Properties&) |
|---|
| 72 | throw (CORBA::SystemException, |
|---|
| 73 | CF::PropertySet::InvalidConfiguration, |
|---|
| 74 | CF::PropertySet::PartialConfiguration); |
|---|
| 75 | |
|---|
| 76 | void query (CF::Properties & configProperties) throw (CORBA::SystemException, CF::UnknownProperties); |
|---|
| 77 | |
|---|
| 78 | void runTest (CORBA::ULong _number, CF::Properties & _props) throw (CORBA::SystemException, CF::TestableObject::UnknownTest, CF::UnknownProperties); |
|---|
| 79 | |
|---|
| 80 | private: |
|---|
| 81 | /// Disallow default constructor |
|---|
| 82 | WFMDemod_i(); |
|---|
| 83 | |
|---|
| 84 | /// Disallow copy constructor |
|---|
| 85 | WFMDemod_i(WFMDemod_i&); |
|---|
| 86 | |
|---|
| 87 | /// Main signal processing method |
|---|
| 88 | void ProcessData(); |
|---|
| 89 | |
|---|
| 90 | omni_condition *component_running; ///< for component shutdown |
|---|
| 91 | omni_thread *processing_thread; ///< for component writer function |
|---|
| 92 | |
|---|
| 93 | CORBA::Short simple_0_value; |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | // list components provides and uses ports |
|---|
| 97 | standardInterfaces_i::complexShort_p *dataIn_0; |
|---|
| 98 | standardInterfaces_i::complexShort_u *dataOut_0; |
|---|
| 99 | |
|---|
| 100 | }; |
|---|
| 101 | #endif |
|---|