[Discuss-gnuradio] Slider variable problem

2010-09-14 Thread Samy Sammour

Hello  guys,


I have created my block but which takes a variable N. I want to 
change this variable using the slider variable, I understand that I need
 to define a callbacksetVariable(N)/callback but at 
runtime I get error the this is not defined in the myblock_sptr module.


I added the function in the inside the constructor *.h, at the 
bottom of the *.cc file and the callback tag.


Can you help me with, please?


Cheers,
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] How to use forecast()?

2010-08-06 Thread Sammour

Hi Eric,
I have a similar issue as the one described above and I have read some of
the examples in the directory provided but they seem to be different from
what I want to implement. I want to collect L samples from N channels and
store them in a buffer, do processing and output a vector of length N. I
wrote the following code but it doesn't seem to be working properly. Some of
them use loops from i=0 to noutput_items*vlen while others use from 0 to
noutput_items. Also some of them don't use the function memcpy.

I am using gr_sync_decimator with set_decimation(L) is written in the block
constructor.
---
int my_package::work(.) {

gr_complexd *out =(gr_complexd *) output_items[0];
const gr_complex *in[N];

for (unsigned int i = 0; iN; i++)
in[i] = (const gr_complex *) input_items[i];

for (int i = 0; i noutput_items; i++){
for(unsigned int k=0; kN; k++)

memcpy(inbuffer[k][0],in[k][i*L],L*sizeof(gr_complex)); //inbuffer is
NxL matrix

//Signal processing of inbuffer and storing the result in a
vector 
// out_vector of length vect_lengx;

memcpy(out, out_vector.at(0),
vect_lengx*sizeof(gr_complexd));
out+=vect_lengx;

}//end for
 
return noutput_items;
}
--
Can you help me with this please?

Thanks a lot.

Sammour
-- 
View this message in context: 
http://old.nabble.com/How-to-use-forecast%28%29--tp28705301p29356450.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] Using gr_sync_decimator [was: How to use forecast()?]

2010-08-06 Thread Samy Sammour

This is my block's constructor:

my_package::my_package(int num_input_ports, int L_samples)
: gr_sync_decimator(
   package,

gr_make_io_signature(2, 5, sizeof(gr_complex)),

gr_make_io_signature(1, 1 , 
num_input_ports*num_input_ports*sizeof(gr_complexd)),

L_samples) {

 
// global variables
N=num_input_ports;

vect_lengx=N*N;

L=L_samples;

set_decimation(L);

}

Best regards,

Sam


 Date: Fri, 6 Aug 2010 10:21:38 -0700
 From: e...@comsec.com
 To: samy-1...@live.com
 CC: Discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] Using gr_sync_decimator [was: How to use 
 forecast()?]
 
 On Fri, Aug 06, 2010 at 06:32:32AM -0700, Sammour wrote:
  
  Hi Eric,
  I have a similar issue as the one described above and I have read some of
  the examples in the directory provided but they seem to be different from
  what I want to implement. I want to collect L samples from N channels and
  store them in a buffer, do processing and output a vector of length N. I
  wrote the following code but it doesn't seem to be working properly. Some of
  them use loops from i=0 to noutput_items*vlen while others use from 0 to
  noutput_items. Also some of them don't use the function memcpy.
  
  I am using gr_sync_decimator with set_decimation(L) is written in the block
  constructor.
 
 gr_sync_decimator with decimation == L correct, given what you've described.
 
 Can you please show the beginning of your constructor, where you pass the
 arguments to gr_sync_decimator's constructor?
 
 Eric
 
 
 
 
  ---
  int my_package::work(.) {
  
  gr_complexd *out =(gr_complexd *) output_items[0];
  const gr_complex *in[N];
  
  for (unsigned int i = 0; iN; i++)
  in[i] = (const gr_complex *) input_items[i];
  
  for (int i = 0; i noutput_items; i++){
  for(unsigned int k=0; kN; k++)
  
  memcpy(inbuffer[k][0],in[k][i*L],L*sizeof(gr_complex)); //inbuffer is
  NxL matrix
  
  //Signal processing of inbuffer and storing the result in a
  vector 
  // out_vector of length vect_lengx;
  
  memcpy(out, out_vector.at(0),
  vect_lengx*sizeof(gr_complexd));
  out+=vect_lengx;
  
  }//end for
   
  return noutput_items;
  }
  --
  Can you help me with this please?
  
  Thanks a lot.
  
  Sammour
  -- 
  View this message in context: 
  http://old.nabble.com/How-to-use-forecast%28%29--tp28705301p29356450.html
  Sent from the GnuRadio mailing list archive at Nabble.com.
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] complex vector output of a block

