This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"transmission_rules": { | |
"predicates": [{ | |
"and,eq,health.power.charging_status,charging,gte,health.power.battery,30": { | |
"result": { | |
"ttl": -1, | |
"flush": false, | |
"batch_size": 50, | |
"batch_duration": 5, | |
"preferred_channel": "http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (health.power.charging_status == ‘charging’) & (health.power.battery > 30) { | |
return result (corresponding to the predicate) | |
}else if (check for another rule if present in the list of predicate){ | |
return result (corresponding ot the predicate) | |
} | |
else { | |
return default_rule | |
} |