File: b200_radio_ctrl_core.hpp

package info (click to toggle)
uhd 4.3.0.0%2Bds1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 175,384 kB
  • sloc: cpp: 271,145; ansic: 103,960; python: 95,906; vhdl: 55,838; tcl: 14,117; xml: 8,535; makefile: 2,706; sh: 2,432; pascal: 230; javascript: 120; csh: 94; asm: 20; perl: 11
file content (48 lines) | stat: -rw-r--r-- 1,401 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// Copyright 2012-2015 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//

#pragma once

#include <uhd/transport/zero_copy.hpp>
#include <uhd/types/time_spec.hpp>
#include <uhd/types/wb_iface.hpp>
#include <uhd/utils/msg_task.hpp>
#include <memory>
#include <string>

/*!
 * Provide access to peek, poke for the radio ctrl module
 */
class b200_radio_ctrl_core : public uhd::timed_wb_iface
{
public:
    typedef std::shared_ptr<b200_radio_ctrl_core> sptr;

    ~b200_radio_ctrl_core(void) override = 0;

    //! Make a new control object
    static sptr make(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 = "0");

    //! Hold a ref to a task thats feeding push response
    virtual void hold_task(uhd::msg_task::sptr task) = 0;

    //! Push a response externall (resp_xport is NULL)
    virtual void push_response(const uint32_t* buff) = 0;

    //! Set the command time that will activate
    void set_time(const uhd::time_spec_t& time) override = 0;

    //! Get the command time that will activate
    uhd::time_spec_t get_time(void) override = 0;

    //! Set the tick rate (converting time into ticks)
    virtual void set_tick_rate(const double rate) = 0;
};