module: usrp_rfrx
label_as_usrp_module: yes
parameters: double dco_freq, double vco_freq,
            double adc_gain, double mixer_gain,
            double sample_rate, int offset_cancel_on
inputs: 
outputs: double rx_a, double rx_b
classes: USRPReceiveObject usrp_receive_object(sample_rate,Ts);
static_variables:  double actual_vco_freq
init:
int slot, flag;

flag = 0;
for (slot = 1; slot >= 0; slot--)
   {
    usrp_receive_object.set_slot(slot);
    if (usrp_receive_object.dbid == USRP_DBID_FLEX_400_RX || 
        usrp_receive_object.dbid == USRP_DBID_FLEX_2400_RX ||
        usrp_receive_object.dbid == USRP_DBID_FLEX_2400_RX_MIMO_A ||
        usrp_receive_object.dbid == USRP_DBID_FLEX_2400_RX_MIMO_B)
       {
        flag = 1;
        if (usrp_receive_object.dbid == USRP_DBID_FLEX_400_RX)
            printf("found USRP RFX400 board on slot '%d'\n",slot);
        else
            printf("found USRP RFX2400 board on slot '%d'\n",slot);
        break;
       }
   }
if (flag == 0)
   {
    printf("error in 'usrp_rfrx':  can't find a RFX400 or RFX2400 daughterboard\n");
    for (slot = 1; slot >= 0; slot--)
      {
       usrp_receive_object.set_slot(slot);
       printf("... found USRP dbid '0x%x' on *receive* slot '%d'\n",
               usrp_receive_object.dbid, slot);
      }
    exit(1); 
   }

usrp_receive_object.enable_rf_card();
usrp_receive_object.set_dco_freq(dco_freq);
usrp_receive_object.set_vco_freq(vco_freq);
usrp_receive_object.set_mixer_gain(mixer_gain);

if (offset_cancel_on == 0)
   usrp_receive_object.disable_offset_cancel();
else
   usrp_receive_object.enable_offset_cancel();

usrp_receive_object.set_adc_gain(adc_gain);

code:

usrp_receive_object.stream_adc_in(&rx_a,&rx_b);
