コード例 #1
0
ファイル: radio_ctrl_core_3000.cpp プロジェクト: Gabotero/UHD
 radio_ctrl_core_3000_impl(
     const bool big_endian,
     uhd::transport::zero_copy_if::sptr ctrl_xport,
     uhd::transport::zero_copy_if::sptr resp_xport,
     const boost::uint32_t sid,
     const std::string &name
 ):
     _link_type(vrt::if_packet_info_t::LINK_TYPE_CHDR),
     _packet_type(vrt::if_packet_info_t::PACKET_TYPE_CONTEXT),
     _bige(big_endian),
     _ctrl_xport(ctrl_xport),
     _resp_xport(resp_xport),
     _sid(sid),
     _name(name),
     _seq_out(0),
     _timeout(ACK_TIMEOUT),
     _resp_queue(128/*max response msgs*/),
     _resp_queue_size(_resp_xport? _resp_xport->get_num_recv_frames() : 3)
 {
     UHD_LOG << "radio_ctrl_core_3000_impl() " << _name << std::endl;
     if (resp_xport)
     {
         while (resp_xport->get_recv_buff(0.0)){} //flush
     }
     this->set_time(uhd::time_spec_t(0.0));
     this->set_tick_rate(1.0); //something possible but bogus
 }
コード例 #2
0
ファイル: ctrl_iface.cpp プロジェクト: ilovezfs/uhd
 ctrl_iface_impl(const bool big_endian,
         uhd::transport::zero_copy_if::sptr ctrl_xport,
         uhd::transport::zero_copy_if::sptr resp_xport,
         const uint32_t sid, const std::string &name
 ) :
     _link_type(vrt::if_packet_info_t::LINK_TYPE_CHDR),
     _packet_type(vrt::if_packet_info_t::PACKET_TYPE_CONTEXT),
     _bige(big_endian),
     _ctrl_xport(ctrl_xport), _resp_xport(resp_xport),
     _sid(sid),
     _name(name),
     _seq_out(0),
     _timeout(ACK_TIMEOUT),
     _resp_queue_size(_resp_xport->get_num_recv_frames()),
     _rb_address(uhd::rfnoc::SR_READBACK)
 {
     UHD_ASSERT_THROW(_ctrl_xport);
     UHD_ASSERT_THROW(_resp_xport);
     while (resp_xport->get_recv_buff(0.0)) {} //flush
     this->set_time(uhd::time_spec_t(0.0));
     this->set_tick_rate(1.0); //something possible but bogus
 }