Revision 98ba0cc0 host/lib/usrp/dboard/db_wbx.cpp

b/host/lib/usrp/dboard/db_wbx.cpp
467 467
 * RX Get and Set
468 468
 **********************************************************************/
469 469
void wbx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){
470
    wax::obj key; std::string name;
471
    boost::tie(key, name) = extract_named_prop(key_);
470
    named_prop_t key = named_prop_t::extract(key_);
472 471

  
473 472
    //handle the get request conditioned on the key
474 473
    switch(key.as<subdev_prop_t>()){
......
481 480
        return;
482 481

  
483 482
    case SUBDEV_PROP_GAIN:
484
        assert_has(_rx_gains.keys(), name, "wbx rx gain name");
485
        val = _rx_gains[name];
483
        assert_has(_rx_gains.keys(), key.name, "wbx rx gain name");
484
        val = _rx_gains[key.name];
486 485
        return;
487 486

  
488 487
    case SUBDEV_PROP_GAIN_RANGE:
489
        assert_has(wbx_rx_gain_ranges.keys(), name, "wbx rx gain name");
490
        val = wbx_rx_gain_ranges[name];
488
        assert_has(wbx_rx_gain_ranges.keys(), key.name, "wbx rx gain name");
489
        val = wbx_rx_gain_ranges[key.name];
491 490
        return;
492 491

  
493 492
    case SUBDEV_PROP_GAIN_NAMES:
......
527 526
}
528 527

  
529 528
void wbx_xcvr::rx_set(const wax::obj &key_, const wax::obj &val){
530
    wax::obj key; std::string name;
531
    boost::tie(key, name) = extract_named_prop(key_);
529
    named_prop_t key = named_prop_t::extract(key_);
532 530

  
533 531
    //handle the get request conditioned on the key
534 532
    switch(key.as<subdev_prop_t>()){
......
538 536
        return;
539 537

  
540 538
    case SUBDEV_PROP_GAIN:
541
        this->set_rx_gain(val.as<float>(), name);
539
        this->set_rx_gain(val.as<float>(), key.name);
542 540
        return;
543 541

  
544 542
    case SUBDEV_PROP_ANTENNA:
......
553 551
 * TX Get and Set
554 552
 **********************************************************************/
555 553
void wbx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){
556
    wax::obj key; std::string name;
557
    boost::tie(key, name) = extract_named_prop(key_);
554
    named_prop_t key = named_prop_t::extract(key_);
558 555

  
559 556
    //handle the get request conditioned on the key
560 557
    switch(key.as<subdev_prop_t>()){
......
567 564
        return;
568 565

  
569 566
    case SUBDEV_PROP_GAIN:
570
        assert_has(_tx_gains.keys(), name, "wbx tx gain name");
571
        val = _tx_gains[name];
567
        assert_has(_tx_gains.keys(), key.name, "wbx tx gain name");
568
        val = _tx_gains[key.name];
572 569
        return;
573 570

  
574 571
    case SUBDEV_PROP_GAIN_RANGE:
575
        assert_has(wbx_tx_gain_ranges.keys(), name, "wbx tx gain name");
576
        val = wbx_tx_gain_ranges[name];
572
        assert_has(wbx_tx_gain_ranges.keys(), key.name, "wbx tx gain name");
573
        val = wbx_tx_gain_ranges[key.name];
577 574
        return;
578 575

  
579 576
    case SUBDEV_PROP_GAIN_NAMES:
......
613 610
}
614 611

  
615 612
void wbx_xcvr::tx_set(const wax::obj &key_, const wax::obj &val){
616
    wax::obj key; std::string name;
617
    boost::tie(key, name) = extract_named_prop(key_);
613
    named_prop_t key = named_prop_t::extract(key_);
618 614

  
619 615
    //handle the get request conditioned on the key
620 616
    switch(key.as<subdev_prop_t>()){
......
624 620
        return;
625 621

  
626 622
    case SUBDEV_PROP_GAIN:
627
        this->set_tx_gain(val.as<float>(), name);
623
        this->set_tx_gain(val.as<float>(), key.name);
628 624
        return;
629 625

  
630 626
    case SUBDEV_PROP_ANTENNA:

Also available in: Unified diff