Made SpecialValue even more special. ... #207
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Override of "Value" property enables projection of different datatype when no suffix is used. An example would be:
SENSOR:ACC:ACTIVE -> Here the SENSOR:ACC returns a sensor object that can handle suffixes.
SENSOR:ACC without suffix would return the object of the Value property. This example returns a vector that can be used for vector operations.
SENSOR:ACC:MAG -> since the sensor object does not support the MAG suffix, the expression engine tries to use the object returned from the Value property before it fails. In this example the Value property returns a vector and thus the term is valid and will return the magnitude of the vector representing the sensor value.
The default implementation is to return the SpecialValue itself ("return this;"). This ensures no existing functionality is affected.