Add NTScalar::form

This commit is contained in:
Michael Davidsaver
2023-04-14 10:14:30 -07:00
parent 5897fe273e
commit ad9ba0f085
2 changed files with 19 additions and 4 deletions
+11 -2
View File
@@ -60,15 +60,24 @@ TypeDef NTScalar::build() const
Member(scalar, "limitLow"),
Member(scalar, "limitHigh"),
String("description"),
//String("format"),
String("units"),
}),
};
if(form) {
def += {
Struct("display", {
Int32("precision"),
Struct("form", "enum_t", {
Int32("index"),
StringA("choices"),
}),
}),
};
}
} else if(display && !isnumeric) {
def += {
Struct("display", {
String("description"),
//String("format"),
String("units"),
}),
};