SALT : Simple Application Logic description using Transducers Date : 2011/07/04 Version : 1.0 Author: Sylvain Cherrier (c) 2011 This document described SALT language used by D-LITe (Distributed Logic for Internet of Things sErvices). D-LITe is a framework for organising a Choreography of Services over Wireless Sensors Network mostly (but not exlusively). It aims to standardize a way to deploy a simple distributed application over heterogenous hardwares. SALT use CoAP, which is very compatible with REST approach. SALT use the 4 REST commands (GET, PUT, POST and DELETE) GET : GET is used to describe the node. It is used when discovering the node. GET must give node's name, and its real states and messages (real states are states that changer REALLY something in the real world, i-e opening something, switching on, etc...) REAL messages are messages generating by the hardware when something REALLY happens in the world (for example, somebody touch a button, or the temperature has reach a certain level, etc) REAL messages are generated by Sensors, and REAL states are managed by actuators. Typical GET messages : name=TelosB msg=push state=dark state=light (data names are : name, msg, and state. Values are given with =. Line feed after each value) A timer service could be describe for example by : name=Timer msg=time PUT : PUT is used to configure the node. A node is configured when it has its list of observers (list of nodes that will received all messages generated by our FST), its list of rules (description of its reaction when receiving a message, the impact on its state, and the message to be sent to observers), and then its initial state before starting the choreography. Typical PUT message : order=init&state=rlsd order=rule&state=rlsd&msg=push&Nstate=prsd&Smsg=up order=rule&state=prsd&msg=push&Nstate=rlsd&Smsg=down order=link&uri=[fe80::f0:1:303]:61616/dlite Three orders : init, rule and link... - init is used to give the initial state... (rlsd in our example). Variable's name is state. - rule is used to give each rule... it uses 4 variables (state, msg, Nstate, Smsg which stand for original state, received msg, (and if it matches : New state, and Send Message) - link is used to give Observers' list. uri is the variable's name... Format used is standard URI format. DELETE : Used to flush all D-LITe configuration.... no real content, ignored... POST : POST is used by nodes when sending messages to their Observers. Message's content is given by the FST. Variable's name is input. Typical POST message : input=up In that example, it is a message send by a FST applying rules given before (in the PUT section) when node is in rlsd's state, and has just received a "push" message.