Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 28
Controlling $CMON While the System Is Running
Control the CPU in which new processes can execute. This section has already
described how to do this statically; your $CMON program can be written to allow
CPU specification at run time.
One effective way of providing run-time control is to provide a command-interface
program that shall be referred to as CMONCOM. This program is started by the
operators TACL process and passes requests to $CMON to set flags, provide
response text, and so on. Figure 23-2 shows the model.
For a model like this to work, you need a way to distinguish between messages from
the command-interface program and messages received from the TACL process.
Currently, all command-interpreter messages have a message code in the range -1
through -60. You should therefore choose message codes outside this range for
messages from your command-interface program. Using positive numbers is one
possible solution.
Another check that your $CMON program should make is that the sender of a
command-interface program message has proper authority. For example, you can
check that the message sender belongs to the operations group.
Figure 23-2. $CMON With Operator Control Process
Note. HP reserves the right to add to its message-numbering system at any time. If you
choose to use some currently unused message numbers for your own use, you should plan for
the possibility that you might need to change them in the future.
VST114.VSD