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

Provides access to Qwerk's analog inputs.

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

Sample usage:

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

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

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

Initializes a new instance of the Qwerk.AnalogIn class.

GetInput ( int input ) : short

Get state of the specified analog 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 ( ) : short[]

Get state of all available analog inputs.

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

AnalogIn() публичный Метод

Initializes a new instance of the Qwerk.AnalogIn 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 AnalogIn ( 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 analog 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 ) : short
input int Analog input to get state of, [0, ).
Результат short

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

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