UHD 003.001.002
|
00001 // 00002 // Copyright 2010 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 00024 namespace uhd{ 00025 00031 struct UHD_API rx_metadata_t{ 00033 bool has_time_spec; 00034 00036 time_spec_t time_spec; 00037 00044 bool more_fragments; 00045 00051 size_t fragment_offset; 00052 00054 bool start_of_burst; 00055 00057 bool end_of_burst; 00058 00073 enum error_code_t { 00075 ERROR_CODE_NONE = 0x0, 00077 ERROR_CODE_TIMEOUT = 0x1, 00079 ERROR_CODE_LATE_COMMAND = 0x2, 00081 ERROR_CODE_BROKEN_CHAIN = 0x4, 00083 ERROR_CODE_OVERFLOW = 0x8, 00085 ERROR_CODE_ALIGNMENT = 0xc, 00087 ERROR_CODE_BAD_PACKET = 0xf 00088 } error_code; 00089 }; 00090 00096 struct UHD_API tx_metadata_t{ 00102 bool has_time_spec; 00103 00105 time_spec_t time_spec; 00106 00108 bool start_of_burst; 00109 00111 bool end_of_burst; 00112 00117 tx_metadata_t(void); 00118 }; 00119 00123 struct UHD_API async_metadata_t{ 00125 size_t channel; 00126 00128 bool has_time_spec; 00129 00131 time_spec_t time_spec; 00132 00136 enum event_code_t { 00138 EVENT_CODE_BURST_ACK = 0x1, 00140 EVENT_CODE_UNDERFLOW = 0x2, 00142 EVENT_CODE_SEQ_ERROR = 0x4, 00144 EVENT_CODE_TIME_ERROR = 0x8, 00146 EVENT_CODE_UNDERFLOW_IN_PACKET = 0x10, 00148 EVENT_CODE_SEQ_ERROR_IN_BURST = 0x20 00149 } event_code; 00150 }; 00151 00152 } //namespace uhd 00153 00154 #endif /* INCLUDED_UHD_TYPES_METADATA_HPP */