Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Serial Poll Status Byte in .Net (NationalInstruments.NI4882.dll)

I am using the new .NET version of the IEEE488 driver with C#. I can do a serial poll. The Device.SerialPoll() returns an enum with three possible values. C# encodes enumerations, so there is no cast to byte. There seems to be no way to get the original status byte.
0 Kudos
Message 1 of 2
(3,345 Views)
While SerialPollFlags is an enum, it is attributed with FlagsAttribute. This means that it can actually contain any value. The NI4882 .NET class library does a simple cast from the driver byte value, so it should include all of the information that the driver returned.
0 Kudos
Message 2 of 2
(3,338 Views)