Let's assume the "writable" property from a counter value is set to false. Hence, it should not be allowed to set a value directly withthing.writeProperty(...) .
The assumption is that counter value changes are performed through action handlers. For example
thing.setActionHandler(
"increment",
(parameters) => {
return thing.readProperty("counter ").then(function(count){
let value = count + 1;
thing.writeProperty("counter", value);
});
}
);
I wonder "how" the node-wot runtime in such a case can detect whether thing.writeProperty(...) has been called through an action handler (which is allowed) compared to "directly" calling thing.writeProperty(...) (which should be forbidden)?
Note: currently in node-wot we do not check whether a property value is writable or not when performing a thing.writeProperty(...)
Let's assume the "writable" property from a counter value is set to false. Hence, it should not be allowed to set a value directly with
thing.writeProperty(...)
.The assumption is that counter value changes are performed through action handlers. For example
I wonder "how" the node-wot runtime in such a case can detect whether
thing.writeProperty(...)
has been called through an action handler (which is allowed) compared to "directly" callingthing.writeProperty(...)
(which should be forbidden)?Note: currently in node-wot we do not check whether a property value is writable or not when performing a
thing.writeProperty(...)