Skip to content
Snippets Groups Projects
user avatar
clohr authored
git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/C/branches/version-0.7@2287 b32b6428-25c9-4566-ad07-03861ab6144f
5d6bb1b7
History
# Base xAAL Services
A set of simple nodes providing base services on an xAAL bus
Conforms to xAAL specification v0.7


## Devices
Following  applications are proposed as proof of concept:

- 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

- metadatadb: A simple metadata database to store and retreive users tags
  about devices of its home-automation facility.


## Copyright
- Christophe Lohr - IMT Atlantique - 2019
- 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.