Target Requirements : Data Types Introduced to the Intrinsics Library : Data Types Related to the Data Items

Data Types Related to the Data Items

For each element that is either traced or has I/O mapping associated with it, the instance of the following data structure is generated:

typedef struct report_elem {
/* -- general */
char* elem_name; /* -- name of the reported element */
char* inst_name; /* -- name of the generic instance */
genptr elem_value; /* -- pointer to the value of the
-- __model__ element */
el_enum elem_type; /* -- type of the reported element */
int str_len; /* -- if non-zero - length of the
string */
genptr user_data; /* -- user defined misc data */
/* -- tracing */
rep_funcp trace_func; /* -- trace function pointer */
boolean immediate; /* -- if TRUE bypass the list */
/* -- input/output mapping */
/* -- common for both in and out */
card_desc_p card_p; /* -- the card associated with this model -- element */
char* pin_offset; /* -- offset off the base */
char* pin_name; /* -- name of the pin */
int pin_number; /* -- pin position within pin
array of card_p, starting
from 0 */
/* -- input mapping specific */
rep_funcp in_func; /* -- for input mapping */
genptr received_val; /* -- buffer for storing the new value of -- the model element received from the -- card */
genptr new_value; /* -- double buffering info: -- if ZNIL then DB is dynamic -- else the read value is directly -- written to *new_value */
/* -- output mapping specific */
rep_funcp out_func; /* -- for output mapping */
boolean pin_inverse; /* -- if TRUE inverse the reported value bitwise */
boolean buffered; /* -- if TRUE output is buffered */
/* -- list management */
report_link next_elem; /* -- next element of the list of reported elements */
} report_elem;

 

This declaration is copied from types.h of the Intrinsics library. The variable of this type is called “report element”. It contains all information about data item and its tracing and
I/O mapping specifics that at the moment seems necessary. The purpose of user_data field is to provide users with the capability to add whatever data they desire. It is important because report elements are visible to the code that should be written by the user.

Each report element that is associated with a pin of a I/O card has its card_p field non ZNIL. This allows Rational Statemate to serve I/O mapping requirements in a per-element fashion.