18 #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H 19 #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H 21 #include <boost/smart_ptr.hpp> 22 #include <boost/noncopyable.hpp> 28 typedef uint64_t
tAlignedU64 __attribute__ ((aligned(8)));
33 namespace uhd {
namespace niusrprio
42 #define IOCTL(type, function, access) \ 43 CTL_CODE((0x8000+type), (0x800+function), METHOD_BUFFERED, access) 45 #define IOCTL_ACCESS_ANY (FILE_ANY_ACCESS) 46 #define IOCTL_ACCESS_READ (FILE_READ_ACCESS) 47 #define IOCTL_ACCESS_WRITE (FILE_WRITE_ACCESS) 48 #define IOCTL_ACCESS_RW (FILE_READ_ACCESS | FILE_WRITE_ACCESS) 50 #define IOCTL_TRANSPORT_GET32 IOCTL(0, 0, IOCTL_ACCESS_READ) 51 #define IOCTL_TRANSPORT_SET32 IOCTL(0, 1, IOCTL_ACCESS_WRITE) 52 #define IOCTL_TRANSPORT_GET_STRING IOCTL(0, 2, IOCTL_ACCESS_READ) 53 #define IOCTL_TRANSPORT_SET_STRING IOCTL(0, 3, IOCTL_ACCESS_WRITE) 54 #define IOCTL_TRANSPORT_RESET IOCTL(1, 1, IOCTL_ACCESS_WRITE) 55 #define IOCTL_TRANSPORT_ADD_INPUT_FIFO_RESOURCE IOCTL(2, 0, IOCTL_ACCESS_ANY) 56 #define IOCTL_TRANSPORT_ADD_OUTPUT_FIFO_RESOURCE IOCTL(2, 1, IOCTL_ACCESS_ANY) 57 #define IOCTL_TRANSPORT_SET_DEVICE_CONFIG IOCTL(2, 3, IOCTL_ACCESS_WRITE) 58 #define IOCTL_TRANSPORT_FIFO_CONFIG IOCTL(4, 0, IOCTL_ACCESS_ANY) 59 #define IOCTL_TRANSPORT_FIFO_START IOCTL(4, 1, IOCTL_ACCESS_ANY) 60 #define IOCTL_TRANSPORT_FIFO_STOP IOCTL(4, 2, IOCTL_ACCESS_ANY) 61 #define IOCTL_TRANSPORT_FIFO_READ IOCTL(4, 3, IOCTL_ACCESS_READ) 62 #define IOCTL_TRANSPORT_FIFO_WRITE IOCTL(4, 4, IOCTL_ACCESS_WRITE) 63 #define IOCTL_TRANSPORT_FIFO_WAIT IOCTL(4, 5, IOCTL_ACCESS_ANY) 64 #define IOCTL_TRANSPORT_FIFO_GRANT IOCTL(4, 6, IOCTL_ACCESS_ANY) 65 #define IOCTL_TRANSPORT_FIFO_STOP_ALL IOCTL(4, 7, IOCTL_ACCESS_ANY) 66 #define IOCTL_TRANSPORT_PEEK64 IOCTL(5, 2, IOCTL_ACCESS_READ) 67 #define IOCTL_TRANSPORT_PEEK32 IOCTL(5, 3, IOCTL_ACCESS_READ) 68 #define IOCTL_TRANSPORT_POKE64 IOCTL(5, 6, IOCTL_ACCESS_WRITE) 69 #define IOCTL_TRANSPORT_POKE32 IOCTL(5, 7, IOCTL_ACCESS_WRITE) 70 #define IOCTL_TRANSPORT_POST_OPEN IOCTL(8, 0, IOCTL_ACCESS_ANY) 71 #define IOCTL_TRANSPORT_PRE_CLOSE IOCTL(8, 1, IOCTL_ACCESS_ANY) 307 virtual nirio_status open(
const std::string& interface_path);
308 virtual void close(
void);
319 uint32_t& maintenance,
325 uint32_t& attrValue);
329 const uint32_t value);
331 virtual nirio_status peek(uint32_t offset, uint32_t& value);
333 virtual nirio_status peek(uint32_t offset, uint64_t& value);
335 virtual nirio_status poke(uint32_t offset,
const uint32_t& value);
337 virtual nirio_status poke(uint32_t offset,
const uint64_t& value);
340 uint32_t fifo_instance,
361 uint32_t requested_depth,
362 uint8_t requires_actuals,
363 uint32_t& actual_depth,
364 uint32_t& actual_size);
368 uint32_t elements_requested,
369 uint32_t scalar_type,
374 uint32_t& elements_acquired,
375 uint32_t& elements_remaining);
379 uint32_t elements_to_grant);
383 uint32_t elements_to_read,
385 uint32_t buffer_datatype_width,
386 uint32_t scalar_type,
389 uint32_t& number_read,
390 uint32_t& number_remaining);
394 uint32_t elements_to_write,
396 uint32_t buffer_datatype_width,
397 uint32_t scalar_type,
400 uint32_t& number_remaining);
404 virtual void _close();
Definition: niriok_proxy_impl_v2.h:212
Definition: niriok_proxy_impl_v2.h:256
int32_t status
Definition: niriok_proxy_impl_v2.h:288
int32_t status
Definition: niriok_proxy_impl_v2.h:84
uint32_t read
Definition: niriok_proxy_impl_v2.h:194
uint32_t offset
Definition: niriok_proxy_impl_v2.h:258
tAlignedU64 buf
Definition: niriok_proxy_impl_v2.h:201
int32_t status
Definition: niriok_proxy_impl_v2.h:104
uint32_t numberElements
Definition: niriok_proxy_impl_v2.h:187
Definition: niriok_proxy_impl_v2.h:298
int32_t status
Definition: niriok_proxy_impl_v2.h:292
Definition: niriok_proxy_impl_v2.h:114
nirio_fifo_data_type_t dataType
Definition: niriok_proxy_impl_v2.h:216
Definition: niriok_proxy_impl_v2.h:246
uint32_t retVal__
Definition: niriok_proxy_impl_v2.h:263
uint32_t channel
Definition: niriok_proxy_impl_v2.h:133
int32_t status
Definition: niriok_proxy_impl_v2.h:244
Definition: niriok_proxy_impl_v2.h:282
Definition: niriok_proxy_impl_v2.h:149
uint32_t channel
Definition: niriok_proxy_impl_v2.h:167
tAlignedU64 retVal__
Definition: niriok_proxy_impl_v2.h:253
tAlignedU64 elementsRemaining
Definition: niriok_proxy_impl_v2.h:225
int32_t nirio_i32_t
Definition: niriok_proxy.h:67
uint32_t channel
Definition: niriok_proxy_impl_v2.h:155
int32_t status
Definition: niriok_proxy_impl_v2.h:99
nirio_version_t
Definition: niriok_proxy.h:54
Definition: niriok_proxy_impl_v2.h:110
Definition: niriok_proxy_impl_v2.h:153
int32_t status
Definition: niriok_proxy_impl_v2.h:147
uint32_t value
Definition: niriok_proxy_impl_v2.h:94
int32_t status
Definition: niriok_proxy_impl_v2.h:280
tAlignedU64 actualSize
Definition: niriok_proxy_impl_v2.h:162
int32_t status
Definition: niriok_proxy_impl_v2.h:254
int32_t status
Definition: niriok_proxy_impl_v2.h:274
Definition: niriok_proxy_impl_v2.h:272
tAlignedU64 requestedDepth
Definition: niriok_proxy_impl_v2.h:156
Definition: niriok_proxy_impl_v2.h:290
Definition: niriok_proxy_impl_v2.h:170
uint32_t channel
Definition: niriok_proxy_impl_v2.h:185
uint32_t nirio_u32_t
Definition: niriok_proxy.h:64
int32_t status
Definition: niriok_proxy_impl_v2.h:226
Definition: niriok_proxy_impl_v2.h:73
uint32_t offset
Definition: niriok_proxy_impl_v2.h:248
Definition: niriok_proxy.h:113
int32_t status
Definition: niriok_proxy_impl_v2.h:138
uint32_t baseAddress
Definition: niriok_proxy_impl_v2.h:134
Definition: niriok_proxy_impl_v2.h:106
int32_t status
Definition: niriok_proxy_impl_v2.h:157
Definition: niriok_proxy_impl_v2.h:238
int32_t status
Definition: niriok_proxy_impl_v2.h:190
tAlignedU64 value
Definition: niriok_proxy_impl_v2.h:269
tAlignedU64 buf
Definition: niriok_proxy_impl_v2.h:186
Definition: niriok_proxy_impl_v2.h:79
#define UHD_API
Definition: config.hpp:79
nirio_scalar_type_t
Definition: niriok_proxy.h:81
Definition: convert.hpp:28
int32_t status
Definition: niriok_proxy_impl_v2.h:205
Definition: niriok_proxy_impl_v2.h:183
uint32_t channel
Definition: niriok_proxy_impl_v2.h:176
Definition: niriok_proxy_impl_v2.h:286
Definition: niriok_proxy_impl_v2.h:174
uint32_t numberElements
Definition: niriok_proxy_impl_v2.h:202
nirio_device_attribute32_t attribute
Definition: niriok_proxy_impl_v2.h:93
Definition: niriok_proxy_impl_v2.h:221
uint32_t attribute
Definition: niriok_proxy_impl_v2.h:146
Definition: niriok_proxy_impl_v2.h:140
Definition: niriok_proxy_impl_v2.h:165
Definition: niriok_proxy_impl_v2.h:131
uint32_t timeout
Definition: niriok_proxy_impl_v2.h:218
int32_t status
Definition: niriok_proxy_impl_v2.h:116
int32_t status
Definition: niriok_proxy_impl_v2.h:172
uint32_t depthInSamples
Definition: niriok_proxy_impl_v2.h:135
int32_t status
Definition: niriok_proxy_impl_v2.h:236
Definition: nirio_driver_iface.h:130
int32_t status
Definition: niriok_proxy_impl_v2.h:270
int32_t nirio_status
Definition: status.h:31
uint32_t channel
Definition: niriok_proxy_impl_v2.h:200
Definition: niriok_proxy_impl_v2.h:242
int32_t status
Definition: niriok_proxy_impl_v2.h:284
uint32_t stringLen
Definition: niriok_proxy_impl_v2.h:103
int32_t status
Definition: niriok_proxy_impl_v2.h:240
Definition: niriok_proxy_impl_v2.h:234
Definition: niriok_proxy_impl_v2.h:101
uint32_t channel
Definition: niriok_proxy_impl_v2.h:230
nirio_i32_t integerWordLength
Definition: niriok_proxy_impl_v2.h:76
uint32_t timeout
Definition: niriok_proxy_impl_v2.h:189
uint64_t tAlignedU64
Definition: niriok_proxy_impl_v2.h:30
int32_t status
Definition: niriok_proxy_impl_v2.h:142
Definition: niriok_proxy_impl_v2.h:261
int32_t status
Definition: niriok_proxy_impl_v2.h:168
int32_t status
Definition: niriok_proxy_impl_v2.h:210
Definition: niriok_proxy.h:146
int32_t status
Definition: niriok_proxy_impl_v2.h:177
tAlignedU64 actualDepth
Definition: niriok_proxy_impl_v2.h:161
uint32_t timeout
Definition: niriok_proxy_impl_v2.h:204
uint32_t offset
Definition: niriok_proxy_impl_v2.h:268
Definition: niriok_proxy_impl_v2.h:144
Definition: niriok_proxy_impl_v2.h:276
uint32_t value
Definition: niriok_proxy_impl_v2.h:279
int32_t status
Definition: niriok_proxy_impl_v2.h:181
Definition: niriok_proxy_impl_v2.h:198
int32_t status
Definition: niriok_proxy_impl_v2.h:151
nirio_fifo_data_type_t dataType
Definition: niriok_proxy_impl_v2.h:203
int32_t status
Definition: niriok_proxy_impl_v2.h:89
tAlignedU64 elements
Definition: niriok_proxy_impl_v2.h:231
int32_t status
Definition: niriok_proxy_impl_v2.h:264
Definition: niriok_proxy_impl_v2.h:81
Definition: niriok_proxy_impl_v2.h:91
Definition: niriok_proxy_impl_v2.h:192
Definition: niriok_proxy_impl_v2.h:251
Definition: niriok_proxy_impl_v2.h:266
uint32_t version
Definition: niriok_proxy_impl_v2.h:137
nirio_u32_t bitWidth
Definition: niriok_proxy_impl_v2.h:75
int32_t status
Definition: niriok_proxy_impl_v2.h:232
int32_t status
Definition: niriok_proxy_impl_v2.h:249
Definition: niriok_proxy_impl_v2.h:228
uint32_t channel
Definition: niriok_proxy_impl_v2.h:214
tAlignedU64 elements
Definition: niriok_proxy_impl_v2.h:223
uint32_t retVal__
Definition: niriok_proxy_impl_v2.h:88
Definition: niriok_proxy_impl_v2.h:179
tAlignedU64 elementsAcquired
Definition: niriok_proxy_impl_v2.h:224
tAlignedU64 elementsRequested
Definition: niriok_proxy_impl_v2.h:215
nirio_device_attribute32_t attribute
Definition: niriok_proxy_impl_v2.h:83
int32_t status
Definition: niriok_proxy_impl_v2.h:163
int32_t status
Definition: niriok_proxy_impl_v2.h:108
int32_t status
Definition: niriok_proxy_impl_v2.h:196
uint32_t remaining
Definition: niriok_proxy_impl_v2.h:209
nirio_scalar_type_t scalarType
Definition: niriok_proxy_impl_v2.h:74
int32_t status
Definition: niriok_proxy_impl_v2.h:219
Definition: niriok_proxy_impl_v2.h:159
Definition: niriok_proxy_impl_v2.h:207
int32_t status
Definition: niriok_proxy_impl_v2.h:95
uint32_t offset
Definition: niriok_proxy_impl_v2.h:278
Definition: niriok_proxy_impl_v2.h:86
Definition: niriok_proxy_impl_v2.h:97
nirio_fifo_data_type_t dataType
Definition: niriok_proxy_impl_v2.h:188
uint32_t remaining
Definition: niriok_proxy_impl_v2.h:195
int32_t status
Definition: niriok_proxy_impl_v2.h:112
nirio_fifo_data_type_t dataType
Definition: niriok_proxy_impl_v2.h:136
nirio_device_attribute32_t
Definition: niriok_proxy.h:69
int32_t status
Definition: niriok_proxy_impl_v2.h:300
int32_t status
Definition: niriok_proxy_impl_v2.h:259
Definition: niriok_proxy_impl_v2.h:294
int32_t status
Definition: niriok_proxy_impl_v2.h:296
bool output
Definition: niriok_proxy_impl_v2.h:217