Skip to content

Moniker based streaming for NI Drivers

Rohan Doshi edited this page Jan 3, 2025 · 3 revisions

Moniker based streaming provides support for streaming data to and from grpc-device server. This type of streaming helps achieve higher throughput compared to traditional read/write loops using memory optimizations on the server side.

Supported APIs

As of 2.10.0 release of grpc-device some of the APIs for NI DAQMx and FPGA support moniker based streaming functionality. Most of the Read and Write APIs support moniker based streaming. All moniker based streaming APIs have same name as corresponding C/gRPC API with Begin prefix.

Here are a few examples of moniker based streaming APIs:

DAQmx:

  • BeginReadBinaryU16
  • BeginWriteAnalogF64
  • BeginReadPowerBinaryI16
  • ...

FPGA:

  • BeginReadArrayI64
  • BeginWriteArrayI8
  • BeginReadI32
  • ...

To identify APIs that support this type of streaming examine .proto file for corresponding driver and look for APIs with Begin prefix.

Types of streaming:

Moniker based streaming supports two types of streaming.

Streaming using gRPC streams

data_moniker.proto exposes following APIs that use gRPC streams for streaming the data.

  • StreamRead
  • StreamWrite
  • StreamReadWrite

Streaming using sideband mechanism

data_moniker.proto exposes BeginSidebandStream API to stream data using custom sideband streaming mechanism. This mechanism helps achieve even higher throughput by streaming data over raw sockets between server and client.

Note

Sideband mechanism for streaming uses raw unsecured sockets for streaming data between client and server. This is done in order to achieve higher throughput, but also exposes data to potential intruders on the network. For this reason sideband streaming is OFF by default. Make sure you enable and use sideband streaming only under limited trusted network setup.

Limitations

As of now Write type of streaming APIs do not return any response.

Enabling streaming functionality

As of 2.10.0 release, both types of moniker based streaming functionality is behind a feature toggle. To enable moniker based streaming add following lines to server_config.json.

"feature_toggles": {
  "moniker_streaming": true
}

To enable sideband based streaming, add following lines to server_config.json.

"feature_toggles": {
  "moniker_streaming": true,
  "moniker_streaming_sideband_support": true
}

Examples

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

Getting started with moniker based streaming
C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally