diff --git a/docs/4___common_content.adoc b/docs/4___common_content.adoc index 22bcccb..fdb8db8 100644 --- a/docs/4___common_content.adoc +++ b/docs/4___common_content.adoc @@ -134,6 +134,7 @@ The following XML child elements are specified for the Unit element: |=== |Element |Description |BaseUnit |Required element defining the base unit of the given unit in SI units, see below. +|DisplayUnit |Optional element(s) defining one or more display units for this unit, see below. |=== ===== BaseUnit @@ -158,6 +159,30 @@ image:images/SystemStructureCommon_BaseUnit.svg[image] |offset |Optional attribute specifying an optional offset, defaults to 0. |=== +===== DisplayUnit + +This optional element defines a display unit for the enclosing unit. +Multiple DisplayUnit elements may be specified. +This is aligned with the specification of display units in section 2.4.3 of the FMI 3.0 standard <>. + +image:images/SystemStructureCommon_DisplayUnit.svg[image] + +[width="100%",cols="28%,72%",options="header",] +|=== +|Attribute |Description +|name |This required attribute provides a name for the display unit, which *MUST* be unique within the set of display units of the enclosing unit definition. +|factor |This optional attribute specifies the factor to convert from the unit to the display unit. +Defaults to 1. +If `inverse` is false: latexmath:[\mathit{displayValue} = \mathit{factor} \cdot \mathit{value} + \mathit{offset}]. + +If `inverse` is true: latexmath:[\mathit{displayValue} = \dfrac{\mathit{factor}}{\mathit{value}} + \mathit{offset}]. +|offset |This optional attribute specifies the additive offset to convert from the unit to the display unit. +Defaults to 0. +|inverse |This optional boolean attribute specifies whether the conversion uses an inverse factor. +Defaults to false. +If false: latexmath:[\mathit{displayValue} = \mathit{factor} \cdot \mathit{value} + \mathit{offset}]. + +If true: latexmath:[\mathit{displayValue} = \dfrac{\mathit{factor}}{\mathit{value}} + \mathit{offset}]. +|=== + === XML Element Groups These XML element choices and sequences are common to multiple file formats. diff --git a/docs/images/SystemStructureCommon_DisplayUnit.svg b/docs/images/SystemStructureCommon_DisplayUnit.svg new file mode 100644 index 0000000..a861c73 --- /dev/null +++ b/docs/images/SystemStructureCommon_DisplayUnit.svg @@ -0,0 +1,276 @@ + + +TUnitsTypessc:TUnitUnitssc:TUnitDisplayUnit@AttributesTypexs:string@nameTypexs:doubleDefault1@factorTypexs:doubleDefault0@offsetTypexs:booleanDefaultfalse@inverse0..∞1..∞ diff --git a/docs/images/SystemStructureCommon_Unit.svg b/docs/images/SystemStructureCommon_Unit.svg index 62cc5c9..6651326 100644 --- a/docs/images/SystemStructureCommon_Unit.svg +++ b/docs/images/SystemStructureCommon_Unit.svg @@ -1,276 +1,265 @@ -Target Namespacehttp://ssp-standard.org/SSP1/SystemS ...Element Form DefaultqualifiedschemaTUnitsTypessc:TUnitUnitssc:TUnit@Attributesssc:ABaseElementTypexs:string@nameDisplayUnit0..∞Typessc:TAnnotationsAnnotationsBaseUnit1..∞ + + + + This optional element defines a display unit for the given unit. + Multiple display units may be defined. This is aligned with the + specification of display units in section 2.4.3 of the FMI 3.0 + standard. + + + + + + + This required attribute provides a name for the display unit, + which must be unique within the set of display units of the + enclosing unit definition. + + + + + + + This optional attribute specifies the factor to convert from + the unit to the display unit. Defaults to 1. + If inverse is false: displayValue = factor * value + offset + If inverse is true: displayValue = factor / value + offset + + + + + + + This optional attribute specifies the offset to convert from + the unit to the display unit. Defaults to 0. + + + + + + + This optional attribute specifies whether the conversion from + unit to display unit uses an inverse factor. Defaults to false. + If inverse is false: displayValue = factor * value + offset + If inverse is true: displayValue = factor / value + offset + + + + +