An empty boolean array.
Namespace:
Quanser.Hardware
Assembly:
Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared ReadOnly Property NoBooleanBuffer As SByte() |
C# |
---|
public static sbyte[] NoBooleanBuffer { get; } |
Visual C++ |
---|
public:
static property array<signed char>^ NoBooleanBuffer {
array<signed char>^ get ();
} |
JavaScript |
---|
Quanser.Hardware.Hil.get_noBooleanBuffer = function();
|
Field Value
An empty buffer for digital states.
Remarks
Examples
This sample illustrates how to use the
NoBooleanBuffer member. It reads analog channels 0-3
and encoder channels 1-2 in a single
Read(array<Int32>[]()[], array<Int32>[]()[], array<Int32>[]()[], array<Int32>[]()[], array<Double>[]()[], array<Int32>[]()[], array<SByte>[]()[], array<Double>[]()[]) call. The digital channel array and
other channel array are set to
Hil.NoChannel since these channels are not used. In C#
and C++, the
nullptr may be used as well. Likewise, the boolean digital buffer is
set to
NoBooleanBuffer and the real-valued other buffer is set to
NoDoubleBuffer.
C# | Copy Code |
---|
int [] analogChannels = { 0, 1, 2, 3 };
int [] encoderChannels = { 1, 2 };
double [] analogBuffer = new double [analogChannels.Length];
int [] encoderBuffer = new int [encoderChannels.Length];
board.Read(analogChannels, encoderChannels, Hil.NoChannels, Hil.NoChannels,
analogBuffer, encoderBuffer, Hil.NoBooleanBuffer, Hil.NoDoubleBuffer);
|
Visual Basic | Copy Code |
---|
Dim analogChannels() As Integer = {0, 1, 2, 3}
Dim encoderChannels() As Integer = {1, 2}
Dim analogBuffer(analogChannels.Length - 1) As Double
Dim encoderBuffer(encoderChannels.Length - 1) As Integer
board.Read(analogChannels, encoderChannels, Hil.NoChannels, Hil.NoChannels, _
analogBuffer, encoderBuffer, Hil.NoBooleanBuffer, Hil.NoDoubleBuffer);
|
Visual C++ | Copy Code |
---|
array<int>^ analogChannels = { 0, 1, 2, 3 };
array<int>^ encoderChannels = { 1, 2 };
array<double>^ analogBuffer = gcnew array<double>(analogChannels->Length);
array<int>^ encoderBuffer = gcnew array<int>(encoderChannels->Length);
board->Read(analogChannels, encoderChannels, Hil::NoChannels, Hil::NoChannels,
analogBuffer, encoderBuffer, Hil::NoBooleanBuffer, Hil::NoDoubleBuffer);
|
See Also