C# Класс AForge.Robotics.TeRK.Qwerk.DigitalIn

Provides access to Qwerk's digital inputs.

The class allows to retrieve state of Qwerk's digital inputs. The total number of available digital inputs equals to DigitalIn.Count.

Sample usage:

// get Qwerk's digital inputs service Qwerk.DigitalIn digitalIns = qwerk.GetDigitalInService( ); // get state of 0th input bool input0 = digitalIns.GetInput( 0 ); // get state of all inputs bool[] inputs = digitalIns.GetInputs( );
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DigitalIn ( AForge.Robotics.TeRK.Qwerk qwerk )

Initializes a new instance of the Qwerk.DigitalIn class.

GetInput ( int input ) : bool

Get state of the specified digital input.

In the case if multiply inputs should be queried, it is much preferred to use GetInputs method, which retrieves state of all inputs at once.

GetInputs ( ) : bool[]

Get state of all available digital inputs.

Описание методов

DigitalIn() публичный метод

Initializes a new instance of the Qwerk.DigitalIn class.
The passed reference to object is not connected to /// Qwerk board. Failed connecting to the requested service. Failed accessing to the requested service.
public DigitalIn ( AForge.Robotics.TeRK.Qwerk qwerk )
qwerk AForge.Robotics.TeRK.Qwerk Reference to object, which is connected to Qwerk board.

GetInput() публичный метод

Get state of the specified digital input.

In the case if multiply inputs should be queried, it is much preferred to use GetInputs method, which retrieves state of all inputs at once.

Invalid input is specified. Connestion to Qwerk is lost.
public GetInput ( int input ) : bool
input int Digital input to get state of, [0, ).
Результат bool

GetInputs() публичный метод

Get state of all available digital inputs.
Connestion to Qwerk is lost.
public GetInputs ( ) : bool[]
Результат bool[]