aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp_clock/octoclock/octoclock_uart.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-01-23 10:32:59 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-04 08:53:01 -0600
commit22db12c4b2b55225801ec1efb2465c7a06295b9e (patch)
treecc60264fffe91465df9c6cbe764bf60931934a56 /host/lib/usrp_clock/octoclock/octoclock_uart.hpp
parentdefcb174ebb274d4621a2b958a78ed6cb6cd6aed (diff)
downloaduhd-22db12c4b2b55225801ec1efb2465c7a06295b9e.tar.gz
uhd-22db12c4b2b55225801ec1efb2465c7a06295b9e.tar.bz2
uhd-22db12c4b2b55225801ec1efb2465c7a06295b9e.zip
octoclock: Apply clang-format
Diffstat (limited to 'host/lib/usrp_clock/octoclock/octoclock_uart.hpp')
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_uart.hpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/host/lib/usrp_clock/octoclock/octoclock_uart.hpp b/host/lib/usrp_clock/octoclock/octoclock_uart.hpp
index cb0f58591..02fcf25e3 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_uart.hpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_uart.hpp
@@ -8,23 +8,26 @@
#ifndef INCLUDED_OCTOCLOCK_UART_HPP
#define INCLUDED_OCTOCLOCK_UART_HPP
-#include <vector>
-
+#include "common.h"
#include <uhd/transport/udp_simple.hpp>
#include <uhd/types/serial.hpp>
+#include <boost/thread.hpp>
+#include <string>
+#include <vector>
/*!
* The OctoClock doesn't take UART input per se but reads a specific
* packet type and sends the string from there through its own serial
* functions.
*/
-namespace uhd{
-class octoclock_uart_iface : public uhd::uart_iface{
+namespace uhd {
+class octoclock_uart_iface : public uhd::uart_iface
+{
public:
octoclock_uart_iface(uhd::transport::udp_simple::sptr udp, uint32_t proto_ver);
- ~octoclock_uart_iface(void) {};
+ ~octoclock_uart_iface(void){};
- void write_uart(const std::string &buf);
+ void write_uart(const std::string& buf);
std::string read_uart(double timeout);
private:
@@ -36,15 +39,16 @@ private:
std::vector<uint8_t> _cache;
std::string _rxbuff;
uint32_t _sequence;
- uint32_t _proto_ver;
+ uint32_t _proto_ver;
boost::system_time _last_cache_update;
void _update_cache();
char _getchar();
};
-uart_iface::sptr octoclock_make_uart_iface(uhd::transport::udp_simple::sptr udp, uint32_t proto_ver);
+uart_iface::sptr octoclock_make_uart_iface(
+ uhd::transport::udp_simple::sptr udp, uint32_t proto_ver);
-}
+} // namespace uhd
#endif /* INCLUDED_OCTOCLOCK_UART_HPP */