$Id: frontend.txt,v 1.2 1992/12/08 12:04:06 mume Exp $
MUME Front-ends
----------------

The MUME environment is exploited through simulation fron-ends or
application programs. In both cases, the program is linked with the MUME
library (libmmnn.a).

There are a number of front-end programs provided with the MUME software
(the src/clients directory) and they provide examples for writing new ones.

We describe below important functions commonly used in front-end programs.


Any program that makes use of the MUME library needs to perform the
following:

	o Library Initialisation
	o ".mmn" file reading
	o Network organisation
	o Network initialisation (optional)

Throughout this document the term "system" means a multi-net system.

Library Initialisation
----------------------


MMInit()

This routine initialises all network classes available in the library.
It should be called before any other call to the MUME library.


Reading an ".mmn" File
----------------------

nnsys_t *ReadRC(filename, where)
char *filename;
FILE *where;

This routine reads an ".mmn" file describing a multi-net system (see MMN.5
for more information about ".mmn" file format). It returns a pointer to a
system 


Setting System and Networks Mode
--------------------------------
SetModeSystem(sys, mode)
nnsys_t *sys;
int mode;

Sets the system mode. The mode can be either TRAINING, TESTING, FOLLOWUP
or OPERATE. Note this function will also set the mode of all networks in
the system.


Initialising Networks
---------------------
InitState(sys)
nnsys_t *sys;

Initialises the state of the system. This function will call the InitState
function of each network (see NSF.3).


Miscellaneous Routines
----------------------

SetVerbose(state)
int state;

This routine sets the verbosity state to TRUE (state = 1) or FALSE 
(state = 0).


OpenNetLog(p)
nn_t *p;

Opens the log file of the net pointed to by p;

PrintNNRec(p, where)
nn_t *p;
FILE *where;

Prints the network setup. "p" is the network pointer. "where" is the file
pointer where the output will be written to.

PrintSys(sys, where)
nnsys_t *sys;
FILE *where;

Print the system ("system" section in ".mmn" file) set up. 
"sys" is the pointer to the system multi-net. 
"where" is the file pointer.



MUME's Front End Miscellanous Utilities
----------------------------------------

A number of utilities are provided in MUME for front-end programs. These are
described in mmUtils.3



