LL_GETTERM(5ICD)

NAME
ll_getterm - LDMC terminal lookup primitive

SYNOPSIS
#include <ll_getterm.h>

TERMVEC *ll_getterm (side, layer, name, t_ind, i_ind, ip, mp, opts)
char *side, *name;
int layer[];
int t_ind, i_ind;
INST *ip;
MODEL *mp;
struct ll_getterm_opts *opts;

PARAMETERS
The parameters side, layer, name, and t_ind specify conditions which must be satisfied by the terminal nodes to be included in the result. They all have a special value indicating a "don't care" condition. A string containing side specifiers where to look for terminals. The macro ALL_SIDES means "lrbt". An array of integers containing layer indices. The array should be terminated with a -1. This goes against the C-tradition of indicating last positions in arrays by a zero, but is neccessary since zero is a valid layer index. The macro ALL_LAYERS means that the terminal layer is irrelevant. The name of the terminal which must be found. The macro ALL_NAMES means a "don't care". An integer specifying the value of the index member which the TERM node must have to be included in the result. The macro ALL_INDEX means that this parameter is a "don't care". An integer specifying to which instance in an array of instances the terminal must belong. Of course, this parameter is only valid when mp == NULL and ip points to a valid instance node. The macro ALL_INDEX means that this parameter is a "don't care". A pointer to an INST node of which the instantiated terminals must be computed. A pointer to a MODEL node of which the terminals must be found. Only one of ip and mp must be non-zero. is a pointer to a ll_getterm_opts options structure. If the default options are suitable, this parameter may be NULL. Otherwise, the user must define a private options structure and initialize it to DEFAULT_GETTERM_OPTS to guarantee forward software compatibility.
The type of the options is int, unless indicated otherwise. Currently the supported options are:
    The address of the buffer to store pointers to TERM nodes. The default buffer is a static memory area inside the ll_getterm function. The number of elements in this buffer. The default buffer has approximately 1024 entries. The number of terminals actually found (output parameter). If this option is 1, the terminals are first transformed according to the values of opts.mir and opts.rot before they are put in the buffer. If this option is 0, the values of opts.mir and opts.rot are ignored. The default value is 0. Miroring of terminals if opts.transform is 1. Legal values are M0 (default), MX and MY. Rotation of terminals if opts.transform is 1. Legal values are R0 (default), R90, R180 and R270.

DESCRIPTION
Ll_getterm is the LDMC kernel function for mgetterm and igetterm.

RETURN VALUE
A pointer to the TERMVEC buffer is returned if all went OK, NULL is returned otherwise.

SEE ALSO
ldmcintro(5ICD)