C# Class 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( );
显示文件 Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Methods

Method Description
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.

Method Details

DigitalIn() public method

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() public method

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, ).
return bool

GetInputs() public method

Get state of all available digital inputs.
Connestion to Qwerk is lost.
public GetInputs ( ) : bool[]
return bool[]