{ "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 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", "methods": { "get_devices": { "description": "Get the list of known devices; possibly filtered by a key, a (non-null) value, or both", "in": { "key":"key_t", "value":"value_t" }, "out": { "key":"key_t", "value":"value_t", "devices":"devices_t" } }, "get_keys_values": { "description": "Get the map of keys-values associated with a given device; possibly restricted to a list of wanted keys", "in": { "device":"device_t", "keys":"key_t" }, "out": { "device":"device_t", "map":"map_t" } }, "get_value": { "description": "Get the value of a key of a device", "in": { "device":"device_t", "key":"key_t" }, "out": { "device":"device_t", "key":"key_t", "value":"value_t" } }, "update_keys_values": { "description": "Update keys-values on a device; non-existing keys are added; the null value deletes a key; a null map deletes all keys-values of a device; devices with no more key-value are withdrawn of the DB", "in": { "device":"device_t", "map":"map_t" } } }, "notifications": { "keys_values_changed": { "description": "Report keys-values that have changed on a device; the null value indicates a deleted a key; a null map indicates that all keys are deleted", "out": { "device":"device_t", "map":"map_t" } } }, "datamodel": { "key_t": { "description": "Key name (of a value) associated with a device", "type": "data = tstr" }, "keys_t": { "description": "List of keys", "type": "data = [ * tstr ]" }, "value_t": { "description": "Value (of a key) associated with a device", "type": "data = tstr / null" }, "map_t": { "description": "Map of keys-values associated with the device", "type": "data = { tstr => tstr } / null" }, "device_t": { "description": "Address of a device", "type": "data = #6.37(bstr .size 16)" }, "devices_t": { "description": "List of devices", "type": "data = [ + #6.37(bstr .size 16) ]" } } }