The Adam notice board system (SUN/77) stores arrays of bytes in shared memory. Each notice board item has associated with it a data type and dimensions but the notice board system itself does not attach any meaning to them; it is up to the applications accessing the noticeboard to agree on the interpretation of the type and dimension information. The types recognizes by the Tcl/Tk interface to the noticeboard system and the way it interprets the data value are:
_INTEGER
_REAL
_DOUBLE
_LOGICAL
_CHAR
The notice board extension defines one new command nbs. The nbs command can be used to read nbs notice board items with:
which returns the values stored in the specified nbs item. If the type of the item is one of _INTEGER, _REAL, _DOUBLE or _LOGICAL the values stored in noticeboard are formatted into a list of integer, float or logical values as appropriate. If the item is of any other type the entire item is simply returned as a string with no interpretation.
Notice board items can be written with:
where <nbs_name>
is a fully qualified nbs item name and <values>
is the values to be written. The
format of <values>
depends on the type of the nbs item; if it is _INTEGER, _REAL, _DOUBLE or
_LOGICAL, it must be a list of values of that can be converted to the appropriate type by the usual
rules and of exactly the correct length to fill the item. If the type is _CHAR it must by a string, no
longer than the length of the item; the string will be padded with blanks to the correct length before
being written to the noticeboard. If the item has any other type <value>
must be a string of exactly the
same length of the item.
The command:
returns a list of information about the nbs item. The first element of the list which indicates whether the item is a primitive item (1) or a structure item (0). If it is a structure item the remaining elements of the list are the names of the children of the item. If it is a primitive item the remaining elements are:
Noticeboard items can also be “monitored”; at some specified time interval the value stored in the item is copied into a Tcl variable, again using the standard type conversions.
adds <nbs_name>
to the list of NBS items to be monitored and associates it with the global Tcl variable
<variable>
.
starts monitoring all the NBS items in the list with the interval between checks set to <interval>
milliseconds.
stops the monitoring process and
empties the list of nbs items being monitored.
returns a list of all the noticeboard items currently being monitored. Each element of the list consists of a two element list giving the notice board item name and the name of the corresponding Tcl variable name.
Examples are given in appendix B.