The LayGO Hardware Interface (HWI) is a special implementation of the LayGO API designed for applications which require near real-time access to the communications hardware. The standard LayGO API creates a multiprotocol stack which normally operates in the background to move data between the application and the communications hardware. Because the stack operates in the background, there is some delay between:
The amount of delay depends on the granularity of task scheduling in the operating system and other factors usually beyond the control of the application, However, the delay can be on the order of 10s of milliseconds. These delays can create problems for applications which must operate under real-time constraints. The LayGO HWI module is designed to minimize these delays.
By using the LayGO HWI module, the application eliminates background processing in the protocol stack. Instead, it is allowed to read data directly from the driver's receive queue and write data directly into the driver's transmit queue. This means that data received is available to be read by the application as soon as it is completely received into the host's memory. It also means that if the transmitter is not already active, data written by the application begins to be transmitted immediately.
Although some restrictions apply, building applications with the LayGO Hardware Interface requires little or no code change in most cases. Conversion can be as simple as linking with a different library. The semantics of the LayGO API is completely unchanged.