NI DAQMX Getting And Setting Attributes - ni/grpc-device GitHub Wiki
Unlike the C API, the DAQmx gRPC API only supports generic functions for getting and setting attributes. You can see a sample of getting an attribute in this Python example that uses GetTaskAttributeUInt32()
, and a sample of setting an attribute in this Python example that uses SetTimingAttributeString()
.
The DAQmx gRPC API only allows accessing attributes defined in the proto file for the given category and datatype. This behavior can be overridden by adding "feature_toggles": { "nidaqmx.allow_undefined_attributes": true }
to the server configuration file. This can be used to access attributes added in a later version. CAUTION: when allow_undefined_attributes
is enabled, the client can request attributes for the incorrect datatype. The implementation of this is undefined behavior in the server's C API implementation. Only use this toggle when you can ensure that clients only access attributes by the correct datatype.