Monitor: Standard Monitor Functions
10002367-02 PmT1 and PmE1 User’s Manual
8-41
struct NVExample {
NV_Internal Internal;
unsigned long XPos, YPos;
unsigned short Mag;
} NVEx;
NVField ExFields[] = {
{ “XPos”, (char *) &NVEx.XPos, sizeof(NVEx.XPos),
NV_TYPE_DECIMAL, 0, 100, NULL},
{ “YPos”, (char *) &NVEx.YPos, sizeof(NVEx.YPos),
NV_TYPE_DECIMAL, 0, 200, NULL},
{ “Depth” (char *) &NVEx.Mag, sizeof(NVEx.Mag),
NV_TYPE_DECIMAL, 0, 4, NULL}
}
NVGroup ExGroups[] = {
{ “Window”, sizeof(ExFields)/sizeof(NVField), ExFields }
};
If passed a pointer to the ExGroups structure, the function DispGroup generates the display
shown below. The second parameter EditFlag indicates whether to allow changes to the
data structure after it is displayed (same as in the nvdisplay command).
Window Display Configuration
XPos 100
YPos 200
Magnitude 4
The SetNvDefaults function, when called with a pointer to the ExGroup structure, initializes
the data structure to those values specified in the NVGroup structure. The second parame-
ter NumGroups indicates the number of groups to be initialized.
The NVOp function stores and recovers data structures from nonvolatile memory. The only
requirement of the data structure to be stored in nonvolatile memory is that the first field
of the structure be NVInternal, which is where all the bookkeeping for the nonvolatile
memory section is done. The first parameter NVOpCmd indicates the command to be per-
formed. A summary of the commands is shown below:
Table 8-8: NVOp Command
Command: Value: Description:
NV_OP_FIX 0 Fix nonvolatile section checksum
NV_OP_CLEAR 1 Clear nonvolatile section
NV_OP_CK 2 Check if nonvolatile section is valid
NV_OP_OPEN 3 Open nonvolatile section
NV_OP_SAVE 4Save nonvolatile section
NV_OP_CMP 5 Compare nonvolatile section data