UHD
003.004.003-release
|
00001 // 00002 // Copyright 2010-2012 Ettus Research LLC 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #ifndef INCLUDED_UHD_TYPES_METADATA_HPP 00019 #define INCLUDED_UHD_TYPES_METADATA_HPP 00020 00021 #include <uhd/config.hpp> 00022 #include <uhd/types/time_spec.hpp> 00023 #include <boost/cstdint.hpp> 00024 00025 namespace uhd{ 00026 00032 struct UHD_API rx_metadata_t{ 00034 bool has_time_spec; 00035 00037 time_spec_t time_spec; 00038 00045 bool more_fragments; 00046 00052 size_t fragment_offset; 00053 00055 bool start_of_burst; 00056 00058 bool end_of_burst; 00059 00074 enum error_code_t { 00076 ERROR_CODE_NONE = 0x0, 00078 ERROR_CODE_TIMEOUT = 0x1, 00080 ERROR_CODE_LATE_COMMAND = 0x2, 00082 ERROR_CODE_BROKEN_CHAIN = 0x4, 00084 ERROR_CODE_OVERFLOW = 0x8, 00086 ERROR_CODE_ALIGNMENT = 0xc, 00088 ERROR_CODE_BAD_PACKET = 0xf 00089 } error_code; 00090 }; 00091 00097 struct UHD_API tx_metadata_t{ 00103 bool has_time_spec; 00104 00106 time_spec_t time_spec; 00107 00109 bool start_of_burst; 00110 00112 bool end_of_burst; 00113 00118 tx_metadata_t(void); 00119 }; 00120 00124 struct UHD_API async_metadata_t{ 00126 size_t channel; 00127 00129 bool has_time_spec; 00130 00132 time_spec_t time_spec; 00133 00137 enum event_code_t { 00139 EVENT_CODE_BURST_ACK = 0x1, 00141 EVENT_CODE_UNDERFLOW = 0x2, 00143 EVENT_CODE_SEQ_ERROR = 0x4, 00145 EVENT_CODE_TIME_ERROR = 0x8, 00147 EVENT_CODE_UNDERFLOW_IN_PACKET = 0x10, 00149 EVENT_CODE_SEQ_ERROR_IN_BURST = 0x20, 00151 EVENT_CODE_USER_PAYLOAD = 0x40 00152 } event_code; 00153 00157 boost::uint32_t user_payload[4]; 00158 00159 }; 00160 00161 } //namespace uhd 00162 00163 #endif /* INCLUDED_UHD_TYPES_METADATA_HPP */