2010-06-13 Thread Sammour

Well, I think I used io_signature correctly. And, as I am using
gr_sync_block, I dont need to worry about forecast, set_output_multiple or
gr_sync_decimator. (I hope this understanding is correct?!)

I have read the  how to write a block and followed what's in there, but if
you guide me to better documentation, I will be very grateful.

Cheers,
Sam

Eric Blossom wrote:
 
 On Sat, Jun 12, 2010 at 03:40:21PM -0700, Sammour wrote:
 
 Thanks for everyone, I sorted the problem out. I needed to increment
 out
 after memcpy and then return noutput_items/(N*N).
 
 Cheers,
 Sam
 
 OK.  Glad you (think) you solved your problem.
 
 Given that your block was asked to compute noutput_items, why are you
 only computing (and/or returning) noutput_items/(N*N) items?
 Doing it this way is increasing the runtime overhead by something on
 the order of N*N.
 
 This smells like there's something that you don't understand about
 io_signatures, forecast, work, set_output_multiple and/or
 gr_sync_decimator...
 
 Eric
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 

-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28869890.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] GRC: Need help in plotting a vector vs index

2010-06-12 Thread Samy Sammour

Dear engineers,

I wonder if there's a way to plot a vector content vs. index in GRC? I mean 
analogous to MATLAB command:
a=1:100;
plot(a);

Thanks

Sam

  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us now___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] complex vector output of a block

2010-06-12 Thread Sammour

Thanks for everyone, I sorted the problem out. I needed to increment out
after memcpy and then return noutput_items/(N*N).

Cheers,
Sam

Sammour wrote:
 
 
 Hi John, Thanks for the message sorry for using MATLAB notation without
 clarification 2:12 = from 2 upto 12.
 
 To simplify the case, I wrote the following code that actually carry the
 same problem concept:
 *
 #ifdef HAVE_CONFIG_H
 #include config.h
 #endif
 #include arraycomms_construct_rxx_vcc.h
 #include gr_io_signature.h
 
 arraycomms_construct_rxx_vcc_sptr arraycomms_make_construct_rxx_vcc (int
 input_ports){
   return arraycomms_construct_rxx_vcc_sptr (new
 arraycomms_construct_rxx_vcc (input_ports));
 }
 
 unsigned int N=0;// number of input ports
 
 arraycomms_construct_rxx_vcc::arraycomms_construct_rxx_vcc (int
 num_input_ports)
   : gr_sync_block (construct_rxx_vcc,   gr_make_io_signature (2, 12,
 sizeof(gr_complex)),
   gr_make_io_signature (1,1 ,
 num_input_ports*num_input_ports*sizeof(gr_complex))){
 
 N=num_input_ports;
 }
 
 arraycomms_construct_rxx_vcc::~arraycomms_construct_rxx_vcc (){}
 
 int arraycomms_construct_rxx_vcc::work (int noutput_items,
 gr_vector_const_void_star input_items,
 gr_vector_void_star output_items)
 {
 gr_complex *out =(gr_complex *) output_items[0];
 gr_complex out_vector [N*N];
 const gr_complex *in[N];
 for (unsigned int i = 0; iN; i++)
{
 in[i] = (const gr_complex *) input_items[i];
 }
for (int i = 0; i  noutput_items; i++){
 unsigned int index = 0;
 for (unsigned int n =1; n=N*N; n++){
 out_vector[index]=gr_complex(4, 0);
 index++;
 }
 }
memcpy(out, out_vector, N*N*sizeof(gr_complex));
 return noutput_items;
 }
 *
 
 This code is supposed to generate a vector of 4 elements ( I used N=2 in
 the GRC) with each element = 4+j0 whatever the input is. However, the
 content of the sink file is:
  4.000e+00
