v1.3.0
Features
- The properties
FamosFileTriggerTime,FamosFileXAxisScalingandFamosFileZAxisScalingare available on both, theFamosFileFieldandFamosFileComponentinstances. The file format allows an optimization to store these properties only when there is a change. This means when the first component of a field has one of these properties assigned to a non-null value, this value applies to all subsequent components in that field, too. When this value is assigned to theFamosFileFieldinstance itself, it applies to all child-components until redefined by a component.
This library now removes redundant values whenever a file is saved. Additionally, whenever a file is read-back from disk or from a stream into memory, this library distributes the values to all belonging components. This means, when there is a file with e.g. a FamosFileXAxisScaling instance assigned to a field, this x-axis scaling instance is copied over to all child-components. The advantage is that the corresponding scaling data can be accessed more easily and reliable than before.
As all properties are nullable, they are only assigned when there is a definition found within the file.
Example (old, < v1.3.0):
XAxisScaling scaling;
// Try get scaling from component itself.
scaling = famosFile.Fields[0].Components[3].XAxisScaling;
// If it is null, try to get it from the field.
if (scaling == null)
scaling = famosFile.Fields[0].XAxisScaling;
// And now there it still a slight chance we got the wrong scaling instance
// because another (earlier) child component could have redefined it before.Example (new, >= v1.3.0):
// Simply get scaling from x-axis. If it is null, you can be sure that there was
// no scaling defined in the file.
var scaling = famosFile.Fields[0].Components[3].XAxisScaling;Bugs Fixed
- Dipose the opened file stream, when opening a file fails.
- Fixed wrong bit-field size check.
- Fixed wrong regular expression which led to error when using quotes and newline character in
FamosFilePropertyinstances.