{ "title": "basic.basic", "description": "Generic schema for any devices", "lang": "en", "documentation": "http://recherche.imt-atlantique.fr/xaal/documentation/", "ref": "http://recherche.imt-atlantique.fr/xaal/documentation/basic.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.", "attributes": { "devType": { "description": "The name of the schema to which the device obeys", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*.[a-zA-Z][a-zA-Z0-9_-]*$" } }, "address": { "description": "The 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}$" } }, "vendorId": { "description": "Id of the vendor assigned by the xAAL bureau", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "productId": { "description": "Id of the product assigned by the vendor", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "version": { "description": "Version or revision of the product assigned by the vendor", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "hwId": { "description": "Some hardware Id of the device (e.g., low-level addresses, serial number)", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#" } }, "groupId": { "description": "Id of the group of devices to which it belongs, if any", "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}$" } }, "url": { "description": "Url of a website to get more information", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string", "format": "uri" } }, "info": { "description": "Additional info, if any, about the device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "unsupportedAttributes": { "description": "List attributes of the schema that are not supported by this device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } } }, "unsupportedMethods": { "description": "List methods of the schema that are not supported by this device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } } }, "unsupportedNotifications": { "description": "List notifications of the schema that are not supported by this device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } } }, "busAddr": { "description": "The IPv4 or IPv6 multicast address of the xAAL bus used by the device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string", "oneOf": [ { "format": "host-name" }, { "format": "ipv4" }, { "format": "ipv6" } ] } }, "busPort": { "description": "The UDP port of xAAL bus used by the device", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "integer", "minimum": 0, "maximum": 65535 } }, "hops": { "description": "The hops used for sending multicast packets", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "integer", "minimum": 0, "maximum": 255 } } }, "methods": { "isAlive": { "description": "Check if the device is alive", "parameters": { "devTypes": { "description": "Array of wanted devType(s)", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*.[a-zA-Z][a-zA-Z0-9_-]*$", "minItems": 1, "uniqueItems": true } } } }, "relatedAttributes": [ ] }, "getDescription": { "description": "Get the description of the device", "parameters": { "vendorId": { "description": "Id of the vendor assigned by the xAAL bureau", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "productId": { "description": "Id of the product assigned by the vendor", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "version": { "description": "Version or revision of the product assigned by the vendor", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "hwId": { "description": "Some hardware Id of the device (e.g., low-level addresses, serial number)", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#" } }, "groupId": { "description": "Id of the group of devices to which it belongs, if any", "unit": "", "direction": "out", "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}$" } }, "url": { "description": "Url of a website to get more information", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string", "format": "uri" } }, "info": { "description": "Additional info, if any, about the device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "unsupportedAttributes": { "description": "List attributes of the schema that are not supported by this device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } } }, "unsupportedMethods": { "description": "List methods of the schema that are not supported by this device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } } }, "unsupportedNotifications": { "description": "List notifications of the schema that are not supported by this device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" } } } }, "relatedAttributes": [ ] }, "getAttributes": { "description": "Return attributes of the device", "parameters": { "attributes": { "description": "List of wanted attributes", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" }, "additionalItems": false } } }, "relatedAttributes": [ ] } }, "notifications": { "alive": { "description": "The device announce that it is alive", "parameters": { "timeout": { "description": "Delay max before next alive message", "unit": "s", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "number", "minimum": 0 } } } }, "attributesChange": { "description": "Report attributes that have changed", "parameters": { } }, "error": { "description": "An error has been detected", "parameters": { "description": { "description": "Textual description of the error", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "string" } }, "code": { "description": "Numeric code of the error", "unit": "", "type": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "integer" } } } } } }