Entity references identify entities existing in a multinode model. This identification is necessary when enumerating entities in a multinode model and when passing information about entities associated with an occurred error to a model error handler. See Error Handling for a Multinode Model, for information about model error handlers. The header file refe.h contains declarations related to entity references. The notion of an entity referred to by an entity reference has nothing to do with virtual or logical entities represented by state models of nodes of a multinode model.
The basic type of an entity reference is local entity reference. A local entity reference identifies an entity within some known context. The following enumeration declares types of local entity references.
This enumeration categorizes entities that are parts of a multinode model. The enumeration contains the following elements.
QSMM_LREF_INVALIDInvalid entity type. This element indicates unknown entity type or the type of a nonexistent entity.
QSMM_LREF_INSTR_CLASS_SETAn instruction class set.
QSMM_LREF_INSTR_META_CLASSAn instruction meta-class.
QSMM_LREF_NODEA node.
QSMM_LREF_PROB_VAR_CTRLA controlled probability variable. See Controlled Variables.
QSMM_LREF_PROB_VAR_OUTAn output probability variable. See Output Variables.
QSMM_LREF_PROB_ARR_OUTAn output probabilities array. See Output Arrays.
QSMM_LREF_INSTR_CLASSAn individual instruction class.
QSMM_LREF_INSTR_CLASS_SEQAn instruction class sequence.
QSMM_LREF_COUNTThe number of supported types of local entity references.
The following union represents a local entity identifier for a local entity reference.
This union holds a local entity identifier for a local entity reference with the type specified by an element of qsmm_lref_e enumeration.
The union contains the following fields.
char *name ¶An entity name.
It is applicable to local entity references of QSMM_LREF_INSTR_CLASS_SET, QSMM_LREF_INSTR_META_CLASS, QSMM_LREF_PROB_VAR_CTRL, QSMM_LREF_PROB_VAR_OUT, and QSMM_LREF_PROB_ARR_OUT types.
qsmm_sig_t sig ¶A local entity identifier represented by a signal.
It is applicable to local entity references of QSMM_LREF_NODE type.
struct qsmm_instr_class_s instr_class ¶An individual instruction class descriptor.
It is applicable to local entity references of QSMM_LREF_INSTR_CLASS type.
struct qsmm_instr_class_seq_s instr_class_seq ¶An instruction class sequence descriptor.
It is applicable to local entity references of QSMM_LREF_INSTR_CLASS_SEQ type.
The following structure holds an individual instruction class descriptor stored in the field instr_class of qsmm_lref_u union for local entity references of QSMM_LREF_INSTR_CLASS type.
This structure holds a descriptor identifying an individual instruction class. The structure contains the following fields.
char *meta_class_name ¶An instruction meta-class name.
char *param_str_p ¶Text instruction class parameters in the canonical form (see Setting Text Instruction Parameters).
An empty string means empty text parameters.
The NULL value means that the text parameters are unknown.
qsmm_sig_t idx ¶An instruction class index.
It uniquely identifies the individual instruction class in an instruction class set.
The value QSMM_SIG_INVALID means that the index is unknown.
size_t param_bin_sz ¶The size of binary instruction class parameters. If binary parameters are unknown, this field must be equal to 0.
void *param_bin_p ¶Binary instruction class parameters.
If this field is not NULL, it must address a memory block with size in bytes specified by the field param_bin_sz.
If this field is NULL, then binary parameters are unknown, and the field param_bin_sz must be equal to 0.
The following structure holds an instruction class sequence descriptor stored in the field instr_class_seq of qsmm_lref_u union for local entity references of QSMM_LREF_INSTR_CLASS_SEQ type.
This structure holds a descriptor identifying an instruction class sequence. The structure contains the following fields.
qsmm_sig_t idx ¶An instruction class index.
It uniquely identifies the instruction class sequence in an instruction class set.
The value QSMM_SIG_INVALID means that the index is unknown.
size_t n_elm ¶The number of individual instruction classes in the instruction class sequence.
struct qsmm_instr_class_s *elm_p ¶Descriptors of individual instruction classes comprising the instruction class sequence.
The field n_elm of this structure specifies the number of elements in the sequence.
The following structure represents a complete local entity reference.
This structure holds the type of a local entity reference along with a local entity identifier. The structure contains the following fields.
enum qsmm_lref_e type ¶The type of a local entity reference.
union qsmm_lref_u val ¶The value of a local entity reference depending on its type.
For the type QSMM_LREF_INVALID, must be a block of zero bytes.
A global entity reference identifies an entity in the address space of a running process. The error handler of a multinode model receives global references to entities related to errors. The type of a global entity reference specifies a method of identifying an entity. The following enumeration declares the types of global entity references.
This enumeration specifies a method of identification of an entity in the address space of a running process. The enumeration contains the following elements.
QSMM_GREF_INVALIDInvalid global entity reference, including the absence of an entity to identify.
QSMM_GREF_HANDLE_LREFAn object handle and local entity reference.
This method of identification is applicable to local entity references of QSMM_LREF_INSTR_CLASS_SET, QSMM_LREF_INSTR_META_CLASS, and QSMM_LREF_NODE types.
The object handle has the type QSMM_HANDLE_MODEL and refers to a multinode model containing an instruction class set, instruction meta-class, or node.
QSMM_GREF_HANDLE_LREF2An object handle, the local entity reference of a container, and the local entity reference of a contained entity.
This method of identification is applicable to local entity references of QSMM_LREF_PROB_VAR_CTRL, QSMM_LREF_PROB_VAR_OUT, QSMM_LREF_PROB_ARR_OUT, QSMM_LREF_INSTR_CLASS, and QSMM_LREF_INSTR_CLASS_SEQ types for contained entities.
The object handle has the type QSMM_HANDLE_MODEL and refers to a multinode model with the container.
The local entity reference of the container has the type QSMM_LREF_NODE for a controlled probability variable, output probability variable, or output probabilities array contained in a node or the type QSMM_LREF_INSTR_CLASS_SET for an individual instruction class or instruction class sequence contained in an instruction class set.
The following union represents a global entity identifier for a global entity reference.
This union holds a global entity identifier for a global entity reference with the type specified by an element of qsmm_gref_e enumeration.
The union contains the following fields.
struct qsmm_handle_lref_s handle_lref ¶An object handle and local entity reference.
This field is for a global entity reference of QSMM_GREF_HANDLE_LREF type.
struct qsmm_handle_lref2_s handle_lref2 ¶An object handle, the local entity reference of a container, and the local entity reference of a contained entity.
This field is for a global entity reference of QSMM_GREF_HANDLE_LREF2 type.
The following structure holds an object handle and local entity reference stored in the field handle_lref of qsmm_gref_u union for global entity references of QSMM_GREF_HANDLE_LREF type.
This structure holds the handle of an object and a local entity reference for an entity contained in the object. The structure contains the following fields.
struct qsmm_handle_s handle ¶The handle of a containing object.
At present, can only be a handle of QSMM_HANDLE_MODEL type.
struct qsmm_lref_s lref ¶A local entity reference for an entity contained in an object.
At present, can be a local entity reference of QSMM_LREF_INSTR_CLASS_SET, QSMM_LREF_INSTR_META_CLASS, or QSMM_LREF_NODE type, where the containing object is a multinode model.
The following structure holds an object handle, the local entity reference of a container, and the local entity reference of a contained entity.
The field handle_lref2 of qsmm_gref_u union holds this triple for global entity references of QSMM_GREF_HANDLE_LREF2 type.
This structure holds the handle of an object, the local entity reference of a container in the object, and a local entity reference for an entity in the container. The structure contains the following fields.
struct qsmm_handle_s handle ¶The handle of an object.
At present, can only be a handle of QSMM_HANDLE_MODEL type.
struct qsmm_lref_s container ¶The local entity reference of a container in an object.
At present, can be a local entity reference of QSMM_LREF_NODE or QSMM_LREF_INSTR_CLASS_SET type, where the containing object is a multinode model.
struct qsmm_lref_s lref ¶A local entity reference for an entity in a container. At present, can be:
QSMM_LREF_PROB_VAR_CTRL, QSMM_LREF_PROB_VAR_OUT, or QSMM_LREF_PROB_ARR_OUT type for a container specified by a local entity reference of QSMM_LREF_NODE type;
QSMM_LREF_INSTR_CLASS or QSMM_LREF_INSTR_CLASS_SEQ type for a container specified by a local entity reference of QSMM_LREF_INSTR_CLASS_SET type.
The following structure represents a complete global entity reference.
This structure holds the type of a global entity reference along with a global entity identifier. The structure contains the following fields.
enum qsmm_gref_e type ¶The type of a global entity reference.
union qsmm_gref_u val ¶The value of a global entity reference depending on its type.
For the type QSMM_GREF_INVALID, must be a block of zero bytes.