{ "title": "cache.basic", "description": "Simple cache that can be queried about attributes of devices", "lang": "en", "documentation": "http://recherche.telecom-bretagne.eu/xaal/documentation/", "ref": "http://recherche.telecom-bretagne.eu/xaal/documentation/cache.basic", "license": "Copyright Christophe Lohr Telecom Bretagne 2014 - 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": "any.any", "methods": { "getDeviceAttribute": { "description": "Get the value of a device's attribute", "parameters": { "device": { "description": "The address of the device", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } }, "attribute": { "description": "Name of the wanted attribute", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } }, "value": { "description": "Last known value of the attribute", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#" } }, "date": { "description": "Date of the last known value of the attribute", "unit": "Seconds since 01/01/1970", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#", "type": "integer", "minimum": 0 } } }, "relatedAttributes": [ ] }, "getDeviceAttributes": { "description": "Get all known atributes of a device", "parameters": { "device": { "description": "The address of the device", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } }, "attributes": { "description": "Array of known attributes", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" }, "value": { }, "date": { "type": "integer", "minimum": 0 } } } } } }, "relatedAttributes": [ ] } } }