root/ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/src/FrameAssemblerDSP.h @ 8831

Revision 8831, 3.1 KB (checked in by hvolos, 4 years ago)

remove metadata, add frame size properties

  • Property svn:eol-style set to native
Line 
1/****************************************************************************
2
3Copyright 2007 Virginia Polytechnic Institute and State University
4
5This file is part of the OSSIE FrameAssembler.
6
7OSSIE FrameAssembler 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 FrameAssembler 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 FrameAssembler; 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 FRAMEASSEMBLERDSP_IMPL_H
25#define FRAMEASSEMBLERDSP_IMPL_H
26
27#include <stdlib.h>
28#include "sigproc/SigProc.h"
29#include "PNCodes.h"
30
31//#define FRAME_SIZE_1 2048   ///< Frame size option 1
32//#define FRAME_SIZE_2 4096   ///< Frame size option 2
33//#define FRAME_SIZE_3 8192   ///< Frame size option 3
34//#define FRAME_SIZE_4 512    ///< Frame size option 4
35
36
37
38/** \brief
39 *
40 *
41 */
42class FrameAssemblerDSP
43{
44  public:
45    /// Initializing constructor
46    FrameAssemblerDSP();
47
48    /// Destructor
49    ~FrameAssemblerDSP();
50   
51    void SetFrameSize(unsigned int inframesize, unsigned int inframesizeno);
52
53    unsigned int GetFrameSize(unsigned int inframesizeno);
54
55  protected:
56    /// Configure frame for particular modulation scheme
57    void ConfigureModulationScheme(SigProc::ModulationScheme _ms);
58
59    /// Configure frame for a certain number of output symbols
60    void ConfigureFrameType(unsigned int _ft);
61
62    /// Configure frame for a certain number of output symbols
63    void ConfigureFrameSize(unsigned int _fs);
64
65    ///
66    unsigned int frameSize;
67   
68    unsigned int FRAME_SIZE_1,FRAME_SIZE_2,FRAME_SIZE_3,FRAME_SIZE_4;
69
70    ///
71    unsigned int numFrameSymbolsAssembled;
72
73    ///
74    char ** controlBlock;
75
76    /// Generates 512-bit \c 10101010 phasing pattern
77    void AssemblePhasingPattern(short * I_out, short * Q_out);
78
79    /// Generates 512-bit header
80    void AssembleHeader(short * I_out, short * Q_out);
81
82    /// Modulates input bits
83    void AssembleFrame(char * bits_in, short * I_out, short * Q_out);
84
85    /// Generates postamble...
86    /// \todo determine what information should be included here
87    void AssemblePostamble();
88
89    /// Operational mode
90    enum {
91        ASSEMBLE_PREAMBLE,
92        ASSEMBLE_HEADER,
93        ASSEMBLE_FRAME,
94        ASSEMBLE_EOM_CODE
95    } operationalMode;
96
97    /// Type of frame to configure
98    enum {
99        FRAME_TYPE_DATA=0,
100        FRAME_TYPE_CONTROL=1,
101        FRAME_TYPE_X,
102        FRAME_TYPE_Y
103    } frameType;
104
105  private:
106    /// Disallow copy constructor
107    FrameAssemblerDSP(FrameAssemblerDSP&);
108
109    ///
110    void WriteSequence(char * bits_in, unsigned int N_in, short * I_out, short * Q_out);
111
112};
113
114#endif
115
Note: See TracBrowser for help on using the browser.