UHD 003.005.002-0-unknown

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
metadata.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010-2012 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17
18 #ifndef INCLUDED_UHD_TYPES_METADATA_HPP
19 #define INCLUDED_UHD_TYPES_METADATA_HPP
20
21 #include <uhd/config.hpp>
22 #include <uhd/types/time_spec.hpp>
23 #include <boost/cstdint.hpp>
24
25 namespace uhd{
26
32 struct UHD_API rx_metadata_t{
34 bool has_time_spec;
35
37 time_spec_t time_spec;
38
45 bool more_fragments;
46
52 size_t fragment_offset;
53
55 bool start_of_burst;
56
58 bool end_of_burst;
59
74 enum error_code_t {
76 ERROR_CODE_NONE = 0x0,
78 ERROR_CODE_TIMEOUT = 0x1,
80 ERROR_CODE_LATE_COMMAND = 0x2,
82 ERROR_CODE_BROKEN_CHAIN = 0x4,
84 ERROR_CODE_OVERFLOW = 0x8,
86 ERROR_CODE_ALIGNMENT = 0xc,
88 ERROR_CODE_BAD_PACKET = 0xf
89 } error_code;
90 };
91
97 struct UHD_API tx_metadata_t{
103 bool has_time_spec;
104
106 time_spec_t time_spec;
107
109 bool start_of_burst;
110
112 bool end_of_burst;
113
118 tx_metadata_t(void);
119 };
120
124 struct UHD_API async_metadata_t{
126 size_t channel;
127
129 bool has_time_spec;
130
132 time_spec_t time_spec;
133
137 enum event_code_t {
139 EVENT_CODE_BURST_ACK = 0x1,
141 EVENT_CODE_UNDERFLOW = 0x2,
143 EVENT_CODE_SEQ_ERROR = 0x4,
145 EVENT_CODE_TIME_ERROR = 0x8,
147 EVENT_CODE_UNDERFLOW_IN_PACKET = 0x10,
149 EVENT_CODE_SEQ_ERROR_IN_BURST = 0x20,
151 EVENT_CODE_USER_PAYLOAD = 0x40
152 } event_code;
153
157 boost::uint32_t user_payload[4];
158
159 };
160
161 } //namespace uhd
162
163 #endif /* INCLUDED_UHD_TYPES_METADATA_HPP */
uhd::rx_metadata_t::time_spec
time_spec_t time_spec
Time of the first sample.
Definition: metadata.hpp:37
uhd::tx_metadata_t::end_of_burst
bool end_of_burst
Set end of burst to true for the last packet in the chain.
Definition: metadata.hpp:112
uhd::tx_metadata_t::time_spec
time_spec_t time_spec
When to send the first sample.
Definition: metadata.hpp:106
uhd::time_spec_t
Definition: time_spec.hpp:39
uhd::async_metadata_t::has_time_spec
bool has_time_spec
Has time specification?
Definition: metadata.hpp:129
config.hpp
uhd::rx_metadata_t::fragment_offset
size_t fragment_offset
Definition: metadata.hpp:52
uhd::async_metadata_t::event_code_t
event_code_t
Definition: metadata.hpp:137
uhd::rx_metadata_t
Definition: metadata.hpp:32
uhd::tx_metadata_t
Definition: metadata.hpp:97
UHD_API
#define UHD_API
Definition: config.hpp:76
uhd::tx_metadata_t::has_time_spec
bool has_time_spec
Definition: metadata.hpp:103
time_spec.hpp
uhd::rx_metadata_t::start_of_burst
bool start_of_burst
Start of burst will be true for the first packet in the chain.
Definition: metadata.hpp:55
uhd::rx_metadata_t::error_code_t
error_code_t
Definition: metadata.hpp:74
uhd::tx_metadata_t::start_of_burst
bool start_of_burst
Set start of burst to true for the first packet in the chain.
Definition: metadata.hpp:109
uhd::rx_metadata_t::has_time_spec
bool has_time_spec
Has time specification?
Definition: metadata.hpp:34
uhd::async_metadata_t
Definition: metadata.hpp:124
uhd::async_metadata_t::channel
size_t channel
The channel number in a mimo configuration.
Definition: metadata.hpp:126
uhd::rx_metadata_t::more_fragments
bool more_fragments
Definition: metadata.hpp:45
uhd::rx_metadata_t::end_of_burst
bool end_of_burst
End of burst will be true for the last packet in the chain.
Definition: metadata.hpp:58
uhd::async_metadata_t::time_spec
time_spec_t time_spec
When the async event occurred.
Definition: metadata.hpp:132