Next: Defining the Noticeboard Contents
Up: NBS The Noticeboard System
Previous: Terminology
This section takes the form of a tutorial. Starting with a listing of a
noticeboard contents, we present the calls necessary to define that
noticeboard, to put the required values into it and for another process to
access those values.
Suppose that we wish to create and access a simple noticeboard. We will
use as an example a subset of the noticeboard that is maintained by the
AUTOFIB control software. The notation used is the same as that used by
the NBTRACE (Trace Noticeboard) program (see Section C.1) -- each structure entry is of the form:
type name (children)
and each primitive entry is of the form:
type name[(maxd) dim1,dim2...] (actb/maxb/mod) val1,val2,...
with appropriately indented entries. The shape information is shown only if
the maximum number of dimensions (maxd) is greater than zero. The three
slash-separated numbers are actual number of bytes, maximum number of bytes and
modified count.
The result of running NBTRACE on this noticeboard might be:
Software version = 5 (5)
Size of section = 13284 (33e4)
Size of definition = 8952 (22f8)
Noticeboard owner = 405 (195)
Modified count = 2 (2)
NOTICEBOARD AUTOFIB (3)
_CHAR CURRENT_CONFIG (18/132/2) "current.fib"
CURRENT_STATUS CURRENT_STATUS[(1) 72] (0/4608/0)
FIBRE_PARAMETERS FIBRE_PARAMETERS (1)
_INTEGER TRANS_MATRIX[(2) 2,2] (16/16/2) 1,0,0,1
- Type and shape have no significance to the NBS routines -- the type
is just a character string and the shape is just a list of numbers. In the
above, HDS primitive type conventions have been used and this allows a
sensible representation of values. Remember though that it is the NBTRACE
program that is making use of the type information, not the NBS routines.
- The initial state of an item is that the actual number of bytes and the
modified count are both zero. CURRENT_STATUS above is in its initial
state.
- It is possible to give an item a shape during the definition phase so an
item can initially have a non-scalar shape.
- The noticeboard modified count is incremented just after updating any
item in the noticeboard. An ``update'' may be an update of an item's value, its
shape or its size.
- An item's modified count is incremented just before updating an item
and just afterwards. Thus if it is odd then an item is in the process of
being updated, and the number of completed updates is MODIFIED / 2. An
``update'' may be an update of either an item's value or its shape.
- You can use the NBS_GET_UPDATED routine to determine whether
a noticeboard or a specific item has been updated since the last call to NBS_GET_UPDATED.
Next: Defining the Noticeboard Contents
Up: NBS The Noticeboard System
Previous: Terminology
NBS The Noticeboard System
Starlink User Note 77
D.J. Allan
11 September 1995
E-mail:ussc@star.rl.ac.uk