PC Communication Driver
The Link Layer
•
Computes/verifies the CRC.
•
Performs DLE insertion/deletion.
•
Appends/strips headers and footers.
•
Traps link level errors (i.e. bad CRC).
•
Runs the receive polling loop that contains the logic for recognizing packet delimiters.
The Physical Layer
•
Hides the operating system AFX functions from the link layer.
•
Traps physical errors (i.e., parity/framing errors, timeout errors).
In general, commands are handed down from layer to layer until they reach the physical layer, while errors
are bubbled back up to the API layer.
3.2 For the Programmer - Getting Started Quickly
3.2.1 How Do I Use This Driver?
This section contains instructions for getting started if you want to use this driver in your project.
•
Copy the following files into your project directory: Elnapi.h, Elnlink.h, Elnphys.h,
Commbase.h, Elndrv.lib.
•
Add Elnapi.lib as a dependency for your project.
16
The Comm Driver DLL
CommAPI
CommLink
CommPhysical
RS232 Communications Reference Manual
CommAFX
functions
(reside in OS)
8/99