status property
BpStatus?
status
Returns the value of the status field. Returns null if the field is not defined in the message.
Implementation
BpStatus? get status {
final field = getField(BloodPressureStatusField.ID);
if (field != null && field.isValid()) {
var subField = field.getValidSubField(fields);
final value = field.getValue(subField: subField);
if (value == null) {
return null;
}
return BpStatusExt.fromValue(value);
} else {
return null;
}
}
Sets the status field with value
. Throws FieldNotDefinedError
if the field is not defined in the message.
Implementation
set status(BpStatus? value) {
final field = getField(BloodPressureStatusField.ID);
if (field != null) {
if (value == null) {
field.clear();
} else {
var subField = field.getValidSubField(fields);
field.setValue(0, value.value, subField);
}
} else {
throw FieldNotDefinedError(field!.name);
}
}