| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
stream_cmd.hpp
Go to the documentation of this file.
1/*
2 * Copyright 2010-2012,2015 Ettus Research LLC
3 * Copyright 2018 Ettus Research, a National Instruments Company
4 *
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 */
7
8#pragma once
9
10#include <uhd/config.hpp>
11#include <uhd/types/time_spec.hpp>
12#include <cstdint>
13
14 namespace uhd {
15
41 struct UHD_API stream_cmd_t
42{
43 enum stream_mode_t : uint32_t {
44 STREAM_MODE_START_CONTINUOUS = int('a'),
45 STREAM_MODE_STOP_CONTINUOUS = int('o'),
46 STREAM_MODE_NUM_SAMPS_AND_DONE = int('d'),
47 STREAM_MODE_NUM_SAMPS_AND_MORE = int('m')
48 } stream_mode;
49 uint64_t num_samps;
50
52 //
53 // When false, the device will start streaming based on the \p trigger source.
54 bool stream_now;
56 time_spec_t time_spec;
57
59 //
60 // When \p stream_now is false, the trigger source controls when
61 // streaming begins. The default trigger source is TIMED, meaning
62 // that streaming will begin when the time specified in time_spec is reached.
63 enum class trigger_t {
65 TIMED,
67 TX_RUNNING,
68 } trigger;
69
70 stream_cmd_t(const stream_mode_t& stream_mode);
71};
72
73} /* namespace uhd */
uhd::time_spec_t
Definition time_spec.hpp:31
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd
Definition build_info.hpp:12
uhd::stream_cmd_t::stream_now
bool stream_now
When true, the device will begin streaming ASAP.
Definition stream_cmd.hpp:54
uhd::stream_cmd_t::trigger_t
trigger_t
Trigger source to be used when stream_now is false.
Definition stream_cmd.hpp:63
uhd::stream_cmd_t::stream_mode_t
stream_mode_t
Definition stream_cmd.hpp:43
uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE
@ STREAM_MODE_NUM_SAMPS_AND_DONE
Definition stream_cmd.hpp:46
uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_MORE
@ STREAM_MODE_NUM_SAMPS_AND_MORE
Definition stream_cmd.hpp:47
uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS
@ STREAM_MODE_STOP_CONTINUOUS
Definition stream_cmd.hpp:45
uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS
@ STREAM_MODE_START_CONTINUOUS
Definition stream_cmd.hpp:44
uhd::stream_cmd_t::num_samps
uint64_t num_samps
Definition stream_cmd.hpp:49
uhd::stream_cmd_t::time_spec
time_spec_t time_spec
The time spec to use when stream_now is false and trigger is TIMED.
Definition stream_cmd.hpp:56
uhd::stream_cmd_t::stream_mode
enum uhd::stream_cmd_t::stream_mode_t stream_mode
uhd::stream_cmd_t::stream_cmd_t
stream_cmd_t(const stream_mode_t &stream_mode)
time_spec.hpp