root/components/AutomaticGainControl/trunk/AutomaticGainControl/AutomaticGainControl.h @ 2411

Revision 2411, 3.0 KB (checked in by jgaeddert, 7 years ago)

added basic functionality; needs testing

Line 
1/****************************************************************************
2
3Copyright 2006 Virginia Polytechnic Institute and State University
4
5This file is part of the OSSIE AutomaticGainControl.
6
7OSSIE AutomaticGainControl is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12OSSIE AutomaticGainControl is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OSSIE AutomaticGainControl; if not, write to the Free Software
19Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21****************************************************************************/
22
23
24#ifndef AUTOMATICGAINCONTROL_IMPL_H
25#define AUTOMATICGAINCONTROL_IMPL_H
26
27#include <stdlib.h>
28#include "ossie/cf.h"
29
30
31#include "ossie/PortTypes.h"
32#include "standardinterfaces/complexShort.h"
33#include "standardinterfaces/complexShort_u.h"
34#include "standardinterfaces/complexShort_p.h"
35
36#include "ossie/Resource_impl.h"
37#include "sigproc/SigProc.h"
38
39class AutomaticGainControl_i;
40
41void process_data(void *data);
42
43class AutomaticGainControl_i : public virtual Resource_impl
44{
45
46    friend void process_data(void *data);
47
48    public:
49        AutomaticGainControl_i(const char *uuid, omni_condition *sem);
50        ~AutomaticGainControl_i(void);
51
52        void start() throw (CF::Resource::StartError, CORBA::SystemException);
53        void stop() throw (CF::Resource::StopError, CORBA::SystemException);
54
55        CORBA::Object_ptr getPort( const char* portName ) throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
56
57        void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
58
59        void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
60        void configure(const CF::Properties&) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration);
61
62
63    private:
64        AutomaticGainControl_i();
65        AutomaticGainControl_i(AutomaticGainControl_i&);
66   
67        omni_condition *component_running;  //for component shutdown
68        omni_thread *processing_thread;     //for component writer function
69       
70        CORBA::Float simple_0_value;
71        CORBA::Float simple_1_value;
72        CORBA::Float simple_2_value;
73        CORBA::Float simple_3_value;
74        CORBA::Float simple_4_value;
75        CORBA::Float simple_5_value;
76
77       
78        //list components provides and uses ports
79        standardInterfaces_i::complexShort_u *dataOut_0;
80        standardInterfaces_i::complexShort_p *dataIn_0;
81
82
83        // algorithm variables
84        float energy_lo;
85        float energy_hi;
86        float k_attack;
87        float k_release;
88        float g_max;
89        float g_min;
90       
91};
92#endif
Note: See TracBrowser for help on using the browser.