home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega CD-ROM 1
/
megacd_rom_1.zip
/
megacd_rom_1
/
DESQVIEW
/
CMONITOR.ZIP
/
CMONITOR.DOC
< prev
next >
Wrap
Text File
|
1988-12-09
|
12KB
|
257 lines
==============================================================================
CMONITOR -- CarrierMonitor Documentation Version 1.3 December 7, 1988
==============================================================================
(New material is noted in right margin) |
PURPOSE.
--------
CMONITOR is designed to work with DESQview and communications programs
such as COM-AND, RBBS and other BBS or HOST type programs that have the
capability of allowing a remote user to shell to DOS. A loss of carrier
under these conditions prevents returning from the shell and logging off
thus effectively locking up the machine. CMONITOR solves this problem.
Its operation is similar to WATCHDOG, but CMONITOR takes advantage of the
multi-tasking capability of DESQview. CMONITOR monitors the carrier on the
com port being used by the BBS. If carrier is lost, CMONITOR closes the
DESQview window in which the BBS is running and immediately re-opens the
window, thus restarting the BBS without re-booting and interrupting other
tasks in progress. WATCHDOG causes a warm boot of the computer. CMONITOR
will work with COM1, COM2, COM3 or COM4 using the standard base addresses
for these ports.
INSTALLATION.
-------------
CMONITOR must be installed. The file CMONITOR.ARC contains the following
files:
CMONITOR.COM ...... the actual carrier monitor
CMON.COM .......... the CMONITOR loader and un-loader
CM-PIF.DVP ........ the DESQview PIF for CMONITOR
CMONITOR.DOC ...... this file
CMONITOR.ASM ...... the source file less the DVAPI.INC file
CMON.ASM .......... the source file less the DVAPI.INC file
Un-arc the files and copy CM-PIF.DVP to your DESQview sub-directory. Copy
CMONITOR.COM and CMON.COM to whichever sub-directory you want. Suggest you
put then in your DV or BBS sub-directory.
With DESQview loaded open an 'Add Program' window, select 'Other', enter
your DV sub-directory and select CMONITOR from the resulting list. Then
open a 'Change Program' window and enter CM for CMONITOR. On the
'Program' line either delete the path preceding CMONITOR.COM or put in the
correct sub-directory. You will need to edit the 'Parameter' line to
correctly reflect the name and location of your PIF for your BBS program.
The second parameter is the number of the COM port being used by the BBS.
Just enter 1 for COM1 or 2 for COM2 etc. The second parameter must be
separated by one and only one space from the BBS PIF name. The 'Directory'
entry may be blanked if you included the path in the 'Program' line.
Otherwise put in the correct sub-directory for the location of
CMONITOR.COM. If you want to change the name of the CMONITOR window from
CM to something else, you may do that. Don't change any of the other
settings. Appendix A contains the screens from 'Change Program' for the
CM-PIF.DVP file.
You must also make a change to the PIF for your comm program using 'Change
Program.' On the 'Advanced Options' screen insert an asterisk at the
beginning of the 'Shared Program Pathname' field just as in the PIF for CM
in Appendix A. Your comm program and CMONITOR will run as shared
programs. You probably also have your comm program already setup to run
in background, but for CMONITOR to work the comm program must be set to
run in background. If you are using DESQview 2.2, you need to make sure
the 'Share CPU when foreground' is set to Y.
USAGE.
------
CMON is the program that loads and un-loads CMONITOR for the carrier
monitoring task. The syntax for CMON is:
CMON [d:\path\CM-PIF.DVP | OFF]
where [ | ] denotes the two options. Use the qualified filespec for the
CM PIF for loading CMONITOR and OFF for un-loading it. RBBS is run from a
batch file. Users of WATCHDOG will find that there are two entries for
WATCHDOG in the RBBS.BAT file. Change the entry WATCHDOG OFF to CMON OFF
and change WATCHDOG ON to CMON d:\path\CM-PIF.DVP. Users of COM-AND may
include the script commands RUN "CMON.COM d:\path\CM-PIF.DVP" and RUN
"CMON.COM OFF" at appropriate points in their scripts.
When CMON d:\path\CM-PIF.DVP is executed, if there is a carrier on the com
port specified, it will open the CMONITOR window, display an installed
message, and begin monitoring the carrier. If the carrier is lost on the
com port being monitored, CMONITOR will detect the loss and immediately
close the BBS window. It will then re-open the BBS window, display a
restart message with time and date, and CMONITOR will exit closing its own
window.
The restart message is not of much use unless you want to maintain a log
in a file or on your printer of the restarts. The output from CMONITOR
may be redirected using the standard DOS technique. If you want to use
this feature, you will need to make some changes to the CM-PIF.DVP file.
Change 'Memory size' to 30k. Delete .COM from the 'Program' field.
Change the 'Parameters' field to something like this:
C:\DV\xx-PIF.DVP 1 >>C:\BBS\RESTART.LOG
where xx is your comm window. Of course you can redirect to PRN or any
other file.
If the window you are working in when a remote user causes CMONITOR to be
loaded covers the upper left corner of the screen (e.g. full screen) and
is set to run in background, then you only will notice a slight delay as
CMONITOR loads. You will be returned to the task on which you were
working. Otherwise you will have to manually switch back to your original
task.
The same procedure for returning to the task you were working on when |
carrier is lost and CMONITOR reloads your comm program is now implemented. |
For this return procedure to work in both cases you should have an |
asterisk entered in the 'Shared Program Pathname' field of the PIF for |
each of the programs you are likely to be in when CMONITOR is active. |
If CMONITOR is not loaded when CMON OFF is executed, nothing will happen.
If CMONITOR is loaded, CMON OFF will close the CMONITOR window. CMONITOR
is not a TSR so there is no problem with memory allocation in opening and
closing a DESQview window containing CMONITOR. That is one of the
advantages of multi-tasking systems.
You will not need the syntax for CMONITOR since the PIF file is included
here, but for completeness the syntax is:
CMONITOR d:\path\xx-PIF.DVP y
^only one space
where xx is the two character name of your comm program and y is the com
port to be modified (in the range 1..4). The output from CMONITOR may be
redirected.
REQUIREMENTS.
-------------
CMONITOR requires DESQview 2.00 or higher. Neither CMONITOR nor CMON will
execute without DESQview.
HOW DOES IT WORK?
-----------------
CMONITOR is a good example of using the DESQview Applications Program
Interface for communicating between processes running in different
windows. The source code is included so that you can get an idea of the
power of the API. When CMON executes in the load option, it opens the
CMONITOR window and sends CMONITOR a message with the identification of
the comm program window in which CMON is executing. When CMONITOR is
loaded it reads the message from CMON, loads the PIF for the comm program,
names its mailbox so CMON can find it later, and begins monitoring the
carrier and waiting for a close message from CMON. The carrier is
monitored by checking bit 7 of the Modem Status Register. If carrier is
lost, CMONITOR closes the comm program window, reopens it, sends the
restart message and exits itself. CMON OFF sends a close message to
CMONITOR which is located by looking for the named mailbox belonging to
CMONITOR. When CMONITOR receives the close message, it stops monitoring
and exits.
All of this will take place without any impact on other windows that are
open accept for a slight delay while CMONITOR switches to itself and does
the reloading. You may continue tasks you were working on after the BBS
restarts. CM runs in background and checks the status of the carrier
during each background timeslice it gets. CM is very fast and gives up
the remainder of its timeslice once a check has been made. Of course you
can control this frequency by the 'Performance' ratio specified in the
DESQview SETUP routine.
xMONITOR SERIES.
----------------
The author intends to write other xMONITOR programs for non-DV
applications that are running in DESQview. These xMONITOR programs will
provide DESQview capabilities to applications that were not written
specifically to operate in DESQview. For example I have written FMONITOR
for managing the font changes of the Hercules Graphics Card Plus when used
by programs such as WordPerfect 5.0 in DESQview.
COPYRIGHT.
----------
CMONITOR and the xMONITOR series are copyrighted by John Poindexter 1988.
DESQview and the API are copyrighted by Quarterdeck Office Systems.
COM-AND is copyrighted by Caber Software. RBBS is copyrighted by D.
Thomas Mack.
SHAREWARE.
----------
You are encouraged to copy the CMONITOR.ARC file and share it freely
with others. You have the luxury of trying out the program, at
your own pace and in the comfort of your own home or workplace. This is
not a crippled or "demo" copy, but the complete working version of the
program.
After you have used CMONITOR for a reasonable evaluation period you
should either discontinue use of the program or register your copy by
sending $5.00 to the author as indicated below. Your support is important
and greatly appreciated. With it, Shareware authors are encouraged to
design and distribute new products. Without it, a great deal of high
quality, low cost software will cease to be available.
I will be interested in receiving comments about CMONITOR and will
consider making suggested changes to suit users.
John Poindexter
10 Barrington Fare
Rockville, MD 20850
SIG004 The SOURCE
December 7, 1988
APPENDIX A.
-----------
Display screens from DESQview 2.01 'Change Program' for CM-PIF.DVP.
Change a Program
Program Name............: CMONITOR
Keys to Use on Open Menu: CM Memory Size (in K): 3
────────────────────────────────────────────────────────────────────────────
Program...: D:\WORK\CMONITOR.COM
Parameters: C:\DV\CA-PIF.DVP 1
Directory.: D:\WORK
────────────────────────────────────────────────────────────────────────────
Options:
Writes directly to screen......: [N]
Displays graphics information..: [N]
Can be swapped out of memory...: [N]
Requires floppy diskette.......: [N]
Press F1 for advanced options Press ┘ when you are DONE
────────────────────────────────────────────────────────────────────────────
Change a Program Advanced Options
System Memory (in K).......: 0 Maximum Program Memory Size (in K)..:
Script Buffer Size.......: 0 Maximum Expanded Memory Size (in K):
Text Pages: 1 Graphics Pages: 0 Initial Mode: Interrupts: 00 to FF
────────────────────────────────────────────────────────────────────────────
Window Position:
Maximum Height: 25 Starting Height: 2 Starting Row...: 23
Maximum Width.: 80 Starting Width.: 60 Starting Column: 1
────────────────────────────────────────────────────────────────────────────
Shared Program
Pathname..: *
Data......:
────────────────────────────────────────────────────────────────────────────
Options:
Close on exit to DOS.........: [Y] Uses its own colors.........: [N]
Allow Close Window command...: [Y] Runs only in foreground.....: [N]
Uses math coprocessor........: [N] Keyboard conflict (0-4).....: [0]
Press F1 for standard options Press ┘ when you are DONE