From 99c2730bc9db270560671f2d7d173768465ed51f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 31 Oct 2016 14:30:52 -0700 Subject: Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types) - Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be , but not all of our compilers support that). --- host/lib/usrp_clock/octoclock/octoclock_impl.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'host/lib/usrp_clock/octoclock/octoclock_impl.cpp') diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp index 297983c15..4da9db19f 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -111,7 +111,7 @@ device_addrs_t octoclock_find(const device_addr_t &hint){ octoclock_packet_t pkt_out; pkt_out.proto_ver = OCTOCLOCK_FW_COMPAT_NUM; // To avoid replicating sequence numbers between sessions - pkt_out.sequence = boost::uint32_t(std::rand()); + pkt_out.sequence = uint32_t(std::rand()); pkt_out.len = 0; pkt_out.code = OCTOCLOCK_QUERY_CMD; try{ @@ -124,7 +124,7 @@ device_addrs_t octoclock_find(const device_addr_t &hint){ UHD_MSG(error) << "OctoClock network discovery unknown error" << std::endl; } - boost::uint8_t octoclock_data[udp_simple::mtu]; + uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast(octoclock_data); while(true){ @@ -191,7 +191,7 @@ octoclock_impl::octoclock_impl(const device_addr_t &_device_addr){ _type = device::CLOCK; device_addrs_t device_args = separate_device_addr(_device_addr); // To avoid replicating sequence numbers between sessions - _sequence = boost::uint32_t(std::rand()); + _sequence = uint32_t(std::rand()); //////////////////////////////////////////////////////////////////// // Initialize the property tree @@ -248,7 +248,7 @@ octoclock_impl::octoclock_impl(const device_addr_t &_device_addr){ //////////////////////////////////////////////////////////////////// // Initialize non-GPSDO sensors //////////////////////////////////////////////////////////////////// - _tree->create(oc_path / "time") + _tree->create(oc_path / "time") .set_publisher(boost::bind(&octoclock_impl::_get_time, this, oc)); _tree->create(oc_path / "sensors/ext_ref_detected") .set_publisher(boost::bind(&octoclock_impl::_ext_ref_detected, this, oc)); @@ -330,13 +330,13 @@ void octoclock_impl::_set_eeprom(const std::string &oc, const octoclock_eeprom_t _oc_dict[oc].eeprom.commit(); } -boost::uint32_t octoclock_impl::_get_fw_version(const std::string &oc){ +uint32_t octoclock_impl::_get_fw_version(const std::string &oc){ octoclock_packet_t pkt_out; - pkt_out.sequence = uhd::htonx(++_sequence); + pkt_out.sequence = uhd::htonx(++_sequence); pkt_out.len = 0; size_t len; - boost::uint8_t octoclock_data[udp_simple::mtu]; + uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast(octoclock_data); UHD_OCTOCLOCK_SEND_AND_RECV(_oc_dict[oc].ctrl_xport, OCTOCLOCK_FW_COMPAT_NUM, OCTOCLOCK_QUERY_CMD, pkt_out, len, octoclock_data); @@ -348,11 +348,11 @@ boost::uint32_t octoclock_impl::_get_fw_version(const std::string &oc){ void octoclock_impl::_get_state(const std::string &oc){ octoclock_packet_t pkt_out; - pkt_out.sequence = uhd::htonx(++_sequence); + pkt_out.sequence = uhd::htonx(++_sequence); pkt_out.len = 0; size_t len = 0; - boost::uint8_t octoclock_data[udp_simple::mtu]; + uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast(octoclock_data); UHD_OCTOCLOCK_SEND_AND_RECV(_oc_dict[oc].ctrl_xport, _proto_ver, SEND_STATE_CMD, pkt_out, len, octoclock_data); @@ -408,10 +408,10 @@ sensor_value_t octoclock_impl::_switch_pos(const std::string &oc){ return sensor_value_t("Switch position", _switch_pos_strings[switch_pos_t(_oc_dict[oc].state.switch_pos)], ""); } -boost::uint32_t octoclock_impl::_get_time(const std::string &oc){ +uint32_t octoclock_impl::_get_time(const std::string &oc){ if(_oc_dict[oc].state.gps_detected){ std::string time_str = _oc_dict[oc].gps->get_sensor("gps_time").value; - return boost::lexical_cast(time_str); + return boost::lexical_cast(time_str); } else throw uhd::runtime_error("This device cannot return a time."); } -- cgit v1.2.3