4.000e+00
4.000e+00
4.000e+00
0.000e+00
0.000e+00
0.000e+00
0.000e+00
0.000e+00
0.000e+00
 .
  4.000e+00
4.000e+00
4.000e+00
4.000e+00
0.000e+00
0.000e+00
0.000e+00
0.000e+00
0.000e+00
0.000e+00
 
  I hope the situation is now clearer.
 
 Cheers,
 Sam
 
 To: samy-1...@live.com; g...@toad.com
 Subject: Re: [Discuss-gnuradio] complex vector output of a block 
 Date: Wed, 9 Jun 2010 16:49:15 -0700
 From: g...@toad.com
 
  Thanks for replying. N is designed to be 2:12. 
 
 Maybe others understand what you're saying, but 2:12 doesn't mean
 anything
 to me.  Do you mean between 2 and 12?  Or is this a Biblical reference,
 or perhaps the time of day?
 
 I suggest that you just post the code that's giving you the trouble
 (either in an email, or if it's more than about 200 lines, put it on
 a web site or pastebin or wiki and email a URL for it).  Trying to
 debug somebody else's code piecemeal by asking little questions is
 unlikely to lead to success.
 
  John
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us now
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 

-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28867921.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gnuradio.org seems to be down

2010-06-09 Thread Sammour

Well, it seems to be working here!


Martin Dvh wrote:
 
 The gnuradio.org server seems to be down. (9 Jun 2010)
 
 Even a ping times out.
 
 
 Martin
 
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 

-- 
View this message in context: 
http://old.nabble.com/gnuradio.org-seems-to-be-down-tp28828846p28828897.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] complex vector output of a block

2010-06-09 Thread Sammour

Dear Martin,

Thanks for replying. N is designed to be 2:12. 
The block uses a number of inputs (N) to update a matrix that I am sending
to the output as a vector that  will be reshaped in the next block when it
is used. Do you think that my programme takes much time to execute?

Cheers,

Sam
-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28830131.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] complex vector output of a block

2010-06-09 Thread Sammour

To isolate the problem, I removed all the complex code and wrote the
following in work() to generate a vector of random numbers:

gr_complex *out =(gr_complex *) output_items[0];
unsigned int index = 0;
for (unsigned int m =1; m=4; m++)
{
*(out+index)=gr_complex(std::rand(), std::rand());
index++;
}
  return noutput_items;

Here, I get a bunch of complex numbers followed by many zeros followd by
many complex numbers. The number in each group is not constant.

Any suggestions to control this?

Best wishes,

Sam
-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28831629.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] complex vector output of a block

2010-06-09 Thread Sammour

Thanks again Martin.

I believe the problem is not in the algorithm as I actually tested it and
can print the output of it on the screen as you suggested (I mean out in
my original post). Everything excellent at this stage. However, the problem
is that the block in  GRC doesn't generate output.

I didn't want to give details in order not to divert direction of the
problem investigation.  However, the block finds the autocovariance matrix
of N inputs using the update method.

Best regards,

Sam

