# Base xAAL Services A set of simple nodes providing base services on an xAAL bus Conforms to xAAL specification v0.6 Following applications are proposed as proof of concept: - schemory: A simple schema repository It sends schema, retrieved on a directory or from an url. Dependencies: any libcurl4-*-dev (e.g., libcurl4-gnutls-dev flavor) - schemaDumper: A dummy app to test schema repository. Also, another practical example for sending a request to a set of targets. - cache: A simple cache service. Dependencies: libsqlite3-dev - automalua: Automata with Lua scripts. A short introduction of the API: .Variables provided to Lua scripts (readed from config file): xAAL_Lua_baseaddr: An uuid, possibly of the first declared device. xAAL_Lua_groupId: UUID of the group to which belong the automaton xAAL_Lua_parameter: A string readed from the config file. .Functions provided to Lua scripts: xAAL_Lua_declare_device(): The Lua script must declare each device. The expected parameter is a table with following keys: addr(string) devType(string) vendorId(string) productId(string) version(string) url(string) info(string) unsupportedAttributes(table of string) unsupportedMethods(table of string) unsupportedNotifications(table of string) Note: If there is no addr, the baseaddr is used for the first registred device, and baseaddr++ for the following ones. It retruns the address of the declared device. xAAL_Lua_filter_broadcast_by_source(): First parameter is the address of the device that wants a filter. Second parameter is a table of source addresses. xAAL_Lua_filter_broadcast_by_devType(): First parameter is the address of the device that wants a filter. Second parameter is a table of devType. xAAL_Lua_set_alarm(): First parameter is the delay in seconds. Second parameter is the address of the device that wants an alarm. Third parameter is a string, a parameter bassed back at trigger .Function that must be declared in the Lua script, called by the middleware: xAAL_Lua_receive_callback(): First parameter is the address of the device that receives the message. Next parameters (strings) are the source, devType, msgType and action of the message Last parameter is a table representing the body of the message. xAAL_Lua_alarm_callback(): First parameter is the address of the device that set the alarm. Second parameter is the string provided while setting the alarm. TODO: use threads, use a restricted sandbox for lua scripts... Dependencies: liblua5.2-dev Copyright - Christophe Lohr - IMT Atlantique - 2017 - The demo applications are provided according to the terms of the GNU General Public License v3.0 and following - Dual-licenses are accepted, contact us.