mita icon indicating copy to clipboard operation
mita copied to clipboard

Allow read-only access to configuration items

Open wegendt-bosch opened this issue 6 years ago • 0 comments

At the moment users cannot access configuration items (e.g. the sensor range of an accelerometer) in their code. We should allow fully-qualified, read-only access to configuration items, similar to VCI. For example:

package main;

import platforms.xdk110;

setup accelerometer {
    range = BMA280_8g;
}

setup foonet : WLAN {
    PSK = "foonet";
    SSID = "blabla";
}

every WLAN.connected {
    if(foonet.useDHCP) {
        print("Connected using dynamic address\n");
    }
}

every 100 milliseconds {
    if(accelerometer.range == BMA280Range.BMA280_8g) {
        // do something
    }
}

wegendt-bosch avatar Apr 25 '18 14:04 wegendt-bosch