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( );
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
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[]