| |||
| Home > RVISS Reference > SimRdi_Manager interface > Register windows service (regwin) | |||
The register windows service (regwin)
service of SimRdiProcVec lets you define your own
register tabs. Each advert can only register a single tab and it
contains a pointer to a type RegWin that is a typedef to
structure REG_WIN.
The REG_WIN structure has the following
members:
tab_nameThe format . short_name,long_name is
what appears on the tab, short_name is
what appears in the tool tip, or when you right-click on the tab.long_name
linesAn
array of lines. The format for lines is:
“_text”An uninterpreted description line.
“$+”Expansion
block (the little + button that you push to expose more
registers), the default for this is normally closed. The following
line must be a “_text” line that names this block.
“$-”Expansion
block, normally open. Again the following line must be a "_text" line.
“=name”Corresponds
to one of the register names that has been added through the register
adverts, for example, @model_register. The name
that appears in the window is the buttonName field
of the Register_Definition structure.
Each buttonName must be padded with spaces
if you want the values to line up.
“name”Only the value appears.
None of the strings in these arrays must contain tab or new-line characters.
line_cntNumber
of lines in lines.
enum_cntReserved. Set to zero.
enum_listReserved.
Set to NULL.
SimRdi_Manager automatically generates an entry for the variables in a register tab that corresponds to a specific block when both these conditions exist:
the config_flags of
the variables do not have the following bit set (in uniregs_registration_event.h):
UNIREGS_DO_NOT_AUTO_GENERATE_REG_WIN
the block number appears in the blocks_to_export list
in the SimRdiProcVec.
Each advert is converted to an expansion block, that is open
by default, and the description field of SimRdi_Uniregs_Advert is
used as the expansion name of the block.
If you want to alter the order of tabs that appear in the
window, then use the reg_numbers field of the
advert to reorder them. The order in the reg_numbers array
is the order they appear in the register window.
The adverts and, therefore, the order of expansion groups,
can be changed by altering the bits of config_flags &
UNIREGS_SORT_MASK.
Currently only the uniregs_cycle_counters block
has a special interpretation of the sort order of adverts, but in
the future ARM Limited might add special interpretations to other blocks. Suggestions
for the use of each block are provided in the comments in uniregs_registration_event.h.
If your model is to expose many registers, or requires expansion blocks, then your model must create its own register window. The autogenerate facilities are provided only as a way of preventing tab-proliferation.