root/ossiedev/branches/jgaeddert/0.8.0/components/include/FlexframeGen.h @ 10910

Revision 10910, 3.6 KB (checked in by jgaeddert, 19 months ago)

FlexframeGen?: fixing bug (header defined as 8 bytes in .h, not 14)

Line 
1/****************************************************************************
2
3Copyright 2010 Virginia Polytechnic Institute and State University
4
5This file is part of the OSSIE FlexframeGen.
6
7OSSIE FlexframeGen 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 FlexframeGen 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 FlexframeGen; 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 FLEXFRAMEGEN_IMPL_H
25#define FLEXFRAMEGEN_IMPL_H
26
27#include <stdlib.h>
28#include <complex>
29#include <liquid/liquid.h>
30
31#include "ossie/cf.h"
32#include "ossie/PortTypes.h"
33#include "ossie/Resource_impl.h"
34#include "ossie/debug.h"
35
36
37#include "standardinterfaces/realChar.h"
38#include "standardinterfaces/complexFloat.h"
39#include "standardinterfaces/complexFloat_u.h"
40#include "standardinterfaces/realChar_p.h"
41
42/** \brief
43 *
44 *
45 */
46class FlexframeGen_i : public virtual Resource_impl
47{
48  public:
49    /// Initializing constructor
50    FlexframeGen_i(const char *uuid, omni_condition *sem);
51
52    /// Destructor
53    ~FlexframeGen_i(void);
54
55    /// Static function for omni thread
56    static void Run( void * data );
57
58    ///
59    void start() throw (CF::Resource::StartError, CORBA::SystemException);
60
61    ///
62    void stop() throw (CF::Resource::StopError, CORBA::SystemException);
63
64    ///
65    CORBA::Object_ptr getPort( const char* portName )
66        throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
67
68    ///
69    void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
70
71    ///
72    void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
73
74    /// Query properties from .prf.xml
75    void query(CF::Properties&)
76        throw (CORBA::SystemException,
77                CF::UnknownProperties);
78
79    /// Configures properties read from .prf.xml
80    void configure(const CF::Properties&)
81        throw (CORBA::SystemException,
82            CF::PropertySet::InvalidConfiguration,
83            CF::PropertySet::PartialConfiguration);
84
85
86  private:
87    /// Disallow default constructor
88    FlexframeGen_i();
89
90    /// Disallow copy constructor
91    FlexframeGen_i(FlexframeGen_i&);
92
93    /// Main signal processing method
94    void ProcessData();
95    bool continue_processing();
96    volatile bool thread_started;
97    omni_mutex processing_mutex;
98   
99    omni_condition *component_running;  ///< for component shutdown
100    omni_thread *processing_thread;     ///< for component writer function
101       
102    // list components provides and uses ports
103    standardInterfaces_i::realChar_p *headerDataPortIn;
104    standardInterfaces_i::realChar_p *payloadDataPortIn;
105    standardInterfaces_i::complexFloat_u *frameDataPortOut;
106
107    bool verbose;
108
109    //
110    // signal processing objects
111    //
112
113    // frame generator
114    flexframegen fg;                // frame generator
115    flexframegenprops_s fgprops;    // frame generator properties
116    unsigned char header[14];
117    unsigned char * payload;
118    unsigned int payload_len;
119
120    std::complex<float> * frame;
121    unsigned int frame_len;
122
123    // matched filter interpolator
124    interp_crcf interp;
125
126    // half-band interpolator
127    resamp2_crcf interp2;
128};
129#endif
Note: See TracBrowser for help on using the browser.