root/experimental/components/Packetizer/trunk/Packetizer-metadata/src/Depacketizer.h @ 5373

Revision 5373, 3.1 KB (checked in by jgaeddert, 6 years ago)

modifying subheader extraction methods; initialization of external buffer pointers

  • Property svn:eol-style set to native
Line 
1/****************************************************************************
2
3Copyright 2006 Virginia Polytechnic Institute and State University
4
5This file is part of the OSSIE Depacketizer.
6
7OSSIE Depacketizer 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 Depacketizer 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 Depacketizer; 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 DEPACKETIZER_IMPL_H
25#define DEPACKETIZER_IMPL_H
26
27#include <stdlib.h>
28#include "ossie/cf.h"
29#include "ossie/debug.h"
30#include "ossie/Resource_impl.h"
31
32#include "ossie/PortTypes.h"
33#include "standardinterfaces/realChar_u.h"
34#include "standardinterfaces/realChar_p.h"
35
36#include "PacketizerDSP.h"
37
38class Depacketizer_i : public virtual Resource_impl, public PacketizerDSP
39{
40  public:
41    Depacketizer_i(const char *uuid, omni_condition *sem);
42    ~Depacketizer_i(void);
43
44    void start() throw (CF::Resource::StartError, CORBA::SystemException);
45    void stop() throw (CF::Resource::StopError, CORBA::SystemException);
46    void static run( void * data );
47
48    CORBA::Object_ptr getPort( const char* portName ) throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
49
50    void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
51
52    void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
53    void configure(const CF::Properties&) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration);
54
55
56  private:
57    Depacketizer_i();
58    Depacketizer_i(Depacketizer_i&);
59
60    void run_loop();
61
62    omni_condition *component_running;  // for component shutdown
63    omni_thread *processing_thread;     // for component writer function
64    omni_mutex accessPrivateData;       // for asynchronous configure() invocation
65   
66    CORBA::Long simple_0_value;
67    CORBA::Long simple_1_value;
68    CORBA::Long simple_2_value;
69
70   
71    //list components provides and uses ports
72    standardInterfaces_i::realChar_p *dataIn;
73    standardInterfaces_i::realChar_u *dataOut;
74    standardInterfaces::MetaData *metadata;
75
76    // ----- algorithm methods -----
77
78    unsigned int numControlCodesExtracted;
79    unsigned int numBitsExtracted;
80    int pnSyncCodeThreshold;        ///<
81    bool invertBits;                ///< negative correlation indicator
82
83    /// Operational mode
84    enum {
85        EXTRACT_PN_SYNC_CODE,
86        EXTRACT_PACKET_TYPE,
87        EXTRACT_CONTROL_CODES,
88        EXTRACT_HEADER,
89        EXTRACT_DATA_BLOCK,
90        EXTRACT_EOM_CODE
91    } operationalMode;
92
93};
94#endif
95
Note: See TracBrowser for help on using the browser.