{ "title": "metadatadb.basic", "description": "Simple metatdata database to manage tags associated with devices", "lang": "en", "documentation": "http://recherche.imt-atlantique.fr/xaal/documentation/", "ref": "http://recherche.imt-atlantique.fr/xaal/documentation/metadatadb.basic", "license": "Copyright Christophe Lohr IMT Atlantique 2017 - 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", "methods": { "getDevices": { "description": "Get the list of known devices", "parameters": { "key": { "description": "Optional key to get only devices having this key", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "value": { "description": "Optional value to get only devices having this value for any of its keys, or for the above mentioned key if present", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "devices": { "description": "Addresses of requested devices", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "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}$" }, "uniqueItems": true } } }, "relatedAttributes": [ ] }, "getKeysValues": { "description": "Get keys-values associated with a device", "parameters": { "device": { "description": "Address of the device", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/draft-04/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}$" } }, "keys": { "description": "Optionnal list of wanted keys; returns all if not provided", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string" } } }, "map": { "description": "Map of keys-values associated with the device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": { "type": "string" } } } }, "relatedAttributes": [ ] }, "getValue": { "description": "Get the value of a key of a device", "parameters": { "device": { "description": "Address of the device", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/draft-04/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}$" } }, "key": { "description": "Name of the key", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "value": { "description": "Value of the key of the device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } } }, "relatedAttributes": [ ] }, "addKeysValues": { "description": "Add non-existing keys-values on a device", "parameters": { "device": { "description": "Address of the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/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}$" } }, "map": { "description": "Map of keys-values to be associated with the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": { "type": "string" } } } }, "relatedAttributes": [ ] }, "updateKeysValues": { "description": "Update keys-values on a device. Use the null value to delete a key. Use a null map to delete all keys-values of a device. Devices with no more key-value are withdrawn.", "parameters": { "device": { "description": "Address of the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/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}$" } }, "map": { "description": "Map of keys-values to be associated with the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "oneOf": [ { "type": "object", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, { "type": "null" } ] } } }, "relatedAttributes": [ ] } }, "notifications": { "keysValuesChanged": { "description": "Report keys-values that have changed on a device", "parameters": { "device": { "description": "Address of the device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/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}$" } }, "map": { "description": "Map of keys-values to be associated with the device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } } } } } } }