Changeset 8363

Show
Ignore:
Timestamp:
10/09/08 14:13:02 (5 years ago)
Author:
mcarrick
Message:

added start, stop capability, merged from trunk

Location:
ossiedev/branches/0.7.x/components/TxDemo
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/0.7.x/components/TxDemo/TxDemo.cpp

    r5497 r8363  
    7373{ 
    7474    DEBUG(3, TxDemo, "start() invoked") 
     75    thread_started=true; 
    7576} 
    7677 
     
    7879 
    7980    DEBUG(3, TxDemo, "stop() invoked") 
     81    thread_started=false; 
    8082} 
    8183 
     
    130132 
    131133    while(true) { 
    132         // push data to output 
    133         dataOutPort->pushPacket(I_out, Q_out); 
    134  
    135         // wait 
    136         usleep(packet_delay*1000); 
     134        if (thread_started) { 
     135            // push data to output 
     136            dataOutPort->pushPacket(I_out, Q_out); 
     137 
     138            // wait 
     139            usleep(packet_delay*1000); 
     140        } 
    137141    } 
    138142} 
  • ossiedev/branches/0.7.x/components/TxDemo/TxDemo.h

    r5494 r8363  
    8585    /// Main signal processing method 
    8686    void ProcessData(); 
     87    bool thread_started; 
    8788    
    8889    omni_condition *component_running;  ///< for component shutdown