fastcs.datatypes
#
Members
|
|
Generic datatype mapping to a python type, with additional metadata. |
|
Enum(enum_cls: 'type[T_Enum]') |
|
|
|
|
|
|
|
Table(structured_dtype: 'list[tuple[str, DTypeLike]]') |
|
Waveform(array_dtype: 'DTypeLike', shape: 'tuple[int, ...]' = (2000,)) |
- class fastcs.datatypes.DataType[source]#
Generic datatype mapping to a python type, with additional metadata.
- validate(value: Any) T [source]#
Validate a value against the datatype.
The base implementation is to try the cast and raise a useful error if it fails.
Child classes can implement logic before calling
super.validate(value)
to modify the value passed in and help the cast succeed or after to perform further validation of the coerced type.
- class fastcs.datatypes.Int(units: str | None = None, min: T_Numerical | None = None, max: T_Numerical | None = None, min_alarm: T_Numerical | None = None, max_alarm: T_Numerical | None = None)[source]#
DataType
mapping to builtinint
.
- class fastcs.datatypes.Float(units: str | None = None, min: T_Numerical | None = None, max: T_Numerical | None = None, min_alarm: T_Numerical | None = None, max_alarm: T_Numerical | None = None, prec: int = 2)[source]#
DataType
mapping to builtinfloat
.