USRP Hardware Driver and Device Manual  Version: 4.10.0.0-0-g2af4ddb9
UHD and USRP Manual
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 
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;
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 */
Definition: time_spec.hpp:31
#define UHD_API
Definition: config.h:87
Definition: build_info.hpp:12
Definition: stream_cmd.hpp:42
bool stream_now
When true, the device will begin streaming ASAP.
Definition: stream_cmd.hpp:54
trigger_t
Trigger source to be used when stream_now is false.
Definition: stream_cmd.hpp:63
stream_mode_t
Definition: stream_cmd.hpp:43
uint64_t num_samps
Definition: stream_cmd.hpp:49
time_spec_t time_spec
The time spec to use when stream_now is false and trigger is TIMED.
Definition: stream_cmd.hpp:56
stream_cmd_t(const stream_mode_t &stream_mode)