Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: F
From:
David Halls
Subject:
Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission
Date:
Wed, 4 Jun 2014 14:52:27 +0000
________________________________________
From: Activecat address@hidden
Sent: 04 June 2014 15:39
To: David Halls
Cc: address@hidden
Subject: Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission
On Wed, Jun 4, 2014 at 10:25 PM, David Halls <address@hidden<mailto:address@hidden>> wrote:
Yes, there are 3. The Source Tx, the Relay Tx, and the Relay Rx.
To clarify,
i). the "Source Tx" USRP may or may not receive data at any time interval.
ii). the "Relay Tx" USRP transmit data only when the "Source Tx" USRP receive data, and there is a delay due to signal processing
iii). the "Relay Rx" USRP will receive data only when the "Relay Tx" USRP transmit it,
is this correct?
Not quite...
i). the "Source Tx" USRP has a constant stream of data, and is constantly transmitting. If the codewords in the file are exhausted it repeats.
ii). the "Relay Tx" USRP transmits data only when data has been received by the "Relay Rx" (I will use tx_time to control when the received burst is re-transmitted)
iii). the "Relay Rx" USRP will receive data only when the "Source Tx" USRP transmits (section where Relay Tx's too will be ignored),
I have changed the block you suggested, to avoid inserting 0's mid burst.
// For first input, just copy
for (int i=0; i < noutput_items; i++)
out0[i] = in0[i];
// Count number of output items
int num_out1 = 0;
// If items available for second input, copy
for (int i=0; i < ninput_items[1]; i++)
{
out1[i] = in1[i];
if(!d_burst)
{
if(DEBUG) fprintf(stderr, " Entering burst...\n");
d_burst = true;
}
// Number of (actual) items tx'd this call
num_out1++;
// Total number of items in burst transmitted so far
d_items_sent++;
}
// For the rest of second output, fill with zeros
if(!d_burst)
{
for (int i=ninput_items[1]; i < noutput_items ; i++)
{
// Fill zeros
out1[i] = 0.0;
// Number of (zero) items tx'd this call
num_out1++;
}
}
// Mark end of burst
if(d_items_sent >= 1280*6) //TODO change to external burst length parameter
{
if(DEBUG) fprintf(stderr, " Finishing burst...\n");
d_burst = false;
d_items_sent = 0;
}
consume( 0, noutput_items);
consume( 1, ninput_items[1]); // Consume all available items
produce( 0, noutput_items);
produce( 1, num_out1); // Only produce the required number of items
return WORK_CALLED_PRODUCE;
}
________________________________
NOTE: The information in this email and any attachments may be confidential and/or legally privileged. This message may be read, copied and used only by the intended recipient. If you are not the intended recipient, please destroy this message, delete any copies held on your system and notify the sender immediately.
Toshiba Research Europe Limited, registered in England and Wales (2519556). Registered Office 208 Cambridge Science Park, Milton Road, Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl
This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com