aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp_clock/octoclock/octoclock_uart.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/usrp_clock/octoclock/octoclock_uart.cpp
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
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 <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/lib/usrp_clock/octoclock/octoclock_uart.cpp')
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_uart.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp
index 0b5b840d3..0def2fdba 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp
@@ -21,7 +21,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/format.hpp>
#include <boost/thread/thread.hpp>
@@ -48,15 +48,15 @@ namespace uhd{
_device_state.pos = 0;
_proto_ver = proto_ver;
// To avoid replicating sequence numbers between sessions
- _sequence = boost::uint32_t(std::rand());
+ _sequence = uint32_t(std::rand());
size_t len = 0;
//Get pool size from device
octoclock_packet_t pkt_out;
- pkt_out.sequence = uhd::htonx<boost::uint32_t>(_sequence);
+ pkt_out.sequence = uhd::htonx<uint32_t>(_sequence);
pkt_out.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_packet_t*>(octoclock_data);
UHD_OCTOCLOCK_SEND_AND_RECV(_udp, _proto_ver, SEND_POOLSIZE_CMD, pkt_out, len, octoclock_data);
@@ -71,11 +71,11 @@ namespace uhd{
size_t len = 0;
octoclock_packet_t pkt_out;
- pkt_out.sequence = uhd::htonx<boost::uint32_t>(++_sequence);
+ pkt_out.sequence = uhd::htonx<uint32_t>(++_sequence);
pkt_out.len = buf.size();
memcpy(pkt_out.data, buf.c_str(), buf.size());
- boost::uint8_t octoclock_data[udp_simple::mtu];
+ uint8_t octoclock_data[udp_simple::mtu];
const octoclock_packet_t *pkt_in = reinterpret_cast<octoclock_packet_t*>(octoclock_data);
UHD_OCTOCLOCK_SEND_AND_RECV(_udp, _proto_ver, HOST_SEND_TO_GPSDO_CMD, pkt_out, len, octoclock_data);
@@ -116,7 +116,7 @@ namespace uhd{
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_packet_t*>(octoclock_data);
if(STATES_EQUAL){
@@ -124,7 +124,7 @@ namespace uhd{
boost::posix_time::time_duration age = time - _last_cache_update;
bool cache_expired = (age > boost::posix_time::seconds(MAX_CACHE_AGE));
- pkt_out.sequence = uhd::htonx<boost::uint32_t>(++_sequence);
+ pkt_out.sequence = uhd::htonx<uint32_t>(++_sequence);
UHD_OCTOCLOCK_SEND_AND_RECV(_udp, _proto_ver, SEND_GPSDO_CACHE_CMD, pkt_out, len, octoclock_data);
if(UHD_OCTOCLOCK_PACKET_MATCHES(SEND_GPSDO_CACHE_ACK, pkt_out, pkt_in, len)){
memcpy(&_cache[0], pkt_in->data, _poolsize);
@@ -132,7 +132,7 @@ namespace uhd{
_last_cache_update = time;
}
- boost::uint8_t delta_wraps = (_device_state.num_wraps - _state.num_wraps);
+ uint8_t delta_wraps = (_device_state.num_wraps - _state.num_wraps);
if(cache_expired or delta_wraps > 1 or
((delta_wraps == 1) and (_device_state.pos > _state.pos))){