Message_source repeatly transmit msg 10times

Dear all,

I’m using message_source generate data source then modulated and
transmitting through USRP1 board with LFTX plugged-in. After building
the flow graph, I used the msgq_insert to insert 1950 bytes data into
the flow graph to be transmitted, then insert another group of data
which is 97500 bytes into the the flow graph. The result turns out these
two group of data are repeatly sent 10 times. What could be the problem
here?

This problem really troubles me for a while and it seems to be the
biggest problem that I really need to solve for my project, and I dug
into the source code related to message_source and gr_message, but
couldn’t get any clue why this happens here. Really need your help!

Really appreciate any of you help!

Thanks,
Yan

the code related:
#message_source in tb block
indata = gr.message_source(gr.sizeof_char, 1950)
msgq = indata.msgq()
constellation = [-1,1]
mapper = chunks_to_symbols_bf(constellation)
#setup USRP and signal amplitude setting…
usink = …
connect(indata,mapper,usink)

#flowgraph running in main
try:
tb.start()
while 1:
i = 0
tb.set_amp(5000)
msg_13bit = gr.messge_from_string(payload_13bit)
#payload_13bit is 1950 bytes
tb.msgq.insert_tail(msg_13bit)
tb.set_amp(0)
while (i<50)
msg_stop = gr.message_from_string(payload_stop)
#payload_stop is 1950 bytes
tb.msgq.inset_tail(msg_stop)
i +=1
tb.wait()

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs