UHD  003.005.005-0-g3c6a906c
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 
35 
38 
46 
53 
56 
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 
104 
107 
110 
113 
118  tx_metadata_t(void);
119  };
120 
126  size_t channel;
127 
130 
133 
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 */
time_spec_t time_spec
Time of the first sample.
Definition: metadata.hpp:37
bool end_of_burst
Set end of burst to true for the last packet in the chain.
Definition: metadata.hpp:112
time_spec_t time_spec
When to send the first sample.
Definition: metadata.hpp:106
Definition: time_spec.hpp:39
bool has_time_spec
Has time specification?
Definition: metadata.hpp:129
size_t fragment_offset
Definition: metadata.hpp:52
event_code_t
Definition: metadata.hpp:137
Definition: metadata.hpp:32
Definition: metadata.hpp:97
#define UHD_API
Definition: config.hpp:76
Definition: convert.hpp:28
bool has_time_spec
Definition: metadata.hpp:103
bool start_of_burst
Start of burst will be true for the first packet in the chain.
Definition: metadata.hpp:55
error_code_t
Definition: metadata.hpp:74
bool start_of_burst
Set start of burst to true for the first packet in the chain.
Definition: metadata.hpp:109
bool has_time_spec
Has time specification?
Definition: metadata.hpp:34
Definition: metadata.hpp:124
size_t channel
The channel number in a mimo configuration.
Definition: metadata.hpp:126
bool more_fragments
Definition: metadata.hpp:45
bool end_of_burst
End of burst will be true for the last packet in the chain.
Definition: metadata.hpp:58
time_spec_t time_spec
When the async event occurred.
Definition: metadata.hpp:132