{ "title": "powermeter.basic", "description": "Simple powermeter", "lang": "en", "documentation": "http://recherche.imt-atlantique.fr/xaal/documentation/", "ref": "http://recherche.imt-atlantique.fr/xaal/documentation/powermeter.basic", "license": "Copyright Christophe Lohr IMT Atlantique 2019 - Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.", "extends": "basic.basic", "attributes": { "power":"power_t", "energy":"energy_t", "devices":"devices_t" }, "methods": { "get_attributes": { "description": "Return attributes of the device", "in": { "attributes":"attributes_t" }, "out": { "power":"power_t", "energy":"energy_t", "devices":"devices_t" } } }, "notifications": { "attributes_change": { "description": "Report attributes that have changed", "out": { "power":"power_t", "energy":"energy_t", "devices":"devices_t" } } }, "datamodel": { "power_t": { "description": "Current power", "unit": "W", "type": "data = number" }, "energy_t": { "description": "Energy used or produced since cycle beginning", "unit": "kWh", "type": "data = number" }, "devices_t": { "description": "List of devices concerned with this powermeter", "type": "data = [ * #6.37(bstr .size 16) ]" }, "attributes_t": { "description": "List of wanted attributes", "type": "data = [ ? \"power\", ? \"energy\", ? \"devices\" ]" } } }