Changeset 8935

Show
Ignore:
Timestamp:
03/09/09 17:28:21 (4 years ago)
Author:
hvolos
Message:

Added properties to RxTxManager?

Location:
ossiedev/branches/hvolos/packetwfrm/components/RxTxManager
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/hvolos/packetwfrm/components/RxTxManager/RxTxManager.cpp

    r8841 r8935  
    3333 
    3434 
    35  
    36 const float RxTxManager_i::frs_channels[14] = { 
    37     462.5625e+06f, 
    38     462.5875e+06f, 
    39     462.6125e+06f, 
    40     462.6375e+06f, 
    41     462.6625e+06f, 
    42     462.6875e+06f, 
    43     462.7125e+06f, 
    44     467.5625e+06f, 
    45     467.5875e+06f, 
    46     467.6125e+06f, 
    47     467.6375e+06f, 
    48     467.6625e+06f, 
    49     467.6875e+06f, 
    50     467.7125e+06f}; 
    5135 
    5236RxTxManager_i::RxTxManager_i(const char *uuid, omni_condition *condition) : 
     
    6650 
    6751    // Initialize RF properties 
    68     current_frs_channel = 1; 
     52 
    6953    tx_interp = 512; 
    70     tx_freq = frs_channels[current_frs_channel-1]; 
     54    tx_freq = 462.5625e+06; 
    7155    tx_gain = 1;                // USRP tx gain, not RxTxManager gain_tx 
    7256    tx_start = true; 
    7357    rx_decim = 256; 
    7458    rx_gain_max = 1; 
    75     rx_freq = frs_channels[current_frs_channel-1]; 
     59    rx_freq = 462.5625e+06; 
    7660    rx_gain = 1; 
    7761    rx_size = 2048; 
     
    8266    rx_power_threshold_lo = 20.0f; 
    8367    rx_power_threshold_hi = 35.0f; 
     68    conjugate_rx=false; 
    8469  
    8570 
     
    284269    { 
    285270        std::cout << "Property id : " << props[i].id << std::endl; 
     271         
     272        if (strcmp(props[i].id, "DCE:c1fe96b4-52db-458a-bef8-ff0834548fc3") == 0) { 
     273            // RX Frequency 
     274            CORBA::Float F; 
     275            props[i].value >>= F; 
     276            DEBUG(3, RxTxManager, "RX Frequency property= " << F) 
     277            rx_freq = F; 
     278            RXControl->set_frequency(DEFAULT_USRP_RX_CHANNEL, rx_freq); 
     279        } else if (strcmp(props[i].id, "DCE:ddd746f5-a99f-414e-9d98-6470ecf75454") == 0) { 
     280            // TX Frequency 
     281            CORBA::Float F; 
     282            props[i].value >>= F; 
     283            DEBUG(3, RxTxManager, "TX Frequency property= " << F) 
     284            tx_freq = F; 
     285            TXControl->set_frequency(DEFAULT_USRP_TX_CHANNEL, tx_freq); 
     286        } else if (strcmp(props[i].id, "DCE:4ba6cb86-29fb-40c8-a90c-7e69b7e59d85") == 0) { 
     287           const char * prop_str; 
     288            props[i].value >>= prop_str; 
     289            if ( strcmp(prop_str, "True") == 0 ) { 
     290               conjugate_rx=true; 
     291            } else if ( strcmp(prop_str, "False") == 0 ){ 
     292               conjugate_rx=false; 
     293            } else { 
     294              std::cerr << "ERROR: Channel::configure() unknown envelope type" << std::endl; 
     295               throw CF::PropertySet::InvalidConfiguration(); 
     296           }; 
     297         } 
    286298 
    287299    } 
     
    355367        I_out_rx.length(N_out); 
    356368        Q_out_rx.length(N_out); 
    357         for (i=0; i<N_in; i++) { 
    358             // apply IIR pre-filter 
    359             lpf_i->do_work((*I_in_rx)[i], I_buf[i]); 
    360             lpf_q->do_work(-(*Q_in_rx)[i], Q_buf[i]); 
     369         
     370        if (conjugate_rx==true){ 
     371                for (i=0; i<N_in; i++) { 
     372                    // apply IIR pre-filter 
     373                    lpf_i->do_work((*I_in_rx)[i], I_buf[i]); 
     374                    lpf_q->do_work(-(*Q_in_rx)[i], Q_buf[i]); 
     375                    } 
     376        } else { 
     377                for (i=0; i<N_in; i++) { 
     378                    // apply IIR pre-filter 
     379                    lpf_i->do_work((*I_in_rx)[i], I_buf[i]); 
     380                    lpf_q->do_work((*Q_in_rx)[i], Q_buf[i]); 
     381                } 
    361382        } 
    362  
    363383 
    364384  
  • ossiedev/branches/hvolos/packetwfrm/components/RxTxManager/RxTxManager.h

    r8796 r8935  
    159159 
    160160    // RxTxManager RF properties 
    161     int current_frs_channel; 
    162     int num_channels; 
     161    bool conjugate_rx; 
     162 
    163163    float gain_tx; 
    164164    float rx_power_threshold_lo; 
  • ossiedev/branches/hvolos/packetwfrm/components/RxTxManager/RxTxManager.prf.xml

    r8795 r8935  
    44<!--Powered by Python--> 
    55<properties> 
     6    <simple id="DCE:89b1a5b3-0623-4d66-b436-6482a6aab765" mode="readonly" name="Conjugate Rx Data" type="string"> 
     7        <value>True</value>  
     8        <description>Might need to set to "True" for some USRP Daughterboards</description>  
     9        <kind kindtype="configure"/> 
     10    </simple> 
     11    <simple type="float" id="DCE:ddd746f5-a99f-414e-9d98-6470ecf75454" name="tx_freq" mode="readwrite"> 
     12        <description>Transmitter Frequency</description>  
     13        <value>465.5625e+06</value>  
     14        <kind kindtype="configure"/> 
     15    </simple> 
     16    <simple type="float" id="DCE:c1fe96b4-52db-458a-bef8-ff0834548fc3" name="rx_freq" mode="readwrite"> 
     17        <description>Receiver Frequency</description>  
     18        <value>465.5625e+06</value>  
     19        <kind kindtype="configure"/> 
     20    </simple> 
    621</properties> 
  • ossiedev/branches/hvolos/packetwfrm/components/RxTxManager/RxTxManager.spd.xml

    r8795 r8935  
    55<softpkg id="DCE:8f1fa7f6-77cd-4d3e-885f-6a8118647237" name="RxTxManager"> 
    66    <title/> 
    7     <description>The main CIREN controlling entity</description>  
     7    <description>Controls the RX and TX operation</description>  
    88    <author> 
    99        <name>OSSIE Project</name>  
  • ossiedev/branches/hvolos/packetwfrm/components/RxTxManager/documentation.txt

    r5541 r8935  
    33Copyright 2007 Virginia Polytechnic Institute and State University 
    44 
    5 This file is part of the OSSIE CIREN_SM. 
     5This file is part of the OSSIE RxTxManager. 
    66 
    7 OSSIE CIREN_SM is free software; you can redistribute it and/or modify 
     7OSSIE RxTxManager is free software; you can redistribute it and/or modify 
    88it under the terms of the GNU General Public License as published by 
    99the Free Software Foundation; either version 2 of the License, or 
    1010(at your option) any later version. 
    1111 
    12 OSSIE CIREN_SM is distributed in the hope that it will be useful, 
     12OSSIE RxTxManager is distributed in the hope that it will be useful, 
    1313but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     
    1616 
    1717You should have received a copy of the GNU General Public License 
    18 along with OSSIE CIREN_SM; if not, write to the Free Software 
     18along with OSSIE RxTxManager; if not, write to the Free Software 
    1919Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2020 
    2121****************************************************************************/ 
    2222 
    23 /*! \mainpage CIREN_SM 
     23/*! \mainpage RxTxManager 
    2424 
    2525\section description Basic description 
    26 This component implements the CIREN protocol and interfaces with the 
    27 physical-layer components. 
     26 
    2827 
    2928\section properties Properties