root/components/USRP_TX_Control/branches/USRP_Commander/USRP_Commander.h @ 4529

Revision 4529, 2.7 KB (checked in by jgaeddert, 7 years ago)

Expanding USRPCommander component functionality

  • 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 USRP_Commander.
6
7OSSIE USRP_Commander 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 USRP_Commander 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 USRP_Commander; 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 USRP_COMMANDER_IMPL_H
25#define USRP_COMMANDER_IMPL_H
26
27#include <stdlib.h>
28#include "ossie/cf.h"
29
30
31#include "ossie/PortTypes.h"
32
33#include "standardinterfaces/Radio_Control_u.h"
34#include "standardinterfaces/Resource_u.h"
35
36#include "ossie/Resource_impl.h"
37
38class USRP_Commander_i : public virtual Resource_impl
39{
40  public:
41    USRP_Commander_i(const char *uuid, omni_condition *sem);
42
43    void start() throw (CF::Resource::StartError, CORBA::SystemException);
44    void stop() throw (CF::Resource::StopError, CORBA::SystemException);
45
46    CORBA::Object_ptr getPort( const char* portName ) throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);
47
48    void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException);
49
50    void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException);
51    void configure(const CF::Properties&) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration);
52
53
54  private:
55    USRP_Commander_i();
56    USRP_Commander_i(USRP_Commander_i&);
57
58    omni_condition *component_running;  //for component shutdown
59
60    omni_mutex accessPrivateData;
61
62    // USRP TX properties
63    short tx_interp;    ///< TX interpolation factor
64    float tx_freq;      ///< TX frequency
65    bool  tx_start;     ///< Start transmitter?
66
67    // USRP RX properties
68    short rx_decim;     ///< RX decimation factor
69    short rx_gain_max;  ///< Maximum RX gain
70    float rx_freq;      ///< RX frequency
71    float rx_gain;      ///< RX gain
72    long  rx_size;      ///< RX packet size
73    bool  rx_start;     ///< Start receiver?
74
75   
76    //list components provides and uses ports
77    standardInterfaces_i::TX_Control_u *TXControl;
78    standardInterfaces_i::RX_Control_u *RXControl;
79    standardInterfaces_i::Resource_u *data_control;
80
81};
82#endif
83
Note: See TracBrowser for help on using the browser.