Technical information

CHAPTER 3
The PC Interface Driver
38 Configuring the PC
RSComConfig[0] contains the configuration for COM1 and RSComConfig[1] contains
the configuration for COM2. The type field specifies what type of connection to make
(either rsNULLComPort, rsModemComPort, rsPrinterComPort, rsSpoolComPort,
rsComToolBoxComPort, or rsIgnore). The value of the vRefNum parameter is the
volume reference number, dirID is the directory ID, and fileNamePtr is the pointer to
the name of the spool file.
When a PC port is connected to the null device, any output from the PC is ignored.
When a PC port is connected to the modem or printer port, the PC controls the port by
means of the UART emulation in hardware on the DOS Compatibility Card. For
example, when the PC sets the baud rate divisor in the UART emulation register, the PC
Interface driver intercepts the operation and translates the action to a control call to the
driver for the modem or printer port.
When a PC port is connected to a spool file, all output from the PC is captured and
written to the specified file. The driver opens and closes the file as needed.
The rsSetComPortConfig routine should be called at least once before the PC is
started up. It can also be called after the PC has been started; in that case, the change
in configuration takes effect immediately.
If the type field is set to reIgnore, the port’s configuration does not change.
rsSetParallelPortConfig 3
You can use the rsSetParallelPortConfig function to set the configuration of the
parallel port emulation. A pointer to an RSParallelConfig data structure is passed
in csParam.
Parameter block
ioCompletion long Pointer to the completion routine
ioResult word
ioRefNum word
csCode word Equals rsSetParallelPortConfig
csParam long Pointer to RSParallelConfig
typedef struct{
short eojTimeOut; // End of job after n seconds of no data
short vRefNum; // Volume RefNum
long spoolDirID; // RefNum for spool directory
} RSParallelConfig, *RSParallelConfigPtr;
The spoolDirID field is the ID of the directory where the spool files will be stored. The
vRefNum field contains the reference number of the volume that contains the directory.
The eojTimeOut field specifies the number of seconds the parallel port must be inactive
before the driver will force an end of job. If this field is set to 0, the driver does not force
the end of job based on time.