18 #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H
19 #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H
21 #include <boost/smart_ptr.hpp>
22 #include <boost/noncopyable.hpp>
27 namespace uhd {
namespace niusrprio
45 static const uint32_t GET32 = 0x00000001;
46 static const uint32_t SET32 = 0x00000002;
47 static const uint32_t SET_DRIVER_CONFIG = 0x00000007;
48 static const uint32_t FIFO = 0x00000008;
49 static const uint32_t IO = 0x0000000A;
50 static const uint32_t FIFO_STOP_ALL = 0x0000000C;
51 static const uint32_t ADD_RESOURCE = 0x0000000D;
52 static const uint32_t GET_STRING = 0x0000000E;
53 static const uint32_t SET_STRING = 0x0000000F;
54 static const uint32_t DOWNLOAD = 0x00000013;
55 static const uint32_t RESET = 0x00000014;
66 static const uint32_t CONFIGURE = 0x80000001;
67 static const uint32_t START = 0x80000002;
68 static const uint32_t STOP = 0x80000003;
69 static const uint32_t READ = 0x80000004;
70 static const uint32_t WRITE = 0x80000005;
71 static const uint32_t WAIT = 0x80000006;
72 static const uint32_t GRANT = 0x80000007;
77 static const uint32_t POKE64 = 0xA0000005;
78 static const uint32_t POKE32 = 0xA0000006;
79 static const uint32_t POKE16 = 0xA0000007;
80 static const uint32_t POKE8 = 0xA0000008;
81 static const uint32_t PEEK64 = 0xA0000009;
82 static const uint32_t PEEK32 = 0xA000000A;
83 static const uint32_t PEEK16 = 0xA000000B;
84 static const uint32_t PEEK8 = 0xA000000C;
85 static const uint32_t READ_BLOCK = 0xA000000D;
86 static const uint32_t WRITE_BLOCK = 0xA000000E;
87 static const uint32_t GET_IO_WINDOW = 0xA000000F;
88 static const uint32_t GET_IO_WINDOW_SIZE = 0xA0000010;
125 } reserved_field_0_0;
130 } reserved_field_0_1;
134 } reserved_field_0_2;
149 uint32_t baseAddress;
150 uint32_t depthInSamples;
229 } memoryMappedIoWindow;
309 uint32_t numberRemaining;
336 uint64_t _64BitField;
337 } memoryMappedIoWindow;
341 } memoryMappedIoWindowSize;
359 uint64_t _64BitField;
375 virtual nirio_status open(
const std::string& interface_path);
376 virtual void close(
void);
387 uint32_t& maintenance,
393 uint32_t& attrValue);
397 const uint32_t value);
399 virtual nirio_status peek(uint32_t offset, uint32_t& value);
401 virtual nirio_status peek(uint32_t offset, uint64_t& value);
403 virtual nirio_status poke(uint32_t offset,
const uint32_t& value);
405 virtual nirio_status poke(uint32_t offset,
const uint64_t& value);
408 uint32_t fifo_instance,
429 uint32_t requested_depth,
430 uint8_t requires_actuals,
431 uint32_t& actual_depth,
432 uint32_t& actual_size);
436 uint32_t elements_requested,
437 uint32_t scalar_type,
442 uint32_t& elements_acquired,
443 uint32_t& elements_remaining);
447 uint32_t elements_to_grant);
451 uint32_t elements_to_read,
453 uint32_t buffer_datatype_width,
454 uint32_t scalar_type,
457 uint32_t& number_read,
458 uint32_t& number_remaining);
462 uint32_t elements_to_write,
464 uint32_t buffer_datatype_width,
465 uint32_t scalar_type,
468 uint32_t& number_remaining);
472 virtual void _close();
476 const void *writeBuffer,
477 size_t writeBufferLength,
479 size_t readBufferLength);