E57 Foundation API v1.1.312  Aug. 10, 2011
bool doScaling ( ) const

Get whether scaling will be performed for ScaledIntegerNode transfers.

The doScaling option only applies to ScaledIntegerNodes stored in a CompressedVectorNode on the disk (it is ignored if a ScaledIntegerNode is not involved).

As a convenience, an E57 Foundation Implementation can perform scaling of data so that the API user can manipulate scaledValues rather than rawValues. For a reader, the scaling process is: scaledValue = (rawValue * scale) + offset. For a writer, the scaling process is reversed: rawValue = (scaledValue - offset) / scale. The result performing a scaling in a reader (or "unscaling" in a writer) is always a floating point number. This floating point number may have to be converted to be compatible with the destination representation. If the destination representation is not floating point, there is a risk of violating declared min/max bounds. Because of this risk, it is recommended that scaling only be requested for reading scaledValues from ScaledIntegerNodes into floating point numbers in memory.

It is also possible (and perhaps safest of all) to never request that scaling be performed, and always deal with rawValues outside the API. Note this does not mean that ScaledIntegerNodes should be avoided. ScaledIntgerNodes are essential for encoding numeric data with fractional parts in CompressedVectorNodes. Because the ASTM E57 format recommends that SI units without prefix be used (i.e. meters, not milli-meters or micro-furlongs), almost every measured value will have a fractional part.

Postcondition:
No visible state is modified.
Returns:
true if scaling will be performed for ScaledInteger transfers.
Exceptions:
E57_ERROR_INTERNALAll objects in undocumented state
See also:
SourceDestBufferFunctions.cpp example, SourceDestBufferNumericCreate.cpp example, ScaledIntegerNode
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines