Changeset 9448

Show
Ignore:
Timestamp:
07/16/09 16:13:21 (4 years ago)
Author:
hvolos
Message:

added some initial multiplexing

Location:
ossiedev/branches/hvolos/components/MIMOEnc
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.cpp

    r9338 r9448  
    1313    Resource_impl(uuid), component_running(condition)  
    1414{ 
    15     dataIn_0 = new standardInterfaces_i::complexShort_p("Symbols_IN"); 
    16     dataOut_0 = new standardInterfaces_i::complexShort_u("MUX_MIMO_Symbols_OUT"); 
     15    dataOut = new standardInterfaces_i::complexShort_u("MIMO_Symbols_OUT"); 
     16    dataIn = new standardInterfaces_i::complexShort_p("Symbols_IN"); 
    1717 
    1818    //Create the thread for the writer's processing function  
     
    2626MIMOEnc_i::~MIMOEnc_i(void) 
    2727{    
    28     delete dataIn_0; 
    29     delete dataOut_0; 
     28    delete dataOut; 
     29    delete dataIn; 
    3030} 
    3131 
     
    4343    CORBA::Object_var p; 
    4444 
    45     p = dataIn_0->getPort(portName); 
     45    p = dataOut->getPort(portName); 
    4646 
    4747    if (!CORBA::is_nil(p)) 
    4848        return p._retn(); 
    4949 
    50     p = dataOut_0->getPort(portName); 
     50    p = dataIn->getPort(portName); 
    5151 
    5252    if (!CORBA::is_nil(p)) 
     
    9595        std::cout << "Property id : " << props[i].id << std::endl; 
    9696 
    97         if (strcmp(props[i].id, "DCE:4c5f385e-3b3e-11de-b7e0-0000e80014f9") == 0) 
     97        if (strcmp(props[i].id, "DCE:bc772f0e-6fee-11de-b7e0-0000e80014f9") == 0) 
    9898        { 
    9999            CORBA::Short simple_temp; 
    100100            props[i].value >>= simple_temp; 
    101             simple_0_value = simple_temp; 
     101            Mr = simple_temp; 
    102102        } 
    103103 
    104         if (strcmp(props[i].id, "DCE:74a38a7c-3b3e-11de-b7e0-0000e80014f9") == 0) 
     104        if (strcmp(props[i].id, "DCE:c8545ac2-6fee-11de-b7e0-0000e80014f9") == 0) 
    105105        { 
     106            CORBA::Short simple_temp; 
     107            props[i].value >>= simple_temp; 
     108            Nt = simple_temp; 
     109        } 
     110 
     111        if (strcmp(props[i].id, "DCE:ddce813e-6fee-11de-b7e0-0000e80014f9") == 0) 
     112        { 
     113          const char * prop_str; 
     114            props[i].value >>= prop_str; 
     115            MIMOmethod=prop_str; 
     116        } 
     117    } 
    106118} 
    107119 
     
    110122    DEBUG(3, MIMOEnc, "ProcessData() invoked") 
    111123 
    112     PortTypes::ShortSequence I_out_0, Q_out_0; 
     124    PortTypes::ShortSequence I_out, Q_out; 
    113125 
    114126 
    115     PortTypes::ShortSequence *I_in_0(NULL), *Q_in_0(NULL); 
    116     CORBA::UShort I_in_0_length, Q_in_0_length; 
     127    PortTypes::ShortSequence *I_in(NULL), *Q_in(NULL); 
     128     
     129    CORBA::UShort Data_length; 
    117130 
    118131    while(1) 
    119132    { 
    120         dataIn_0->getData(I_in_0, Q_in_0); 
     133        dataIn->getData(I_in, Q_in); 
    121134 
    122         I_in_0_length = I_in_0->length(); 
    123         Q_in_0_length = Q_in_0->length(); 
     135        Data_length = I_in->length(); 
    124136 
    125         I_out_0.length(); //must define length of output 
    126         Q_out_0.length(); //must define length of output 
     137 
     138        I_out.length(Data_length/2); //must define length of output 
     139        Q_out.length(Data_length/2); //must define length of output 
    127140 
    128141        /*insert code here to do work*/ 
     142         
     143        for (short int i=0; i<Data_length/Nt;i++){ 
     144                for (short int j=0;j<Nt;j++){ 
     145                I_out[i]=(*I_in)[i*Nt+j]; 
     146                Q_out[i]=(*Q_in)[i*Nt+j]; 
     147                } 
     148        }  
    129149 
    130150 
    131  
    132  
    133  
    134  
    135         dataIn_0->bufferEmptied(); 
    136         dataOut_0->pushPacket(I_out_0, Q_out_0); 
     151        dataIn->bufferEmptied(); 
     152        dataOut->pushPacket(I_out, Q_out); 
    137153    } 
    138154} 
  • ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.h

    r9338 r9448  
    1919#include "standardinterfaces/complexShort_u.h" 
    2020#include "standardinterfaces/complexShort_p.h" 
     21#include "standardinterfaces/realChar.h" 
     22#include "standardinterfaces/realChar_u.h" 
     23#include "standardinterfaces/realChar_p.h" 
    2124 
    2225/** \brief 
     
    7275    omni_thread *processing_thread;     ///< for component writer function 
    7376         
    74         CORBA::Short simple_0_value; 
    75         CORBA::String simple_1_value; 
     77        CORBA::Short Mr; //number of rx antennas 
     78        CORBA::Short Nt; //number of tx antennas 
     79        const char * MIMOmethod; 
    7680 
    7781     
    7882    // list components provides and uses ports 
    79         standardInterfaces_i::complexShort_p *dataIn_0; 
    80         standardInterfaces_i::complexShort_u *dataOut_0; 
     83        standardInterfaces_i::complexShort_u *dataOut; 
     84        standardInterfaces_i::complexShort_p *dataIn; 
    8185     
    8286}; 
  • ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.prf.xml

    r9338 r9448  
    55<properties> 
    66    <description>These are the properties to configure the device manager</description>  
    7     <simple id="DCE:4c5f385e-3b3e-11de-b7e0-0000e80014f9" mode="readonly" name="No of TX Antennas" type="short"> 
     7    <simple id="DCE:bc772f0e-6fee-11de-b7e0-0000e80014f9" mode="readonly" name="RX antennas" type="short"> 
    88        <value>2</value>  
    9         <description>Specifies the number of TX antennas. 1 disables the MIMO encoding</description>  
     9        <description>The number of antennas at the receiver</description>  
    1010        <kind kindtype="configure"/> 
    1111    </simple> 
    12     <simple id="DCE:74a38a7c-3b3e-11de-b7e0-0000e80014f9" mode="readonly" name="MIMO Method" type="string"> 
     12    <simple id="DCE:c8545ac2-6fee-11de-b7e0-0000e80014f9" mode="readonly" name="TX antennas" type="short"> 
     13        <value>2</value>  
     14        <description>The number of antennas at the transmiiter</description>  
     15        <kind kindtype="configure"/> 
     16    </simple> 
     17    <simple id="DCE:ddce813e-6fee-11de-b7e0-0000e80014f9" mode="readonly" name="MIMO Method" type="string"> 
    1318        <value>STBC</value>  
    14         <description>The MIMO method used, currently supports STBC (Alamouti) and VBLAST</description>  
     19        <description>The MIMO method used. Available methods: STBC &amp; VBLAST</description>  
    1520        <kind kindtype="configure"/> 
    1621    </simple> 
  • ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.scd.xml

    r9338 r9448  
    1717                <porttype type="data"/> 
    1818            </provides> 
    19             <uses repid="IDL:standardInterfaces/complexShort:1.0" usesname="MUX_MIMO_Symbols_OUT"> 
     19            <uses repid="IDL:standardInterfaces/complexShort:1.0" usesname="MIMO_Symbols_OUT"> 
    2020                <porttype type="data"/> 
    2121            </uses> 
  • ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.spd.xml

    r9338 r9448  
    33<!--Created with OSSIE WaveDev--> 
    44<!--Powered by Python--> 
    5 <softpkg id="DCE:7ca34596-3b3e-11de-b7e0-0000e80014f9" name="MIMOEnc"> 
     5<softpkg id="DCE:e2fcc01c-6fee-11de-b7e0-0000e80014f9" name="MIMOEnc"> 
    66    <title/> 
    7     <description>Implements MIMO methods such as STBC and VBLAST</description>  
     7    <description>Implements different MIMO methods such as STBC and VBLAST</description>  
    88    <author> 
    99        <name>OSSIE Project</name>  
     
    1717        <localfile name="xml/MIMOEnc/MIMOEnc.scd.xml"/> 
    1818    </descriptor> 
    19     <implementation id="DCE:7ca54f76-3b3e-11de-b7e0-0000e80014f9"> 
     19    <implementation id="DCE:e2fd36e6-6fee-11de-b7e0-0000e80014f9"> 
    2020        <description>Description</description>  
    2121        <code type="Executable">