Martin Braun-4 wrote:
 
 On Wed, Jun 09, 2010 at 06:06:01AM -0700, Sammour wrote:
 Thanks for replying. N is designed to be 2:12. 
 The block uses a number of inputs (N) to update a matrix that I am
 sending
 to the output as a vector that  will be reshaped in the next block when
 it
 is used. Do you think that my programme takes much time to execute?
 
 Hi Sam,
 
 I have no clue what your block does, and you're not giving away too much
 information :)
 But I don't think your block should be too difficult to debug, I assume
 you have unit tests running (and failing), if not, do that first. Put
 in enough data for work() to be called once, and use printfs to see
 what's happening.
 
 MB
 
 -- 
 Karlsruhe Institute of Technology (KIT)
 Communications Engineering Lab (CEL)
 
 Dipl.-Ing. Martin Braun
 Research Associate
 
 Kaiserstraße 12
 Building 05.01
 76131 Karlsruhe
 
 Phone: +49 721 608-3790
 Fax: +49 721 608-6071
 www.cel.kit.edu
 
 KIT -- University of the State of Baden-Württemberg and
 National Laboratory of the Helmholtz Association
 
 
  
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 

-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28832150.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] complex vector output of a block

2010-06-09 Thread Sammour

HI Eric,

Thanks for replying. My block has N=2:12 complex input streams and one
complex vector output stream of length N^2 (represents a reshaped NxN
matrix). The block basically is meant to calculate the covariance matrix
using a MATLAB library.

The signatures are:
input: gr_make_io_signature (2, 2, sizeof(gr_complex));
output: gr_make_io_signature (1, 1,N*N*sizeof(gr_complex));

However, the last thing I reached now is that I can get the output into a
file sink but when displaying the content, I see the N^2 elements followed
by a huge number of zeros then N^2 elements and then zeros. For example if N
= 2 input streams, the output vector will appear like:
a
b
c
d
0
0
0

e
f
g
h
0
0
0... and so on.

A remark I noticed is that difference between a and e is always around
4096. What confuses me is how to get rid of the zeros and extract only the
numbers of interest when connecting this block to the next block. Any hint?

Best regards,

Sam
-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28836135.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] complex vector output of a block

2010-06-09 Thread Sammour

Tom,

I only need a single sample from each stream to generate the vector ( there
is a method of doing this in signal processing) and I am inherting from
gr_sync_block as the block is 1:1. I am also returning noutput_items and
didn't use consume_each() of course. Thanks anyway.

Still thinking :)

Cheers,
Sam
-- 
View this message in context: 
http://old.nabble.com/complex-vector-output-of-a-block-tp28828557p28836849.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] complex vector output of a block

2010-06-09 Thread Samy Sammour

Hi John, Thanks for the message sorry for using MATLAB notation without 
clarification 2:12 = from 2 upto 12.

To simplify the case, I wrote the following code that actually carry the same 
problem concept:
*
#ifdef HAVE_CONFIG_H
#include config.h
#endif
#include arraycomms_construct_rxx_vcc.h
#include gr_io_signature.h

arraycomms_construct_rxx_vcc_sptr arraycomms_make_construct_rxx_vcc (int 
input_ports){
  return arraycomms_construct_rxx_vcc_sptr (new arraycomms_construct_rxx_vcc 
(input_ports));
}

unsigned int N=0;// number of input ports

arraycomms_construct_rxx_vcc::arraycomms_construct_rxx_vcc (int num_input_ports)
  : gr_sync_block (construct_rxx_vcc,   gr_make_io_signature (2, 12, 
sizeof(gr_complex)),
  gr_make_io_signature (1,1 , 
num_input_ports*num_input_ports*sizeof(gr_complex))){

N=num_input_ports;
}

arraycomms_construct_rxx_vcc::~arraycomms_construct_rxx_vcc (){}

