Antilatency Hardware Extension Interface Library

Antilatency Hardware Extension Interface Library

This is a library for working with devices that supports the Antilatency Hardware Extension Interface.

How to use a library

  1. Load a library;
  2. Launch a Task with ​startTask​;
  3. Declare the operating modes of the necessary pins with:
  4. Switch the task in Run mode with ​run​;
  5. Work with the received interfaces (IInputPin, IOutputPin, etc.).

IInputPin

}

IOutputPin

}

IAnalogPin

}

IPulseCounterPin

}

IPwmPin

interface IPwmPin : InterfaceContract.IInterface {
void setDuty(​float value);
float getDuty(​);
uint getFrequency(​);
}
The higher frequency the more grades duty will have. Here is the list of the recommended frequencies:
To find out the actual frequency and duty, use getFrequency and getDuty.
Before the task enters Run state, all methods of these interfaces will have default values.

ICotask

interface ICotask : DeviceNetwork.ICotask {
IAnalogPin createAnalogPin(​Interop.Pins pin, uint refreshIntervalMs);
IPulseCounterPin createPulseCounterPin(​Interop.Pins pin, uint refreshIntervalMs);
IPwmPin createPwmPin(​Interop.Pins pin, uint frequency, float initialDuty);
void run(​);
}
ICotaskMethods for creating pins from an initialization table only. The table will be sent to the device via the run method.
The task is in Init​ state right after being launched. In this state only methods for creating pins work.