Changeset 9480
- Timestamp:
- 07/24/09 16:11:21 (4 years ago)
- Location:
- ossiedev/branches/0.7.x/components/Channel
- Files:
-
- 3 modified
-
Channel.cpp (modified) (12 diffs)
-
Channel.h (modified) (3 diffs)
-
Channel.prf.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/0.7.x/components/Channel/Channel.cpp
r9425 r9480 1 1 /**************************************************************************** 2 2 3 Copyright 2007 Virginia Polytechnic Institute and State University 4 5 This file is part of the OSSIE Channel. 6 7 OSSIE Channel is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 OSSIE Channel is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Channel; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 21 ****************************************************************************/ 22 3 Copyright 2007 Virginia Polytechnic Institute and State University 4 5 This file is part of the OSSIE Channel. 6 7 OSSIE Channel is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 OSSIE Channel is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Channel; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 21 ****************************************************************************/ 23 22 24 23 #include <string> 25 24 #include <iostream> 26 #include <ctime> 25 #include <ctime> 27 26 #include "math.h" 28 27 #include "Channel.h" 29 28 30 Channel_i::Channel_i(const char *uuid, omni_condition *condition) : 31 Resource_impl(uuid), component_running(condition) 32 { 29 Channel_i::Channel_i(const char *uuid, omni_condition *condition) : 30 Resource_impl(uuid), component_running(condition) { 33 31 dataIn = new standardInterfaces_i::complexShort_p("data_in"); 34 32 dataOut = new standardInterfaces_i::complexShort_u("data_out"); … … 40 38 MaxDopplerRate=0; 41 39 envelope=true; 42 srand(time(0));43 44 //Create the thread for the writer's processing function 40 srand(time(0)); 41 42 //Create the thread for the writer's processing function 45 43 processing_thread = new omni_thread(Run, (void *) this); 46 44 47 //Start the thread containing the writer's processing function 45 //Start the thread containing the writer's processing function 48 46 processing_thread->start(); 49 47 50 51 } 52 53 Channel_i::~Channel_i(void) 54 { 48 } 49 50 Channel_i::~Channel_i(void) { 55 51 delete dataIn; 56 52 delete dataOut; … … 58 54 59 55 // Static function for omni thread 60 void Channel_i::Run( void * data ) 61 { 62 ((Channel_i*)data)->ProcessData(); 63 } 64 65 CORBA::Object_ptr Channel_i::getPort( const char* portName ) throw ( 66 CORBA::SystemException, CF::PortSupplier::UnknownPort) 67 { 56 void Channel_i::Run(void * data) { 57 ((Channel_i *)data)->ProcessData(); 58 } 59 60 CORBA::Object_ptr Channel_i::getPort(const char*portName) 61 throw ( CORBA::SystemException, CF::PortSupplier::UnknownPort) { 68 62 DEBUG(3, Channel, "getPort() invoked with " << portName) 69 63 70 64 CORBA::Object_var p; 71 65 … … 84 78 } 85 79 86 void Channel_i::start() throw (CORBA::SystemException, 87 CF::Resource::StartError) 88 { 89 DEBUG(3, Channel, "start() invoked") 90 } 91 92 void Channel_i::stop() throw (CORBA::SystemException, CF::Resource::StopError) 93 { 94 DEBUG(3, Channel, "stop() invoked") 95 } 96 80 void Channel_i::start() throw (CORBA::SystemException, 81 CF::Resource::StartError) { 82 DEBUG (3 ,Channel,"start()invoked") 83 } 84 85 void Channel_i::stop() throw (CORBA::SystemException, CF::Resource::StopError) { 86 DEBUG(3, Channel, "stop()invoked") 87 } 97 88 void Channel_i::releaseObject() throw (CORBA::SystemException, 98 CF::LifeCycle::ReleaseError) 99 { 100 DEBUG(3, Channel, "releaseObject() invoked") 101 89 CF::LifeCycle::ReleaseError) { 90 DEBUG (3, Channel,"releaseObject() invoked" ) 91 102 92 component_running->signal(); 103 93 } 104 94 105 95 void Channel_i::initialize() throw (CF::LifeCycle::InitializeError, 106 CORBA::SystemException) 107 { 108 DEBUG(3, Channel, "initialize() invoked") 109 } 110 111 void 112 Channel_i::query (CF::Properties & configProperties) 113 throw (CORBA::SystemException, CF::UnknownProperties) 114 { 115 if (configProperties.length () == 0) 116 { 117 configProperties.length (propertySet.length ()); 118 for (unsigned int i = 0; i < propertySet.length (); i++) 119 { 120 configProperties[i].id = CORBA::string_dup (propertySet[i].id); 96 CORBA::SystemException) { 97 DEBUG(3,Channel , "initialize() invoked") 98 } 99 100 void Channel_i::query(CF::Properties & configProperties) 101 throw (CORBA::SystemException, CF::UnknownProperties) { 102 if (configProperties.length() == 0) { 103 configProperties.length(propertySet.length()); 104 for (unsigned int i = 0; i < propertySet.length(); i++) { 105 configProperties[i].id = CORBA::string_dup(propertySet[i].id); 121 106 configProperties[i].value = propertySet[i].value; 122 107 } 123 108 124 return ; 109 return; 110 } else { 111 for (unsigned int i = 0; i < configProperties.length(); i++) { 112 for (unsigned int j=0; j < propertySet.length(); j++) { 113 if (strcmp(configProperties[i].id, propertySet[i].id) == 0) { 114 configProperties[i].value = propertySet[i].value; 115 } 116 } 117 } 125 118 } 126 else { 127 for (unsigned int i = 0; i < configProperties.length(); i++) { 128 for (unsigned int j=0; j < propertySet.length(); j++) { 129 if ( strcmp(configProperties[i].id, propertySet[i].id) == 0 ){ 130 configProperties[i].value = propertySet[i].value; 131 } 132 } 133 } 134 } 135 } 136 119 } 137 120 138 121 void Channel_i::configure(const CF::Properties& props) 139 122 throw (CORBA::SystemException, 140 CF::PropertySet::InvalidConfiguration, 141 CF::PropertySet::PartialConfiguration) 142 { 143 static int init = 0; 123 CF::PropertySet::InvalidConfiguration, 124 CF::PropertySet::PartialConfiguration) { 125 static int init = 0; 144 126 DEBUG(3, Channel, "configure() invoked") 145 146 if (init == 0) {147 if ( props.length() <= 0 ) {127 128 if (init == 0) { 129 if ( props.length() <= 0 ) { 148 130 std::cout << "Channel: configure called with invalid props.length() - " << props.length() << std::endl; 149 131 return; 150 132 } 151 152 propertySet.length(props.length());133 134 propertySet.length(props.length()); 153 135 for (unsigned int i=0; i < props.length(); i++) { 154 136 std::cout << "Property Id : " << props[i].id << std::endl; … … 158 140 init = 1; 159 141 } 160 for (unsigned int i=0; i < props.length(); i++) { 161 if (strcmp(props[i].id, "DCE:eddc66ce-8a82-11dd-ae05-0016769e497b") == 0) { 162 //The power of the AWGN noise 163 CORBA::Long simple_temp; 164 props[i].value >>= simple_temp; 165 noise_sigma = sqrt(simple_temp/2.0); 166 for (unsigned int j=0; j < propertySet.length(); j++ ) { 167 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 168 propertySet[i].value = props[i].value; 169 break; 170 } 171 } 172 } else if (strcmp(props[i].id, "DCE:3bbc0656-8a83-11dd-bcd3-0016769e497b") == 0) { 173 //Specifies the fading type. Valid values are None and Ricean 174 const char * prop_str; 175 props[i].value >>= prop_str; 176 if ( strcmp(prop_str, "None") == 0 ) { 177 fading=false; 178 } else if ( strcmp(prop_str, "Ricean") == 0 ){ 179 fading=true; 180 } else { 181 std::cerr << "ERROR: Channel::configure() unknown fading type" << std::endl; 182 throw CF::PropertySet::InvalidConfiguration(); 183 }; 184 for (unsigned int j=0; j < propertySet.length(); j++ ) { 185 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 186 propertySet[i].value = props[i].value; 187 break; 188 } 189 } 190 } else if (strcmp(props[i].id, "DCE:4ba6cb86-29fb-40c8-a90c-7e69b7e59d85") == 0) { 191 const char * prop_str; 192 props[i].value >>= prop_str; 193 if ( strcmp(prop_str, "True") == 0 ) { 194 envelope=true; 195 } else if ( strcmp(prop_str, "False") == 0 ){ 196 envelope=false; 197 } else { 198 std::cerr << "ERROR: Channel::configure() unknown envelope type" << std::endl; 199 throw CF::PropertySet::InvalidConfiguration(); 200 }; 201 for (unsigned int j=0; j < propertySet.length(); j++ ) { 202 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 203 propertySet[i].value = props[i].value; 204 break; 205 } 206 } 207 } else if (strcmp(props[i].id, "DCE:76abee66-8a83-11dd-b96d-0016769e497b") == 0) { 208 // K_factor 209 CORBA::Double simple_temp; 210 props[i].value >>= simple_temp; 211 K_factor=simple_temp; 212 for (unsigned int j=0; j < propertySet.length(); j++ ) { 213 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 214 propertySet[i].value = props[i].value; 215 break; 216 } 217 } 218 } else if (strcmp(props[i].id, "DCE:9cc6196c-8a85-11dd-b572-0016769e497b") == 0) { 219 // The maximum doppler rate in terms of the sample rate 220 CORBA::Double simple_temp; 221 props[i].value >>= simple_temp; 222 MaxDopplerRate=simple_temp; 223 for (unsigned int j=0; j < propertySet.length(); j++ ) { 224 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 225 propertySet[i].value = props[i].value; 226 break; 227 } 228 } 229 } 230 } 231 std::cout<<"noise_sigma:"<<noise_sigma<<"fading:"<<fading<<"envelope"<<envelope<<"K_factor:"<<K_factor<<"MaxDopplerRate"<<MaxDopplerRate<<std::endl; 232 233 } 234 235 void Channel_i::ProcessData() 236 { 142 for (unsigned int i=0; i < props.length(); i++) { 143 if (strcmp(props[i].id, "DCE:1d91b55a-2fcb-4d2d-ad7b-1ee58c32cad8") == 0) { 144 //The number of samples per symbol 145 CORBA::Short simple_temp; 146 props[i].value >>= simple_temp; 147 Ns = simple_temp; 148 for (unsigned int j=0; j < propertySet.length(); j++ ) { 149 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 150 propertySet[i].value = props[i].value; 151 break; 152 } 153 } 154 } else if (strcmp(props[i].id, "DCE:eddc66ce-8a82-11dd-ae05-0016769e497b") == 0) { 155 //The power of the AWGN noise 156 CORBA::Long simple_temp; 157 props[i].value >>= simple_temp; 158 noise_sigma = sqrt(simple_temp/2.0); 159 for (unsigned int j=0; j < propertySet.length(); j++ ) { 160 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 161 propertySet[i].value = props[i].value; 162 break; 163 } 164 } 165 } else if (strcmp(props[i].id, "DCE:3bbc0656-8a83-11dd-bcd3-0016769e497b") == 0) { 166 //Specifies the fading type. Valid values are None and Ricean 167 const char * prop_str; 168 props[i].value >>= prop_str; 169 if ( strcmp(prop_str, "None") == 0 ) { 170 fading=false; 171 } else if ( strcmp(prop_str, "Ricean") == 0 ) { 172 fading=true; 173 } else { 174 std::cerr << "ERROR: Channel::configure() unknown fading type" << std::endl; 175 throw CF::PropertySet::InvalidConfiguration(); 176 }; 177 for (unsigned int j=0; j < propertySet.length(); j++ ) { 178 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 179 propertySet[i].value = props[i].value; 180 break; 181 } 182 } 183 } else if (strcmp(props[i].id, "DCE:4ba6cb86-29fb-40c8-a90c-7e69b7e59d85") == 0) { 184 const char * prop_str; 185 props[i].value >>= prop_str; 186 if ( strcmp(prop_str, "True") == 0 ) { 187 envelope=true; 188 } else if ( strcmp(prop_str, "False") == 0 ) { 189 envelope=false; 190 } else { 191 std::cerr << "ERROR: Channel::configure() unknown envelope type" << std::endl; 192 throw CF::PropertySet::InvalidConfiguration(); 193 }; 194 for (unsigned int j=0; j < propertySet.length(); j++ ) { 195 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 196 propertySet[i].value = props[i].value; 197 break; 198 } 199 } 200 } else if (strcmp(props[i].id, "DCE:76abee66-8a83-11dd-b96d-0016769e497b") == 0) { 201 // K_factor 202 CORBA::Double simple_temp; 203 props[i].value >>= simple_temp; 204 K_factor=simple_temp; 205 for (unsigned int j=0; j < propertySet.length(); j++ ) { 206 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 207 propertySet[i].value = props[i].value; 208 break; 209 } 210 } 211 } else if (strcmp(props[i].id, "DCE:9cc6196c-8a85-11dd-b572-0016769e497b") == 0) { 212 // The maximum doppler rate in terms of the sample rate 213 CORBA::Double simple_temp; 214 props[i].value >>= simple_temp; 215 MaxDopplerRate=simple_temp; 216 for (unsigned int j=0; j < propertySet.length(); j++ ) { 217 if ( strcmp(propertySet[j].id, props[i].id) == 0 ) { 218 propertySet[i].value = props[i].value; 219 break; 220 } 221 } 222 } 223 } 224 std::cout<<"noise_sigma:"<<noise_sigma<<"fading:"<<fading<<"envelope"<<envelope<<"K_factor:"<<K_factor<<"MaxDopplerRate"<<MaxDopplerRate<<std::endl; 225 226 } 227 228 void Channel_i::ProcessData() { 237 229 DEBUG(3, Channel, "ProcessData() invoked") 238 230 239 231 PortTypes::ShortSequence I_out, Q_out; 240 241 232 242 233 PortTypes::ShortSequence *I_in(NULL), *Q_in(NULL); … … 244 235 245 236 NumberOfMultipath=50; 246 237 247 238 double DopplerFreq[NumberOfMultipath]; 248 239 double phis[NumberOfMultipath]; 249 240 250 double totalphi,p hi,pI,pQ;251 241 double totalphi,pI,pQ; 242 252 243 short Iin,Qin; 253 244 … … 255 246 double PathPower=sqrt(NumberOfMultipath); 256 247 long packetno=0; 257 258 259 while(1) 260 { 248 249 while (1) { 261 250 dataIn->getData(I_in, Q_in); 262 251 263 252 Data_length = I_in->length(); 264 265 266 253 267 254 I_out.length(Data_length); //must define length of output … … 271 258 272 259 //phi=randf(); 273 if (packetno==0){ 274 for (unsigned int j=0;j<NumberOfMultipath;j++) 275 { 260 if (packetno==0) { 261 for (unsigned int j=0;j<NumberOfMultipath;j++) { 276 262 DopplerFreq[j]=MaxDopplerRate*randf(); 277 263 phis[j]=randf(); 278 264 } 279 }280 281 for (unsigned int i=0; i<Data_length;i++) 282 { 283 284 if (fading){265 } 266 267 for (unsigned int i=0; i<Data_length;i++) { 268 269 if ((i % Ns)==0) { 270 if (fading) { 285 271 pI=0; 286 272 pQ=0; 287 273 288 for (unsigned int j=0;j<NumberOfMultipath;j++) 289 { 290 274 for (unsigned int j=0;j<NumberOfMultipath;j++) { 275 291 276 totalphi=2*PI*( (DopplerFreq[j]*(i+packetno*Data_length))+phis[j]); 292 277 pI+=cos(totalphi); … … 298 283 pQ/=PathPower; 299 284 300 if (envelope) {301 pI=sqrt(pI*pI+pQ*pQ);302 pQ=0;285 if (envelope) { 286 pI=sqrt(pI*pI+pQ*pQ); 287 pQ=0; 303 288 304 289 } … … 307 292 pQ=1/sqrt(K_factor+1)*pQ +sqrt(K_factor/(1+K_factor)); 308 293 309 310 311 } else { 312 pI=1; 313 pQ=0; 294 } else { 295 pI=1; 296 pQ=0; 297 }; 314 298 }; 315 316 317 //Complex multiplication 318 //(x + yi)(u + vi) = (xu â yv) + (xv + yu)i. 319 //(Iin +Qin)(pI+pQ)=(IinpI-QinPq)+(IinpQ+QinpI) 320 321 //Multiply and add AWGN Noise 322 //std::cout<<fading<<envelope<<"pI"<<pI<<",pQ"<<pQ<<" totalphi"<<totalphi<<std::endl; 323 Iin=(*I_in)[i]; 324 Qin=(*Q_in)[i]; 325 I_out[i]=(CORBA::Short)(Iin*pI-Qin*pQ)+(CORBA::Short)(noise_sigma*randn()); 326 Q_out[i]=(CORBA::Short)(Iin*pQ+Qin*pI)+(CORBA::Short)(noise_sigma*randn()); 299 300 //Complex multiplication 301 //(x + yi)(u + vi) = (xu â yv) + (xv + yu)i. 302 //(Iin +Qin)(pI+pQ)=(IinpI-QinPq)+(IinpQ+QinpI) 303 304 //Multiply and add AWGN Noise 305 //std::cout<<fading<<envelope<<"pI"<<pI<<",pQ"<<pQ<<" totalphi"<<totalphi<<std::endl; 306 Iin=(*I_in)[i]; 307 Qin=(*Q_in)[i]; 308 I_out[i]=(CORBA::Short)(Iin*pI-Qin*pQ)+(CORBA::Short)(noise_sigma*randn()/sqrt(float(Ns))); 309 Q_out[i]=(CORBA::Short)(Iin*pQ+Qin*pI)+(CORBA::Short)(noise_sigma*randn()/sqrt(float(Ns))); 327 310 } 328 311 … … 338 321 // Algorithm bny Dr. Everett (Skip) Carter, Jr 339 322 { 340 float x1,x2,w; 341 do 342 { 323 float x1,x2,w; 324 do { 343 325 x1=2.0*randf()-1.0; 344 326 x2=2.0*randf()-1.0; 345 327 w=x1*x1+x2*x2; 346 328 347 } while (w>=1.0);329 } while (w>=1.0); 348 330 349 331 w=sqrt((-2.0*log(w))/w); … … 359 341 } 360 342 361 -
ossiedev/branches/0.7.x/components/Channel/Channel.h
r9211 r9480 1 1 /**************************************************************************** 2 2 3 Copyright 2007 Virginia Polytechnic Institute and State University3 Copyright 2007 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE Channel.5 This file is part of the OSSIE Channel. 6 6 7 OSSIE Channel is free software; you can redistribute it and/or modify8 it under the terms of the GNU General Public License as published by9 the Free Software Foundation; either version 2 of the License, or10 (at your option) any later version.7 OSSIE Channel is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 11 12 OSSIE Channel is distributed in the hope that it will be useful,13 but WITHOUT ANY WARRANTY; without even the implied warranty of14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15 GNU General Public License for more details.12 OSSIE Channel is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 16 17 You should have received a copy of the GNU General Public License18 along with OSSIE Channel; if not, write to the Free Software19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA17 You should have received a copy of the GNU General Public License 18 along with OSSIE Channel; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 21 ****************************************************************************/ 22 21 ****************************************************************************/ 23 22 24 23 #ifndef CHANNEL_IMPL_H … … 31 30 #include "ossie/debug.h" 32 31 33 34 32 #include "standardinterfaces/complexShort.h" 35 33 #include "standardinterfaces/complexShort_u.h" … … 40 38 * 41 39 */ 42 class Channel_i : public virtual Resource_impl 43 { 44 public: 45 /// Initializing constructor 46 Channel_i(const char *uuid, omni_condition *sem); 40 class Channel_i: public virtual Resource_impl { 41 public: 42 /// Initializing constructor 43 Channel_i(const char *uuid, omni_condition *sem); 47 44 48 /// Destructor49 ~Channel_i(void);45 /// Destructor 46 ~Channel_i(void); 50 47 51 /// Static function for omni thread52 static void Run( void * data);48 /// Static function for omni thread 49 static void Run(void * data); 53 50 54 ///55 void start() throw (CF::Resource::StartError, CORBA::SystemException);51 /// 52 void start() throw (CF::Resource::StartError, CORBA::SystemException); 56 53 57 ///58 void stop() throw (CF::Resource::StopError, CORBA::SystemException);54 /// 55 void stop() throw (CF::Resource::StopError, CORBA::SystemException); 59 56 60 ///61 CORBA::Object_ptr getPort( const char* portName)62 throw (CF::PortSupplier::UnknownPort, CORBA::SystemException);57 /// 58 CORBA::Object_ptr getPort(const char* portName) 59 throw (CF::PortSupplier::UnknownPort, CORBA::SystemException); 63 60 64 /// 65 void releaseObject() throw (CF::LifeCycle::ReleaseError, CORBA::SystemException); 61 /// 62 void releaseObject() throw (CF::LifeCycle::ReleaseError, 63 CORBA::SystemException); 66 64 67 /// 68 void initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException); 69 70 void query(CF::Properties &configProperties) 71 throw (CF::UnknownProperties, CORBA::SystemException); 65 /// 66 void initialize() throw (CF::LifeCycle::InitializeError, 67 CORBA::SystemException); 72 68 73 /// Configures properties read from .prf.xml 74 void configure(const CF::Properties&) 75 throw (CORBA::SystemException, 76 CF::PropertySet::InvalidConfiguration, 77 CF::PropertySet::PartialConfiguration); 69 void query(CF::Properties &configProperties) throw (CF::UnknownProperties, 70 CORBA::SystemException); 78 71 79 private: 80 /// Disallow default constructor 81 Channel_i(); 72 /// Configures properties read from .prf.xml 73 void configure(const CF::Properties&) throw (CORBA::SystemException, 74 CF::PropertySet::InvalidConfiguration, 75 CF::PropertySet::PartialConfiguration); 82 76 83 /// Disallow copy constructor 84 Channel_i(Channel_i&); 77 private: 78 /// Disallow default constructor 79 Channel_i(); 85 80 86 /// Main signal processing method 87 void ProcessData(); 88 89 omni_condition *component_running; ///< for component shutdown 90 omni_thread *processing_thread; ///< for component writer function 91 81 /// Disallow copy constructor 82 Channel_i(Channel_i&); 92 83 93 94 // list components provides and uses ports 95 standardInterfaces_i::complexShort_p *dataIn; 96 standardInterfaces_i::complexShort_u *dataOut; 84 /// Main signal processing method 85 void ProcessData(); 97 86 98 bool fading; 99 bool envelope; 87 omni_condition *component_running; ///< for component shutdown 88 omni_thread *processing_thread; ///< for component writer function 100 89 101 double noise_sigma,K_factor,MaxDopplerRate;102 90 103 float randn(); 104 float randf(); 105 91 // list components provides and uses ports 92 standardInterfaces_i::complexShort_p *dataIn; 93 standardInterfaces_i::complexShort_u *dataOut; 94 95 bool fading; 96 bool envelope; 97 short int Ns; //Number of samples per symbol 98 99 double noise_sigma,K_factor,MaxDopplerRate; 100 101 float randn(); 102 float randf(); 103 106 104 }; 107 105 #endif -
ossiedev/branches/0.7.x/components/Channel/Channel.prf.xml
r9020 r9480 4 4 <!--Powered by Python--> 5 5 <properties> 6 <simple id="DCE:1d91b55a-2fcb-4d2d-ad7b-1ee58c32cad8" mode="readonly" name="Samples per symbol" type="short"> 7 <value>1</value> 8 <description>The number of samples that represent one symbol</description> 9 <kind kindtype="configure"/> 10 </simple> 6 11 <simple id="DCE:eddc66ce-8a82-11dd-ae05-0016769e497b" mode="readonly" name="AWGN Noise Power" type="long"> 7 12 <value>0</value>