diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-01 16:37:25 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-01 16:37:25 -0700 |
commit | f1f4865119605c66ffece113a621308d82512d23 (patch) | |
tree | 19b707c5146931ac0799e4d8f136bb414ac04dd9 /host/lib | |
parent | 54e8b566f6d1efecfd5fdc2c14bb287fd551089e (diff) | |
download | uhd-f1f4865119605c66ffece113a621308d82512d23.tar.gz uhd-f1f4865119605c66ffece113a621308d82512d23.tar.bz2 uhd-f1f4865119605c66ffece113a621308d82512d23.zip |
hardcoded values for enum props, added clock get/set for simple usrp
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/simple_usrp.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/host/lib/usrp/simple_usrp.cpp b/host/lib/usrp/simple_usrp.cpp index 4bd47dc3f..a0551a630 100644 --- a/host/lib/usrp/simple_usrp.cpp +++ b/host/lib/usrp/simple_usrp.cpp @@ -75,7 +75,7 @@ public: } /******************************************************************* - * Timing + * Misc ******************************************************************/ void set_time_now(const time_spec_t &time_spec){ _mboard[MBOARD_PROP_TIME_NOW] = time_spec; @@ -85,13 +85,18 @@ public: _mboard[MBOARD_PROP_TIME_NEXT_PPS] = time_spec; } - /******************************************************************* - * Streaming - ******************************************************************/ void issue_stream_cmd(const stream_cmd_t &stream_cmd){ _rx_ddc[std::string("stream_cmd")] = stream_cmd; } + void set_clock_config(const clock_config_t &clock_config){ + _mboard[MBOARD_PROP_CLOCK_CONFIG] = clock_config; + } + + double get_clock_rate(void){ + return _mboard[MBOARD_PROP_CLOCK_RATE].as<double>(); + } + /******************************************************************* * RX methods ******************************************************************/ @@ -138,7 +143,7 @@ public: } std::vector<std::string> get_rx_antennas(void){ - return _rx_subdev[SUBDEV_PROP_ANTENNA_NAMES].as<std::vector<std::string> >(); + return _rx_subdev[SUBDEV_PROP_ANTENNA_NAMES].as<prop_names_t>(); } /******************************************************************* @@ -187,7 +192,7 @@ public: } std::vector<std::string> get_tx_antennas(void){ - return _tx_subdev[SUBDEV_PROP_ANTENNA_NAMES].as<std::vector<std::string> >(); + return _tx_subdev[SUBDEV_PROP_ANTENNA_NAMES].as<prop_names_t>(); } private: |