From 0eb760f4db92dc0a97ea4924fa044e7a48820a54 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 19 Aug 2019 12:17:50 -0700 Subject: niusrpio: Apply formatting --- .../uhd/transport/nirio/niusrprio_session.h | 75 ++++++++++------------ 1 file changed, 35 insertions(+), 40 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/transport/nirio/niusrprio_session.h b/host/include/uhd/transport/nirio/niusrprio_session.h index f6f0d78a1..41f05aec0 100644 --- a/host/include/uhd/transport/nirio/niusrprio_session.h +++ b/host/include/uhd/transport/nirio/niusrprio_session.h @@ -9,12 +9,12 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIUSRPRIO_SESSION_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIUSRPRIO_SESSION_H -#include -#include -#include -#include #include +#include +#include +#include #include +#include #include #include #include @@ -29,68 +29,63 @@ public: typedef uhd::usrprio_rpc::usrprio_device_info_vtr device_info_vtr; static nirio_status enumerate( - const std::string& rpc_port_name, - device_info_vtr& device_info_vtr); + const std::string& rpc_port_name, device_info_vtr& device_info_vtr); - niusrprio_session( - const std::string& resource_name, - const std::string& port_name); + niusrprio_session(const std::string& resource_name, const std::string& port_name); virtual ~niusrprio_session(); - nirio_status open( - nifpga_lvbitx::sptr lvbitx, - bool force_download = false); + nirio_status open(nifpga_lvbitx::sptr lvbitx, bool force_download = false); void close(bool skip_reset = false); nirio_status reset(); - template + template nirio_status create_tx_fifo( - const char* fifo_name, - boost::shared_ptr< nirio_fifo >& fifo) + const char* fifo_name, boost::shared_ptr>& fifo) { - if (!_session_open) return NiRio_Status_ResourceNotInitialized; + if (!_session_open) + return NiRio_Status_ResourceNotInitialized; return _resource_manager.create_tx_fifo(fifo_name, fifo); } - template + template nirio_status create_tx_fifo( - uint32_t fifo_instance, - boost::shared_ptr< nirio_fifo >& fifo) + uint32_t fifo_instance, boost::shared_ptr>& fifo) { - if ((size_t)fifo_instance >= _lvbitx->get_output_fifo_count()) return NiRio_Status_InvalidParameter; + if ((size_t)fifo_instance >= _lvbitx->get_output_fifo_count()) + return NiRio_Status_InvalidParameter; return create_tx_fifo(_lvbitx->get_output_fifo_names()[fifo_instance], fifo); } - template + template nirio_status create_rx_fifo( - const char* fifo_name, - boost::shared_ptr< nirio_fifo >& fifo) + const char* fifo_name, boost::shared_ptr>& fifo) { - if (!_session_open) return NiRio_Status_ResourceNotInitialized; + if (!_session_open) + return NiRio_Status_ResourceNotInitialized; return _resource_manager.create_rx_fifo(fifo_name, fifo); } - template + template nirio_status create_rx_fifo( - uint32_t fifo_instance, - boost::shared_ptr< nirio_fifo >& fifo) + uint32_t fifo_instance, boost::shared_ptr>& fifo) { - if ((size_t)fifo_instance >= _lvbitx->get_input_fifo_count()) return NiRio_Status_InvalidParameter; + if ((size_t)fifo_instance >= _lvbitx->get_input_fifo_count()) + return NiRio_Status_InvalidParameter; return create_rx_fifo(_lvbitx->get_input_fifo_names()[fifo_instance], fifo); } - UHD_INLINE niriok_proxy::sptr get_kernel_proxy() { + UHD_INLINE niriok_proxy::sptr get_kernel_proxy() + { return _riok_proxy; } nirio_status download_bitstream_to_flash(const std::string& bitstream_path); - //Static + // Static static niriok_proxy::sptr create_kernel_proxy( - const std::string& resource_name, - const std::string& rpc_port_name); + const std::string& resource_name, const std::string& rpc_port_name); private: nirio_status _verify_signature(); @@ -98,16 +93,16 @@ private: nirio_status _write_bitstream_checksum(const std::string& checksum); nirio_status _ensure_fpga_ready(); - std::string _resource_name; - nifpga_lvbitx::sptr _lvbitx; - std::string _interface_path; - bool _session_open; - niriok_proxy::sptr _riok_proxy; - nirio_resource_manager _resource_manager; + std::string _resource_name; + nifpga_lvbitx::sptr _lvbitx; + std::string _interface_path; + bool _session_open; + niriok_proxy::sptr _riok_proxy; + nirio_resource_manager _resource_manager; usrprio_rpc::usrprio_rpc_client _rpc_client; - boost::recursive_mutex _session_mutex; + boost::recursive_mutex _session_mutex; }; -}} +}} // namespace uhd::niusrprio #endif /* INCLUDED_UHD_TRANSPORT_NIRIO_NIUSRPRIO_SESSION_H */ -- cgit v1.2.3