int arraycomms_construct_rxx_vcc::work (int noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items)
{
gr_complex *out =(gr_complex *) output_items[0];
gr_complex out_vector [N*N];
const gr_complex *in[N];
for (unsigned int i = 0; iN; i++)
   {
in[i] = (const gr_complex *) input_items[i];
}
   for (int i = 0; i  noutput_items; i++){
unsigned int index = 0;
for (unsigned int n =1; n=N*N; n++){
out_vector[index]=gr_complex(4, 0);
index++;
}
}
   memcpy(out, out_vector, N*N*sizeof(gr_complex));
return noutput_items;
}
*

This code is supposed to generate a vector of 4 elements ( I used N=2 in the 
GRC) with each element = 4+j0 whatever the input is. However, the content of 
the sink file is:
 4.000e+00
   4.000e+00
   4.000e+00
   4.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
.
 4.000e+00
   4.000e+00
   4.000e+00
   4.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
   0.000e+00
   0.000e+00

 I hope the situation is now clearer.

Cheers,
Sam

 To: samy-1...@live.com; g...@toad.com
 Subject: Re: [Discuss-gnuradio] complex vector output of a block 
 Date: Wed, 9 Jun 2010 16:49:15 -0700
 From: g...@toad.com
 
  Thanks for replying. N is designed to be 2:12. 
 
 Maybe others understand what you're saying, but 2:12 doesn't mean anything
 to me.  Do you mean between 2 and 12?  Or is this a Biblical reference,
 or perhaps the time of day?
 
 I suggest that you just post the code that's giving you the trouble
 (either in an email, or if it's more than about 200 lines, put it on
 a web site or pastebin or wiki and email a URL for it).  Trying to
 debug somebody else's code piecemeal by asking little questions is
 unlikely to lead to success.
 
   John
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us now___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] print the output of a block python

2010-06-05 Thread Sammour

Dear engineers
for debugging purpose, can we print the output of a block in python file
generated by swig?
Thanks
-- 
View this message in context: 
http://old.nabble.com/print-the-output-of-a-block-python-tp28789113p28789113.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] GRC symbolic-link is not working

2010-06-04 Thread Samy Sammour

Hi all,

I have installed gnuradio with grc. the bootstrap, configure, make, make check 
and sudo make install all of them ran  nicely. However when I type grc in the 
terminal it says: 

The program 'grc' is currently not installed.  You can install it by typing:
sudo apt-get install grc
grc: command not found

I tried to figure out what the problem is , and now can run grc by 
double-clicking this file /usr/local/share/gnuradio/grc/freedesktop/GRC. Can 
anybody help me in fixing the problem, please? or maybe there's something went 
wrong  in the installation caused this to happen.

Thank you,

Sam
  
_
http://clk.atdmt.com/UKM/go/195013117/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] GRC symbolic-link is not working‏

2010-06-04 Thread Sammour

Hi all,

I have installed gnuradio with grc. the bootstrap, configure, make, make
check and sudo make install all of them ran  nicely. However when I type
grc in the terminal it says:

The program 'grc' is currently not installed.  You can install it by typing:
sudo apt-get install grc
grc: command not found

I tried to figure out what the problem is , and now can run grc by
double-clicking this file /usr/local/share/gnuradio/grc/freedesktop/GRC.
Can anybody help me in fixing the problem, please? or maybe there's
something went wrong  in the installation caused this to happen.

Thank you,

Sam
-- 
View this message in context: 
http://old.nabble.com/GRC-symbolic-link-is-not-working%E2%80%8F-tp28781956p28781956.html
Sent from the GnuRadio mailing list archive at Nabble.com.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] GRC s ymbolic-link is not working‏

2010-06-04 Thread Sammour

Thanks a lot... it works

Sammour wrote:
 
 Hi all,
 
 I have installed gnuradio with grc. the bootstrap, configure, make, make
 check and sudo make install all of them ran  nicely. However when I type
 grc in the terminal it says:
 
 The program 'grc' is currently not installed.  You can install it by
 typing:
 sudo apt-get install grc
 grc: command not found
 
 I tried to figure out what the problem is , and now can run grc by
 double-clicking this file /usr/local/share/gnuradio/grc/freedesktop/GRC.
 Can anybody help me in fixing the problem, please? or maybe there's
 something went wrong  in the installation caused this to happen.
 
 Thank you,
 
 Sam
 

