diff options
author | Josh Blum <josh@joshknows.com> | 2010-03-27 14:27:55 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-03-27 14:27:55 -0700 |
commit | b71d0cbea9e1e107eeb1da51ef14fe6b9e983ee6 (patch) | |
tree | f0b8e41990c2600cac35467b3dcfbfed097d86cc /host/include | |
parent | 52df9afd679fd0f42edeef29f0bbc0d7bd76559e (diff) | |
download | uhd-b71d0cbea9e1e107eeb1da51ef14fe6b9e983ee6.tar.gz uhd-b71d0cbea9e1e107eeb1da51ef14fe6b9e983ee6.tar.bz2 uhd-b71d0cbea9e1e107eeb1da51ef14fe6b9e983ee6.zip |
refactored types.hpp into types directory
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/CMakeLists.txt | 6 | ||||
-rw-r--r-- | host/include/uhd/device.hpp | 4 | ||||
-rw-r--r-- | host/include/uhd/metadata.hpp | 61 | ||||
-rw-r--r-- | host/include/uhd/simple_device.hpp | 4 | ||||
-rw-r--r-- | host/include/uhd/transport/vrt.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/types.hpp | 119 | ||||
-rw-r--r-- | host/include/uhd/types/CMakeLists.txt | 30 | ||||
-rw-r--r-- | host/include/uhd/types/clock_config.hpp | 50 | ||||
-rw-r--r-- | host/include/uhd/types/device_addr.hpp (renamed from host/include/uhd/device_addr.hpp) | 44 | ||||
-rw-r--r-- | host/include/uhd/types/dict.hpp (renamed from host/include/uhd/dict.hpp) | 6 | ||||
-rw-r--r-- | host/include/uhd/types/mac_addr.hpp | 39 | ||||
-rw-r--r-- | host/include/uhd/types/metadata.hpp | 61 | ||||
-rw-r--r-- | host/include/uhd/types/ranges.hpp | 46 | ||||
-rw-r--r-- | host/include/uhd/types/stream_cmd.hpp | 56 | ||||
-rw-r--r-- | host/include/uhd/types/time_spec.hpp (renamed from host/include/uhd/time_spec.hpp) | 6 | ||||
-rw-r--r-- | host/include/uhd/types/tune_result.hpp | 44 |
16 files changed, 349 insertions, 229 deletions
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index 2203ea83e..0cebea095 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -17,20 +17,16 @@ ADD_SUBDIRECTORY(transport) +ADD_SUBDIRECTORY(types) ADD_SUBDIRECTORY(usrp) ADD_SUBDIRECTORY(utils) INSTALL(FILES config.hpp device.hpp - device_addr.hpp - dict.hpp gain_handler.hpp - metadata.hpp props.hpp simple_device.hpp - time_spec.hpp - types.hpp wax.hpp DESTINATION ${INCLUDE_DIR}/uhd ) diff --git a/host/include/uhd/device.hpp b/host/include/uhd/device.hpp index 13b40febe..bab8afca6 100644 --- a/host/include/uhd/device.hpp +++ b/host/include/uhd/device.hpp @@ -19,9 +19,9 @@ #define INCLUDED_UHD_DEVICE_HPP #include <uhd/config.hpp> -#include <uhd/device_addr.hpp> +#include <uhd/types/device_addr.hpp> +#include <uhd/types/metadata.hpp> #include <uhd/props.hpp> -#include <uhd/metadata.hpp> #include <uhd/wax.hpp> #include <boost/utility.hpp> #include <boost/shared_ptr.hpp> diff --git a/host/include/uhd/metadata.hpp b/host/include/uhd/metadata.hpp deleted file mode 100644 index 6d80f070d..000000000 --- a/host/include/uhd/metadata.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2010 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_METADATA_HPP -#define INCLUDED_UHD_METADATA_HPP - -#include <uhd/config.hpp> -#include <uhd/time_spec.hpp> - -namespace uhd{ - -/*! - * RX metadata structure for describing sent IF data. - * Includes stream ID, time specification, and fragmentation flags. - * The receive routines will convert IF data headers into metadata. - */ -struct UHD_API rx_metadata_t{ - boost::uint32_t stream_id; - time_spec_t time_spec; - bool has_stream_id; - bool has_time_spec; - bool is_fragment; - - //default constructor - rx_metadata_t(void); -}; - -/*! - * TX metadata structure for describing received IF data. - * Includes stream ID, time specification, and burst flags. - * The send routines will convert the metadata to IF data headers. - */ -struct UHD_API tx_metadata_t{ - boost::uint32_t stream_id; - time_spec_t time_spec; - bool has_stream_id; - bool has_time_spec; - bool start_of_burst; - bool end_of_burst; - - //default constructor - tx_metadata_t(void); -}; - -} //namespace uhd - -#endif /* INCLUDED_UHD_METADATA_HPP */ diff --git a/host/include/uhd/simple_device.hpp b/host/include/uhd/simple_device.hpp index bbe0258c7..52928367a 100644 --- a/host/include/uhd/simple_device.hpp +++ b/host/include/uhd/simple_device.hpp @@ -20,7 +20,9 @@ #include <uhd/config.hpp> #include <uhd/device.hpp> -#include <uhd/types.hpp> +#include <uhd/types/ranges.hpp> +#include <uhd/types/stream_cmd.hpp> +#include <uhd/types/tune_result.hpp> #include <boost/shared_ptr.hpp> #include <boost/utility.hpp> #include <vector> diff --git a/host/include/uhd/transport/vrt.hpp b/host/include/uhd/transport/vrt.hpp index db2c57eba..04945b347 100644 --- a/host/include/uhd/transport/vrt.hpp +++ b/host/include/uhd/transport/vrt.hpp @@ -19,7 +19,7 @@ #define INCLUDED_UHD_TRANSPORT_VRT_HPP #include <uhd/config.hpp> -#include <uhd/metadata.hpp> +#include <uhd/types/metadata.hpp> #include <cstddef> namespace uhd{ namespace transport{ diff --git a/host/include/uhd/types.hpp b/host/include/uhd/types.hpp deleted file mode 100644 index 3ad3dae82..000000000 --- a/host/include/uhd/types.hpp +++ /dev/null @@ -1,119 +0,0 @@ -// -// Copyright 2010 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_HPP -#define INCLUDED_UHD_TYPES_HPP - -#include <uhd/config.hpp> -#include <uhd/time_spec.hpp> -#include <string> - -namespace uhd{ - - typedef float gain_t; //TODO REMOVE - typedef double freq_t; //TODO REMOVE - - /*! - * The gain range struct describes possible gain settings. - * The mimumum gain, maximum gain, and step size are in dB. - */ - struct UHD_API gain_range_t{ - float min, max, step; - gain_range_t(float min = 0.0, float max = 0.0, float step = 0.0); - }; - - /*! - * The frequency range struct describes possible frequency settings. - * Because tuning is very granular (sub-Hz), step size is not listed. - * The mimumum frequency and maximum frequency are in Hz. - */ - struct UHD_API freq_range_t{ - double min, max; - freq_range_t(double min = 0.0, double max = 0.0); - }; - - /*! - * The tune result struct holds result of a 2-phase tuning: - * The struct hold the result of tuning the dboard as - * the target and actual intermediate frequency. - * The struct hold the result of tuning the DDC/DUC as - * the target and actual digital converter frequency. - * It also tell us weather or not the spectrum is inverted. - */ - struct UHD_API tune_result_t{ - double target_inter_freq; - double actual_inter_freq; - double target_dxc_freq; - double actual_dxc_freq; - bool spectrum_inverted; - tune_result_t(void); - }; - - /*! - * Clock configuration settings: - * The source for the 10MHz reference clock. - * The source and polarity for the PPS clock. - */ - struct UHD_API clock_config_t{ - enum ref_source_t { - REF_INT, //internal reference - REF_SMA, //external sma port - REF_MIMO //mimo cable (usrp2 only) - } ref_source; - enum pps_source_t { - PPS_INT, //there is no internal - PPS_SMA, //external sma port - PPS_MIMO //mimo cable (usrp2 only) - } pps_source; - enum pps_polarity_t { - PPS_NEG, //negative edge - PPS_POS //positive edge - } pps_polarity; - clock_config_t(void); - }; - - /*! - * Command struct for configuration and control of streaming: - * - * A stream command defines how the device sends samples to the host. - * Streaming is controlled by submitting a stream command to the rx dsp. - * Granular control over what the device streams to the host can be - * achieved through submission of multiple (carefully-crafted) commands. - * - * The stream_now parameter controls when the stream begins. - * When true, the device will begin streaming ASAP. When false, - * the device will begin streaming at a time specified by time_spec. - * - * The continuous parameter controls the number of samples received. - * When true, the device continues streaming indefinitely. When false, - * the device will stream the number of samples specified by num_samps. - * - * Standard usage case: - * To start continuous streaming, set stream_now to true and continuous to true. - * To end continuous streaming, set stream_now to true and continuous to false. - */ - struct UHD_API stream_cmd_t{ - bool stream_now; - time_spec_t time_spec; - bool continuous; - size_t num_samps; - stream_cmd_t(void); - }; - -} //namespace uhd - -#endif /* INCLUDED_UHD_TYPES_HPP */ diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt new file mode 100644 index 000000000..10262dd65 --- /dev/null +++ b/host/include/uhd/types/CMakeLists.txt @@ -0,0 +1,30 @@ +# +# Copyright 2010 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/>. +# + + +INSTALL(FILES + clock_config.hpp + device_addr.hpp + dict.hpp + mac_addr.hpp + metadata.hpp + ranges.hpp + stream_cmd.hpp + time_spec.hpp + tune_result.hpp + DESTINATION ${INCLUDE_DIR}/uhd/types +) diff --git a/host/include/uhd/types/clock_config.hpp b/host/include/uhd/types/clock_config.hpp new file mode 100644 index 000000000..8b2fea016 --- /dev/null +++ b/host/include/uhd/types/clock_config.hpp @@ -0,0 +1,50 @@ +// +// Copyright 2010 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_CLOCK_CONFIG_HPP +#define INCLUDED_UHD_TYPES_CLOCK_CONFIG_HPP + +#include <uhd/config.hpp> + +namespace uhd{ + + /*! + * Clock configuration settings: + * The source for the 10MHz reference clock. + * The source and polarity for the PPS clock. + */ + struct UHD_API clock_config_t{ + enum ref_source_t { + REF_INT, //internal reference + REF_SMA, //external sma port + REF_MIMO //mimo cable (usrp2 only) + } ref_source; + enum pps_source_t { + PPS_INT, //there is no internal + PPS_SMA, //external sma port + PPS_MIMO //mimo cable (usrp2 only) + } pps_source; + enum pps_polarity_t { + PPS_NEG, //negative edge + PPS_POS //positive edge + } pps_polarity; + clock_config_t(void); + }; + +} //namespace uhd + +#endif /* INCLUDED_UHD_TYPES_CLOCK_CONFIG_HPP */ diff --git a/host/include/uhd/device_addr.hpp b/host/include/uhd/types/device_addr.hpp index 7673faff0..d32dfa77e 100644 --- a/host/include/uhd/device_addr.hpp +++ b/host/include/uhd/types/device_addr.hpp @@ -15,29 +15,17 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#ifndef INCLUDED_UHD_DEVICE_ADDR_HPP -#define INCLUDED_UHD_DEVICE_ADDR_HPP +#ifndef INCLUDED_UHD_TYPES_DEVICE_ADDR_HPP +#define INCLUDED_UHD_TYPES_DEVICE_ADDR_HPP #include <uhd/config.hpp> -#include <uhd/dict.hpp> -#include <boost/cstdint.hpp> -#include <string> -#include <iostream> +#include <uhd/types/dict.hpp> #include <vector> +#include <string> namespace uhd{ /*! - * Wrapper for an ethernet mac address. - * Provides conversion between string and binary formats. - */ - struct UHD_API mac_addr_t{ - boost::uint8_t mac_addr[6]; - mac_addr_t(const std::string &mac_addr_str = "00:00:00:00:00:00"); - std::string to_string(void) const; - }; - - /*! * The device address args are just a mapping of key/value string pairs. * When left empty, the discovery routine will try to find all usrps. * The discovery can be narrowed down by specifying the transport type arguments. @@ -45,25 +33,13 @@ namespace uhd{ * For example, to access a specific usrp2 one would specify the transport type * ("type", "udp") and the transport args ("addr", "<resolvable_hostname_or_addr>"). */ - typedef dict<std::string, std::string> device_addr_t; - typedef std::vector<device_addr_t> device_addrs_t; + class UHD_API device_addr_t : public dict<std::string, std::string>{ + public: std::string to_string(void) const; + }; - /*! - * Function to turn a device address into a string. - * Just having the operator<< below should be sufficient. - * However, boost format seems to complain with the % - * and this is just easier because it works. - * \param device_addr a device address instance - * \return the string representation - */ - namespace device_addr{ - UHD_API std::string to_string(const device_addr_t &device_addr); - } + //handy typedef for a vector of device addresses + typedef std::vector<device_addr_t> device_addrs_t; } //namespace uhd -//ability to use types with stream operators -UHD_API std::ostream& operator<<(std::ostream &, const uhd::device_addr_t &); -UHD_API std::ostream& operator<<(std::ostream &, const uhd::mac_addr_t &); - -#endif /* INCLUDED_UHD_DEVICE_ADDR_HPP */ +#endif /* INCLUDED_UHD_TYPES_DEVICE_ADDR_HPP */ diff --git a/host/include/uhd/dict.hpp b/host/include/uhd/types/dict.hpp index f08493952..5b9883704 100644 --- a/host/include/uhd/dict.hpp +++ b/host/include/uhd/types/dict.hpp @@ -15,8 +15,8 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#ifndef INCLUDED_UHD_DICT_HPP -#define INCLUDED_UHD_DICT_HPP +#ifndef INCLUDED_UHD_TYPES_DICT_HPP +#define INCLUDED_UHD_TYPES_DICT_HPP #include <list> #include <vector> @@ -151,4 +151,4 @@ namespace uhd{ } //namespace uhd -#endif /* INCLUDED_UHD_DICT_HPP */ +#endif /* INCLUDED_UHD_TYPES_DICT_HPP */ diff --git a/host/include/uhd/types/mac_addr.hpp b/host/include/uhd/types/mac_addr.hpp new file mode 100644 index 000000000..2cac7d343 --- /dev/null +++ b/host/include/uhd/types/mac_addr.hpp @@ -0,0 +1,39 @@ +// +// Copyright 2010 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_MAC_ADDR_HPP +#define INCLUDED_UHD_TYPES_MAC_ADDR_HPP + +#include <uhd/config.hpp> +#include <boost/cstdint.hpp> +#include <string> + +namespace uhd{ + + /*! + * Wrapper for an ethernet mac address. + * Provides conversion between string and binary formats. + */ + struct UHD_API mac_addr_t{ + boost::uint8_t mac_addr[6]; + mac_addr_t(const std::string &mac_addr_str = "00:00:00:00:00:00"); + std::string to_string(void) const; + }; + +} //namespace uhd + +#endif /* INCLUDED_UHD_TYPES_MAC_ADDR_HPP */ diff --git a/host/include/uhd/types/metadata.hpp b/host/include/uhd/types/metadata.hpp new file mode 100644 index 000000000..6e93040d9 --- /dev/null +++ b/host/include/uhd/types/metadata.hpp @@ -0,0 +1,61 @@ +// +// Copyright 2010 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> + +namespace uhd{ + + /*! + * RX metadata structure for describing sent IF data. + * Includes stream ID, time specification, and fragmentation flags. + * The receive routines will convert IF data headers into metadata. + */ + struct UHD_API rx_metadata_t{ + boost::uint32_t stream_id; + time_spec_t time_spec; + bool has_stream_id; + bool has_time_spec; + bool is_fragment; + + //default constructor + rx_metadata_t(void); + }; + + /*! + * TX metadata structure for describing received IF data. + * Includes stream ID, time specification, and burst flags. + * The send routines will convert the metadata to IF data headers. + */ + struct UHD_API tx_metadata_t{ + boost::uint32_t stream_id; + time_spec_t time_spec; + bool has_stream_id; + bool has_time_spec; + bool start_of_burst; + bool end_of_burst; + + //default constructor + tx_metadata_t(void); + }; + +} //namespace uhd + +#endif /* INCLUDED_UHD_TYPES_METADATA_HPP */ diff --git a/host/include/uhd/types/ranges.hpp b/host/include/uhd/types/ranges.hpp new file mode 100644 index 000000000..a2057d1c8 --- /dev/null +++ b/host/include/uhd/types/ranges.hpp @@ -0,0 +1,46 @@ +// +// Copyright 2010 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_RANGES_HPP +#define INCLUDED_UHD_TYPES_RANGES_HPP + +#include <uhd/config.hpp> + +namespace uhd{ + + /*! + * The gain range struct describes possible gain settings. + * The mimumum gain, maximum gain, and step size are in dB. + */ + struct UHD_API gain_range_t{ + float min, max, step; + gain_range_t(float min = 0.0, float max = 0.0, float step = 0.0); + }; + + /*! + * The frequency range struct describes possible frequency settings. + * Because tuning is very granular (sub-Hz), step size is not listed. + * The mimumum frequency and maximum frequency are in Hz. + */ + struct UHD_API freq_range_t{ + double min, max; + freq_range_t(double min = 0.0, double max = 0.0); + }; + +} //namespace uhd + +#endif /* INCLUDED_UHD_TYPES_RANGES_HPP */ diff --git a/host/include/uhd/types/stream_cmd.hpp b/host/include/uhd/types/stream_cmd.hpp new file mode 100644 index 000000000..97a6b73ce --- /dev/null +++ b/host/include/uhd/types/stream_cmd.hpp @@ -0,0 +1,56 @@ +// +// Copyright 2010 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_STREAM_CMD_HPP +#define INCLUDED_UHD_TYPES_STREAM_CMD_HPP + +#include <uhd/config.hpp> +#include <uhd/types/time_spec.hpp> + +namespace uhd{ + + /*! + * Command struct for configuration and control of streaming: + * + * A stream command defines how the device sends samples to the host. + * Streaming is controlled by submitting a stream command to the rx dsp. + * Granular control over what the device streams to the host can be + * achieved through submission of multiple (carefully-crafted) commands. + * + * The stream_now parameter controls when the stream begins. + * When true, the device will begin streaming ASAP. When false, + * the device will begin streaming at a time specified by time_spec. + * + * The continuous parameter controls the number of samples received. + * When true, the device continues streaming indefinitely. When false, + * the device will stream the number of samples specified by num_samps. + * + * Standard usage case: + * To start continuous streaming, set stream_now to true and continuous to true. + * To end continuous streaming, set stream_now to true and continuous to false. + */ + struct UHD_API stream_cmd_t{ + bool stream_now; + time_spec_t time_spec; + bool continuous; + size_t num_samps; + stream_cmd_t(void); + }; + +} //namespace uhd + +#endif /* INCLUDED_UHD_TYPES_STREAM_CMD_HPP */ diff --git a/host/include/uhd/time_spec.hpp b/host/include/uhd/types/time_spec.hpp index e863746ba..8c8f2bc25 100644 --- a/host/include/uhd/time_spec.hpp +++ b/host/include/uhd/types/time_spec.hpp @@ -15,8 +15,8 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#ifndef INCLUDED_UHD_TIME_SPEC_HPP -#define INCLUDED_UHD_TIME_SPEC_HPP +#ifndef INCLUDED_UHD_TYPES_TIME_SPEC_HPP +#define INCLUDED_UHD_TYPES_TIME_SPEC_HPP #include <uhd/config.hpp> #include <boost/cstdint.hpp> @@ -52,4 +52,4 @@ namespace uhd{ } //namespace uhd -#endif /* INCLUDED_UHD_TIME_SPEC_HPP */ +#endif /* INCLUDED_UHD_TYPES_TIME_SPEC_HPP */ diff --git a/host/include/uhd/types/tune_result.hpp b/host/include/uhd/types/tune_result.hpp new file mode 100644 index 000000000..31742e1af --- /dev/null +++ b/host/include/uhd/types/tune_result.hpp @@ -0,0 +1,44 @@ +// +// Copyright 2010 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_TUNE_RESULT_HPP +#define INCLUDED_UHD_TYPES_TUNE_RESULT_HPP + +#include <uhd/config.hpp> + +namespace uhd{ + + /*! + * The tune result struct holds result of a 2-phase tuning: + * The struct hold the result of tuning the dboard as + * the target and actual intermediate frequency. + * The struct hold the result of tuning the DDC/DUC as + * the target and actual digital converter frequency. + * It also tell us weather or not the spectrum is inverted. + */ + struct UHD_API tune_result_t{ + double target_inter_freq; + double actual_inter_freq; + double target_dxc_freq; + double actual_dxc_freq; + bool spectrum_inverted; + tune_result_t(void); + }; + +} //namespace uhd + +#endif /* INCLUDED_UHD_TYPES_TUNE_RESULT_HPP */ |