Changeset 3656

Show
Ignore:
Timestamp:
05/03/07 20:30:09 (6 years ago)
Author:
jgaeddert
Message:

making component functional; needs testing

Location:
experimental/components/SymbolSyncPoly
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • experimental/components/SymbolSyncPoly/SymbolSyncPoly.cpp

    r3647 r3656  
    163163    { 
    164164        DEBUG(5, SymbolSyncPoly, "configuring filter bank for " <<  
    165               "rrcos" << ", k=" << _k << ", m=" << _m << ", beta=" << _beta << ", Npfb=" << Npfb) 
     165              "rrcos" << ", k=" << _k << ", m=" << _m << ", beta=" << _beta << ", Npfb=" << _Npfb) 
    166166        ConfigureFilterBank("rrcos", _k, _m, _beta, _Npfb); 
    167167    } 
     
    183183    while( true ) 
    184184    { 
     185        DEBUG(7, SymbolSyncPoly, "iterating loop...") 
     186 
    185187        // Get data from port 
    186188        dataIn_0->getData(I_in_0, Q_in_0); 
     189 
     190        DEBUG(7, SymbolSyncPoly, "Got " << I_in_0->length() << " samples") 
    187191 
    188192        // Read input data length 
     
    197201        } else { 
    198202            N_in = I_in_0_length; 
     203        } 
     204 
     205        /// \todo Initialize I_in and Q_in from CORBA sequence instead 
     206        /// of copying values in loop 
     207        DEBUG(7, SymbolSyncPoly, "Copying data from CORBA sequence...") 
     208        /// \todo This is incredibly inefficient; need to manage memory better 
     209        I_in = new short[N_in]; 
     210        Q_in = new short[N_in]; 
     211        for (unsigned int ii=0; ii<N_in; ii++) { 
     212            I_in[ii] = (*I_in_0)[ii]; 
     213            Q_in[ii] = (*Q_in_0)[ii]; 
    199214        } 
    200215 
     
    217232 
    218233        // Main signal processing algorithm 
     234        DEBUG(7, SymbolSyncPoly, "Attempting to synchronize and decimate...") 
    219235        SynchronizeAndDecimate( 
    220236            I_in, Q_in, N_in, 
    221237            I_out, Q_out, N_out); 
    222238 
     239        DEBUG(7, SymbolSyncPoly, "Setting output length...") 
    223240        I_out_0.length(N_out); 
    224241        Q_out_0.length(N_out); 
     
    226243        /// \todo Initialize I_out_0 and Q_out_0 from array instead 
    227244        /// of copying values in loop 
     245        DEBUG(7, SymbolSyncPoly, "Copying data to CORBA sequence...") 
    228246        for (unsigned int ii=0; ii<N_out; ii++) { 
    229247            I_out_0[ii] = I_out[ii]; 
     
    231249        } 
    232250 
     251        DEBUG(7, SymbolSyncPoly, "Emptying port buffer...") 
    233252        dataIn_0->bufferEmptied(); 
     253 
     254        DEBUG(7, SymbolSyncPoly, "calling pushPacket()...") 
    234255        dataOut_0->pushPacket(I_out_0, Q_out_0); 
     256 
     257        /// \todo This is incredibly inefficient; need to manage memory better 
     258        DEBUG(7, SymbolSyncPoly, "Deleting temp buffers...") 
     259        delete [] I_in; 
     260        delete [] Q_in; 
    235261    } 
    236262 
  • experimental/components/SymbolSyncPoly/SymbolSyncPoly.prf.xml

    r3647 r3656  
    2929        <kind kindtype="configure"/> 
    3030    </simple> 
    31     <!-- 
    32     <simplesequence type="string" id="port_list" name="port_list" mode="readonly"> 
    33         <description>Returns a sequence of strings with the names of the available Provides ports</description>  
    34         <value>baseband_in::standardInterfaces.complexShort</value>  
    35         <kind kindtype="configure"/> 
    36     </simplesequence> 
    37     --> 
    3831</properties> 
  • experimental/components/SymbolSyncPoly/main.cpp

    r3374 r3656  
    3030 
    3131{ 
     32    ossieDebugLevel = 5; 
     33 
    3234    ossieSupport::ORB *orb = new ossieSupport::ORB; 
    3335    omni_mutex component_running_mutex;