1 /// 2 /// \file SoapySDR/Constants.h 3 /// 4 /// Constants used in the device API. 5 /// 6 /// \copyright 7 /// Copyright (c) 2014-2016 Josh Blum 8 /// SPDX-License-Identifier: BSL-1.0 9 /// 10 11 #pragma once 12 #include <SoapySDR/Config.h> 13 14 /*! 15 * Constant to represent the transmit direction 16 */ 17 #define SOAPY_SDR_TX 0 18 19 /*! 20 * Constant to represent the receive direction 21 */ 22 #define SOAPY_SDR_RX 1 23 24 /*! 25 * Indicate end of burst for transmit or receive. 26 * For write, end of burst if set by the caller. 27 * For read, end of burst is set by the driver. 28 */ 29 #define SOAPY_SDR_END_BURST (1 << 1) 30 31 /*! 32 * Indicates that the time stamp is valid. 33 * For write, the caller must set has time when timeNs is provided. 34 * For read, the driver sets has time when timeNs is provided. 35 */ 36 #define SOAPY_SDR_HAS_TIME (1 << 2) 37 38 /*! 39 * Indicates that stream terminated prematurely. 40 * This is the flag version of an overflow error 41 * that indicates an overflow with the end samples. 42 */ 43 #define SOAPY_SDR_END_ABRUPT (1 << 3) 44 45 /*! 46 * Indicates transmit or receive only a single packet. 47 * Applicable when the driver fragments samples into packets. 48 * For write, the user sets this flag to only send a single packet. 49 * For read, the user sets this flag to only receive a single packet. 50 */ 51 #define SOAPY_SDR_ONE_PACKET (1 << 4) 52 53 /*! 54 * Indicate that this read call and the next results in a fragment. 55 * Used when the implementation has an underlying packet interface. 56 * The caller can use this indicator and the SOAPY_SDR_ONE_PACKET flag 57 * on subsequent read stream calls to re-align with packet boundaries. 58 */ 59 #define SOAPY_SDR_MORE_FRAGMENTS (1 << 5) 60 61 /*! 62 * Indicate that the stream should wait for an external trigger event. 63 * This flag might be used with the flags argument in any of the 64 * stream API calls. The trigger implementation is hardware-specific. 65 */ 66 #define SOAPY_SDR_WAIT_TRIGGER (1 << 6) 67