The following Fortran-like calls will define the contents of the above noticeboard and save the definition in a disc file.
INCLUDE `NBS_ERR' ! Error code definitions INCLUDE `SAE_PAR' ! Error code definitions INTEGER STATUS ! Modified STATUS variable INTEGER TOPSID ! Top-level static ID INTEGER SID ! General purpose static ID INTEGER FIBSID ! FIBRE_PARAMETERS static ID INTEGER DIMS(2) ! TRANS_MATRIX dimensions STATUS = SAI__OK ! Initially set status to be OK
Begin the noticeboard definition.
NBS_BEGIN_DEFINITION (TOPSID,STATUS) ! Top-level static ID
Define the primitive item CURRENT_CONFIG. This is a character string of maximum length 132 bytes. We choose to regard it as a scalar.
NBS_DEFINE_PRIMITIVE (TOPSID, ! Parent static ID `CURRENT_CONFIG', ! Name of item `_CHAR', ! Type of item 0,132, ! Max # dims and bytes SID,STATUS) ! Returned static ID
Define the primitive item CURRENT_STATUS. This is a 1D array of 72 64 byte records.
NBS_DEFINE_PRIMITIVE (TOPSID, ! Parent static ID `CURRENT_STATUS', ! Name of item `CURRENT_STATUS', ! Type of item 1,72*64, ! Max # dims and bytes SID,STATUS) ! Returned static ID NBS_DEFINE_SHAPE (SID, ! Static ID 1,72,STATUS) ! Actual # dims and dims
Define the structured item FIBRE_PARAMETERS. Structured items cannot have shapes or values.
NBS_DEFINE_STRUCTURE (TOPSID, ! Parent static ID `FIBRE_PARAMETERS', ! Name of item `FIBRE_PARAMETERS', ! Type of item FIBSID,STATUS) ! Returned static ID
Define the lower-level primitive item TRANS_MATRIX. This is a 2D array of 2 x 2 integers.
NBS_DEFINE_PRIMITIVE (FIBSID, ! Parent static ID `TRANS_MATRIX', ! Name of item `_INTEGER', ! Type of item 2,4*4, ! Max # dims and bytes SID,STATUS) ! Returned static ID DIMS(1) = 2 DIMS(2) = 2 NBS_DEFINE_SHAPE (SID, ! Static ID 2,DIMS,STATUS) ! Actual # dims and dims
End the definition, writing to file AUTOFIB.NBD.
NBS_END_DEFINITION (`AUTOFIB', ! Name of noticeboard file `DEFINITION_SAVE', ! Write definition to disc STATUS)
NBS The Noticeboard System