GNU Radio 3.4.0 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2008 Free Software Foundation, Inc. 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 #ifndef INCLUDED_USRP2_METADATA_H 00019 #define INCLUDED_USRP2_METADATA_H 00020 00021 #include <stdint.h> 00022 00023 namespace usrp2 { 00024 00025 //! type of the timestamp returned from the USRP2 FPGA 00026 typedef uint32_t fpga_timestamp; 00027 00028 /*! 00029 * \brief metadata associated with received frames 00030 * \ingroup usrp2 00031 */ 00032 struct rx_metadata { 00033 uint32_t word0; //< debugging, extensions 00034 fpga_timestamp timestamp; //< time that first sample of frame was received 00035 unsigned int start_of_burst : 1; //< this frame is the start of a burst 00036 unsigned int end_of_burst : 1; //< this frame is the end of a burst 00037 unsigned int rx_overrun : 1; //< An Rx overrun occurred in the FPGA 00038 // rssi 00039 // agc_mode 00040 00041 rx_metadata() : 00042 word0(0), timestamp(0), start_of_burst(0), end_of_burst(0), rx_overrun(0) {} 00043 }; 00044 00045 /*! 00046 * \brief metadata associated with transmitted frames 00047 * \ingroup usrp2 00048 */ 00049 struct tx_metadata { 00050 fpga_timestamp timestamp; //< time to transmit first sample of frame 00051 unsigned int send_now : 1; //< ignore timestamp, send now 00052 unsigned int start_of_burst : 1; //< this frame is the start of a burst 00053 unsigned int end_of_burst : 1; //< this frame is the end of a burst 00054 // ... 00055 00056 tx_metadata() : 00057 timestamp(0), send_now(0), start_of_burst(0), end_of_burst(0) {} 00058 }; 00059 00060 }; // usrp2 00061 00062 #endif /* INCLUDED_USRP2_METADATA_H */