19 #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_FIFO_H 20 #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_FIFO_H 26 #include <boost/noncopyable.hpp> 27 #include <boost/smart_ptr.hpp> 29 #include <boost/thread/recursive_mutex.hpp> 30 #include <boost/thread/thread.hpp> 32 namespace uhd {
namespace niusrprio {
40 template <
typename data_t>
44 typedef boost::shared_ptr< nirio_fifo<data_t> >
sptr;
49 const std::string& name,
50 uint32_t fifo_instance);
54 const size_t requested_depth,
60 inline const std::string&
get_name()
const {
return _name; }
71 const size_t elements_requested,
72 const uint32_t timeout,
73 size_t& elements_acquired,
74 size_t& elements_remaining);
80 const uint32_t num_elements,
83 uint32_t& num_remaining);
87 const uint32_t num_elements,
89 uint32_t& num_remaining);
93 nirio_status _get_transfer_count(uint64_t& transfer_count);
94 nirio_status _ensure_transfer_completed(uint32_t timeout_ms);
98 UNMAPPED, MAPPED, STARTED
103 uint32_t _fifo_channel;
106 size_t _acquired_pending;
108 boost::recursive_mutex _mutex;
111 uint64_t _expected_xfer_count;
112 uint32_t _dma_base_addr;
114 static const uint32_t FIFO_LOCK_TIMEOUT_IN_MS = 5000;
boost::shared_ptr< niriok_proxy > sptr
Definition: niriok_proxy.h:168
Definition: nirio_fifo.h:34
const std::string & get_name() const
Definition: nirio_fifo.h:60
uint32_t get_scalar_type() const
Definition: nirio_fifo.h:63
nirio_scalar_type_t
Definition: niriok_proxy.h:81
virtual ~nirio_fifo()
Definition: nirio_fifo.h:51
Definition: convert.hpp:28
uint32_t get_channel() const
Definition: nirio_fifo.h:61
Definition: nirio_driver_iface.h:130
int32_t nirio_status
Definition: status.h:31
uint32_t width
Definition: nirio_fifo.h:37
uint32_t get_direction() const
Definition: nirio_fifo.h:62
datatype_info_t(nirio_scalar_type_t t, uint32_t w)
Definition: nirio_fifo.h:35
fifo_direction_t
Definition: niriok_proxy.h:108
nirio_scalar_type_t scalar_type
Definition: nirio_fifo.h:36
Definition: nirio_fifo.h:41
boost::shared_ptr< nirio_fifo< data_t > > sptr
Definition: nirio_fifo.h:44