Skip to content

v1.3.0

Choose a tag to compare

@Apollo3zehn Apollo3zehn released this 19 Dec 14:04
· 40 commits to master since this release
5775bca

Features

  • The properties FamosFileTriggerTime, FamosFileXAxisScaling and FamosFileZAxisScaling are available on both, the FamosFileField and FamosFileComponent instances. 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 the FamosFileField instance 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 FamosFileProperty instances.