All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
metadata.hpp
Go to the documentation of this file.
//
// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef INCLUDED_UHD_TYPES_METADATA_HPP
#define INCLUDED_UHD_TYPES_METADATA_HPP
#include <uhd/config.hpp>
#include <uhd/types/time_spec.hpp>
#include <boost/cstdint.hpp>
namespace uhd{
struct UHD_API rx_metadata_t{
bool has_time_spec;
time_spec_t time_spec;
bool more_fragments;
size_t fragment_offset;
bool start_of_burst;
bool end_of_burst;
enum error_code_t {
ERROR_CODE_NONE = 0x0,
ERROR_CODE_TIMEOUT = 0x1,
ERROR_CODE_LATE_COMMAND = 0x2,
ERROR_CODE_BROKEN_CHAIN = 0x4,
ERROR_CODE_OVERFLOW = 0x8,
ERROR_CODE_ALIGNMENT = 0xc,
ERROR_CODE_BAD_PACKET = 0xf
} error_code;
};
struct UHD_API tx_metadata_t{
bool has_time_spec;
time_spec_t time_spec;
bool start_of_burst;
bool end_of_burst;
tx_metadata_t(void);
};
struct UHD_API async_metadata_t{
size_t channel;
bool has_time_spec;
time_spec_t time_spec;
enum event_code_t {
EVENT_CODE_BURST_ACK = 0x1,
EVENT_CODE_UNDERFLOW = 0x2,
EVENT_CODE_SEQ_ERROR = 0x4,
EVENT_CODE_TIME_ERROR = 0x8,
EVENT_CODE_UNDERFLOW_IN_PACKET = 0x10,
EVENT_CODE_SEQ_ERROR_IN_BURST = 0x20,
EVENT_CODE_USER_PAYLOAD = 0x40
} event_code;
boost::uint32_t user_payload[4];
};
} //namespace uhd
#endif /* INCLUDED_UHD_TYPES_METADATA_HPP */