ni / grpc-device

gRPC server providing remote access to NI device driver APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NI gRPC Device Server doesn't support unregistering DAQmx events

bkeryan opened this issue · comments

The NI gRPC Device Server uses server streaming to return a response for each event generated by DAQmx. However, it doesn't yet support unregistering DAQmx events.

Closing the event stream does not unregister the event with DAQmx. DAQmx continues to generate events, and the NI gRPC Device Server ignores the events.

DAQmx only allows registering or unregistering events when the task is not running, so closing the event stream would not be an appropriate way to unregister the event with DAQmx:

  • If you unregister the event at the wrong time, DAQmx returns an event unregistration error and continues to generate events.
  • The server would not be able to report unregistration errors with the stream closed.

Addressing this is required to fix nidaqmx-python bug AB#2395984: "GrpcStubInterpreter does not unregister events with DAQmx". We will have the same problem when supporting gRPC in other versions of the DAQmx API.

AB#2396359