Changeset 9448
- Timestamp:
- 07/16/09 16:13:21 (4 years ago)
- Location:
- ossiedev/branches/hvolos/components/MIMOEnc
- Files:
-
- 5 modified
-
MIMOEnc.cpp (modified) (5 diffs)
-
MIMOEnc.h (modified) (2 diffs)
-
MIMOEnc.prf.xml (modified) (1 diff)
-
MIMOEnc.scd.xml (modified) (1 diff)
-
MIMOEnc.spd.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.cpp
r9338 r9448 13 13 Resource_impl(uuid), component_running(condition) 14 14 { 15 data In_0 = new standardInterfaces_i::complexShort_p("Symbols_IN");16 data Out_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"); 17 17 18 18 //Create the thread for the writer's processing function … … 26 26 MIMOEnc_i::~MIMOEnc_i(void) 27 27 { 28 delete data In_0;29 delete data Out_0;28 delete dataOut; 29 delete dataIn; 30 30 } 31 31 … … 43 43 CORBA::Object_var p; 44 44 45 p = data In_0->getPort(portName);45 p = dataOut->getPort(portName); 46 46 47 47 if (!CORBA::is_nil(p)) 48 48 return p._retn(); 49 49 50 p = data Out_0->getPort(portName);50 p = dataIn->getPort(portName); 51 51 52 52 if (!CORBA::is_nil(p)) … … 95 95 std::cout << "Property id : " << props[i].id << std::endl; 96 96 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) 98 98 { 99 99 CORBA::Short simple_temp; 100 100 props[i].value >>= simple_temp; 101 simple_0_value= simple_temp;101 Mr = simple_temp; 102 102 } 103 103 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) 105 105 { 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 } 106 118 } 107 119 … … 110 122 DEBUG(3, MIMOEnc, "ProcessData() invoked") 111 123 112 PortTypes::ShortSequence I_out _0, Q_out_0;124 PortTypes::ShortSequence I_out, Q_out; 113 125 114 126 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; 117 130 118 131 while(1) 119 132 { 120 dataIn _0->getData(I_in_0, Q_in_0);133 dataIn->getData(I_in, Q_in); 121 134 122 I_in_0_length = I_in_0->length(); 123 Q_in_0_length = Q_in_0->length(); 135 Data_length = I_in->length(); 124 136 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 127 140 128 141 /*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 } 129 149 130 150 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); 137 153 } 138 154 } -
ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.h
r9338 r9448 19 19 #include "standardinterfaces/complexShort_u.h" 20 20 #include "standardinterfaces/complexShort_p.h" 21 #include "standardinterfaces/realChar.h" 22 #include "standardinterfaces/realChar_u.h" 23 #include "standardinterfaces/realChar_p.h" 21 24 22 25 /** \brief … … 72 75 omni_thread *processing_thread; ///< for component writer function 73 76 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; 76 80 77 81 78 82 // 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; 81 85 82 86 }; -
ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.prf.xml
r9338 r9448 5 5 <properties> 6 6 <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"> 8 8 <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> 10 10 <kind kindtype="configure"/> 11 11 </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"> 13 18 <value>STBC</value> 14 <description>The MIMO method used , currently supports STBC (Alamouti) andVBLAST</description>19 <description>The MIMO method used. Available methods: STBC & VBLAST</description> 15 20 <kind kindtype="configure"/> 16 21 </simple> -
ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.scd.xml
r9338 r9448 17 17 <porttype type="data"/> 18 18 </provides> 19 <uses repid="IDL:standardInterfaces/complexShort:1.0" usesname="M UX_MIMO_Symbols_OUT">19 <uses repid="IDL:standardInterfaces/complexShort:1.0" usesname="MIMO_Symbols_OUT"> 20 20 <porttype type="data"/> 21 21 </uses> -
ossiedev/branches/hvolos/components/MIMOEnc/MIMOEnc.spd.xml
r9338 r9448 3 3 <!--Created with OSSIE WaveDev--> 4 4 <!--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"> 6 6 <title/> 7 <description>Implements MIMO methods such as STBC and VBLAST</description>7 <description>Implements different MIMO methods such as STBC and VBLAST</description> 8 8 <author> 9 9 <name>OSSIE Project</name> … … 17 17 <localfile name="xml/MIMOEnc/MIMOEnc.scd.xml"/> 18 18 </descriptor> 19 <implementation id="DCE: 7ca54f76-3b3e-11de-b7e0-0000e80014f9">19 <implementation id="DCE:e2fd36e6-6fee-11de-b7e0-0000e80014f9"> 20 20 <description>Description</description> 21 21 <code type="Executable">