-- 
View this message in context: 
http://old.nabble.com/GRC-symbolic-link-is-not-working%E2%80%8F-tp28781956p28783306.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Output not showing in GRC

2010-06-01 Thread Sammour

I'm afraid yes. These are the last two line in the general_work ()

  consume_each(noutput_items);
  return noutput_items;

I am actually suspicious about the makefile.am and library integration
stuff, can anybody check this for me please?

libgnuradio_mypackage_la_LDFLAGS =  \
$(NO_UNDEFINED)\
-L$(MATLAB_ROOT)/runtime/glnx86

libgnuradio_arraycomms_la_LIBADD =  \
$(GNURADIO_CORE_LA)\
-L/usr/lib -lmyfirstblock

where myfirstblock is a library generated in MATLAB

Cheers,

Sam

Johnathan Corgan-2 wrote:
 
 On Mon, May 31, 2010 at 14:57, Sammour samy-1...@live.com wrote:
 
 However, when I
 install my block in GRC, I connect the output to a file sink that stores
 nothing! I also tried to plot the magnitude of the complex output and
 nothing shows.
 
 Are you returning the number of samples produced by your work function?
 
 Johnathan
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 

-- 
View this message in context: 
http://old.nabble.com/Output-not-showing-in-GRC-tp28735468p28739716.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Output not showing in GRC

2010-05-31 Thread Sammour

Hello guys,

As my first gnuradio block, I have built a block to multiply two complex
numbers using MATLAB library. I compiled my block and wrote a python
programme to test it and everything went very nicely. I used this c++
statement in the general_work method to see the output of the block:
std::cout  out[i] std::endl;
and indeed I can see the complex product for my inputs. However, when I
install my block in GRC, I connect the output to a file sink that stores
nothing! I also tried to plot the magnitude of the complex output and
nothing shows. The surprising part is that the output values of the above
c++ statement are printed in the output area in GRC and this means that my
c++ code is actually invoked.

I wonder if this has to do with library linking or not. Any suggestions??

Thanks a lot!

Sam
-- 
View this message in context: 
http://old.nabble.com/Output-not-showing-in-GRC-tp28735468p28735468.html
Sent from the GnuRadio mailing list archive at Nabble.com.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] Output not showing in GRC

2010-05-31 Thread Samy Sammour

hi josh,

Unfortunately, the solution didnt work. I also want to reiterate that I used 
the graphical scope that failed as well.

Thanks

Sam

 Date: Mon, 31 May 2010 15:02:05 -0700
 From: j...@joshknows.com
 To: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] Output not showing in GRC
 
 the file sink is probably not flushing to disk (common issue).
 
 Try using a head block and the run to completion option and see what 
 happens. Upon completion, the file sink destructor will flush.
 
 -Josh
 
 On 05/31/2010 02:57 PM, Sammour wrote:
 
  Hello guys,
 
  As my first gnuradio block, I have built a block to multiply two complex
  numbers using MATLAB library. I compiled my block and wrote a python
  programme to test it and everything went very nicely. I used this c++
  statement in the general_work method to see the output of the block:
  std::cout  out[i]  std::endl;
  and indeed I can see the complex product for my inputs. However, when I
  install my block in GRC, I connect the output to a file sink that stores
  nothing! I also tried to plot the magnitude of the complex output and
  nothing shows. The surprising part is that the output values of the above
  c++ statement are printed in the output area in GRC and this means that my
  c++ code is actually invoked.
 
  I wonder if this has to do with library linking or not. Any suggestions??
 
  Thanks a lot!
 
  Sam
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
  
_
http://clk.atdmt.com/UKM/go/195013117/direct/01/
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio