root/ossiedev/branches/jeongo9/components/liquid-components/include/PacketDecoder.h @ 10646

Revision 10646, 2.8 KB (checked in by jeongo9, 2 years ago)

Fixed PacketEncoder? and PacketDecoder? to work with latest liquid-library

Line 
1/****************************************************************************
2
3Copyright 2010 by your_name_or_organization, all rights reserved.
4
5****************************************************************************/
6
7
8#ifndef PACKETDECODER_IMPL_H
9#define PACKETDECODER_IMPL_H
10
11#include <stdlib.h>
12#include "ossie/cf.h"
13#include "ossie/PortTypes.h"
14#include "ossie/Resource_impl.h"
15#include "ossie/debug.h"
16
17#include "standardinterfaces/realChar.h"
18#include "standardinterfaces/realChar_u.h"
19#include "standardinterfaces/realChar_p.h"
20
21#include <liquid/liquid.h>
22
23/** \brief
24 *
25 *
26 */
27class PacketDecoder_i : public virtual Resource_impl
28{
29  public:
30    /// Initializing constructor
31    PacketDecoder_i(const char *uuid, omni_condition *sem);
32
33    /// Destructor
34    ~PacketDecoder_i(void);
35
36    /// Static function for omni thread
37    static void Run( void * data );
38
39    ///
40    void start() throw (CF::Resource::StartError, CORBA::SystemException);
41
42    ///
43    void stop() throw (CF::Resource::StopError, CORBA::SystemException);
44
45    ///
46    CORBA::Object_ptr getPort( const char* portName )
47        throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
48
49    ///
50    void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
51
52    ///
53    void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
54
55    /// Query properties from .prf.xml
56    void query(CF::Properties&)
57        throw (CORBA::SystemException,
58                CF::UnknownProperties);
59
60    /// Configures properties read from .prf.xml
61    void configure(const CF::Properties&)
62        throw (CORBA::SystemException,
63            CF::PropertySet::InvalidConfiguration,
64            CF::PropertySet::PartialConfiguration);
65
66
67  private:
68    /// Disallow default constructor
69    PacketDecoder_i();
70
71    /// Disallow copy constructor
72    PacketDecoder_i(PacketDecoder_i&);
73
74    /// Main signal processing method
75    void ProcessData();
76    bool continue_processing();
77    volatile bool thread_started;
78    omni_mutex processing_mutex;
79   
80    omni_condition *component_running;  ///< for component shutdown
81    omni_thread *processing_thread;     ///< for component writer function
82       
83    CORBA::Boolean simple_0_value;
84    CORBA::Short simple_1_value;
85    CORBA::Short simple_2_value;
86
87   
88    // list components provides and uses ports
89    standardInterfaces_i::realChar_p *portCodedDataIn;
90    standardInterfaces_i::realChar_u *portDecodedDataOut;
91   
92    // dsp objects
93    packetizer p;               ///< packetizer object
94    fec_scheme fec_inner;       ///< inner FEC scheme
95    fec_scheme fec_outer;       ///< outer FEC scheme
96    crc_scheme crc;
97    unsigned int dec_msg_len;   ///< decoded message length
98    unsigned int enc_msg_len;   ///< encoded message length
99   
100};
101#endif
Note: See TracBrowser for help on using the browser.