The ValueStatus enum
is recommended as the means for using descriptive names when testing condition
bits in a RtValue object's .Status value. The following code shows the
descriptive name and corresponding bit numbers for each possible status. The
ValueStatus enum includes the following values:
enum ValueStatus {
Good = 0x0000000,
Uncertain = 0x0000001, // .ST field indicates Uncertain
Bad = 0x0000002, // .ST field indicates Bad
Comm = 0x0000004, // not communicating
Unknown = 0x0000008, // cannot find
Locating = 0x0000010, // (usually temporary)
NotSet = 0x4000000,
QualityMask = 0xFFFFFFC,
NoValueMask = 0xFFFFFFE,
}
Examples
| Example
|
Result
|
if (valueRead.Status == ValueStatus.Uncertain) {
}
|
Uses the value while indicating
"uncertain" status.
|
let cstat = v1.Status | v2.Status | v3.Status;
if (cstat && ValueStatus.NoValueMask) {
}
|
At least one needed value is unusable;
therefore, the total cannot be shown.
|