UHD 003.000.000

include/uhd/types/metadata.hpp

Go to the documentation of this file.
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_BAD_PACKET   = 0xf
00086         } error_code;
00087     };
00088 
00094     struct UHD_API tx_metadata_t{
00100         bool has_time_spec;
00101 
00103         time_spec_t time_spec;
00104 
00106         bool start_of_burst;
00107 
00109         bool end_of_burst;
00110 
00115         tx_metadata_t(void);
00116     };
00117 
00121     struct UHD_API async_metadata_t{
00123         size_t channel;
00124 
00126         bool has_time_spec;
00127 
00129         time_spec_t time_spec;
00130 
00134         enum event_code_t {
00136             EVENT_CODE_BURST_ACK  = 0x1,
00138             EVENT_CODE_UNDERFLOW  = 0x2,
00140             EVENT_CODE_SEQ_ERROR  = 0x4,
00142             EVENT_CODE_TIME_ERROR = 0x8,
00144             EVENT_CODE_UNDERFLOW_IN_PACKET = 0x10,
00146             EVENT_CODE_SEQ_ERROR_IN_BURST  = 0x20
00147         } event_code;
00148     };
00149 
00150 } //namespace uhd
00151 
00152 #endif /* INCLUDED_UHD_TYPES_METADATA_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines