Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made SpecialValue even more special. ... #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

palaslet
Copy link
Contributor

@palaslet palaslet commented Nov 4, 2013

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.

…bles projection of different datatype when no suffix is used.
@Nivekk
Copy link
Owner

Nivekk commented Nov 6, 2013

I'll take a closer look at this one when I get the chance. I agree with what you're doing but I think I might want to implement it differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants