UHD 003.004.003-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 */