AForge.Robotics.TeRK.Qwerk.DigitalIn.GetInput C# (CSharp) Метод

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
            public bool GetInput( int input )
            {
                if ( ( input < 0 ) || ( input >= Count ) )
                {
                    throw new ArgumentOutOfRangeException( "Invalid input is specified." );
                } 
                
                return GetInputs( )[input];
            }