Monday, August 31, 2015

Re: [Discuss-gnuradio] General_Work Not Executing

On Fri, Aug 28, 2015 at 12:49 PM, Washbourne, Logan <lwashbo@ostatemail.okstate.edu> wrote:
Hello All,

I recently rewrote the Chat Sanitize and Chat Receiver blocks from the Tutorial module(Example 5) in C++. I did this because I wanted to add an acknowledgment feature into the blocks in order to add some robustness to it(I'm not sure yet if the chat example will lend itself to being robust but it was the starting point I chose). The problem arose when I added an input port to the Text Sanitize block and added an output to the Chat Receiver block and connected them together. Instead of a linear program I now had a loop of a program. I did something wrong because now the Text Sanitize block wasn't outputting anything, so I commented out the input code for Text Sanitize and the output code for Chat Receiver. I went to retest the program to see if it behaved just like Example 5(which it was before I started adding on the acknowledgment bits) but now Text Sanitize wasn't outputting anything still.

I tried putting some cout's in the general _work function where the message publishing code is and I have determined that it's not even entering the general_work function. 

Does anyone have any thoughts on the matter? I must have changed something when I commented out the input portion of the Text_Sanitize code but for the life of me I can't figure out what it is. I have even since made two new blocks to try and redo the functionality of Text Sanitize but the same problem still persists.


So this will be a good lesson in using git! It's good to keep small, quantified changes in git so that you know where you are versus where you started when making a change. "git diff" is your friend here. Lots of ways to use this tool to help in your development cycle.

(Also, looking at your git repo, you've checked in the '~' temp files from your editor [emacs I assume]. You don't want any temp or auto-generated files in a git repository; just stuff that you've created that needs to be tracked.)

The problem is that this block is designed only to output messages, not a data stream. You can see in the constructor that the io_signature is using (0, 0, 0) for both inputs and outputs. The scheduler doesn't recognize this block in the stream and so never things to call the general_work. The original blocks you are referring to only have message interfaces.

Hope this helps get you in the right direction.


Tom


 

The juicy files are in the Thesis/OOT/gr-ACK/lib folder.

There might be some profanity in the commit messages, it was a stressful day.

I appreciate your time,

Logan Washbourne
Electrical Engineering Graduate Student
(Electromagnetics)


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


No comments:

Post a Comment