Dear all, I'm using the message_source to generate the source, connecting it with a multiply_const block to configure the amplitude for the signal.
The message_source is created by the following: data = gr.message_source(sizeof_char, 2) msgq = data.msgq() When the msg is inserted as a tail of the msgq while the flow graph is running, the msg is inserted using insert_tail(msg). If my understanding serves me right, if only insert the msg once, it suppose to be send once. In my case, however, the msg is sent 10 times. (the set_amp is defined in the tb block to change the amplitude of the signal while tb is running) Could anyone help me to see what causes the problem? The code related msgq_insert in main thread is as followed: try: while 1: i = 1 tb.set_amplitude(5000) msg_13bit = gr.message_from_string(payload_13bit) tb._ls.msgq.insert_tail(msg_13bit) tb.set_amplitude(0) while(i < 50) msg_stop = gr.message_from_string(payload_stop) tb._ls.msgq.insert_tail(msg_stop) i += 1 Really appreciate any of your help! Thanks, Yan
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio