User Tools

Site Tools


contextawaretuples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
contextawaretuples [2010/10/20 17:08]
cfscholl
contextawaretuples [2010/10/20 17:48] (current)
cfscholl
Line 50: Line 50:
 [Tuple(location , ?loc), WithinBoundary(roomArea , ?loc)]; [Tuple(location , ?loc), WithinBoundary(roomArea , ?loc)];
 </code> </code>
- 
- 
  
 ==== Context Consumer ==== ==== Context Consumer ====
 +Because the context provider specifies the rules in order to read its tuples the code for the context consumer is very easy.
 +The context consumer only has to read a tuple of type inRoom and register a listener for when such a tuple is read. In this case the listener will simply print that the user is currently in a particular room. The programmer can also react on the disappearance of a tuple by registering an outOfContext listener. In this case the listener will simply print that the user has move out of the room.
  
 <code> <code>
 def cat := makeCatSystem(); def cat := makeCatSystem();
-cat.whenever: tuple(inRoom , ?name) read:+cat.whenever: Tuple(inRoom , ?name) read:
      display("You are in room " + name);      display("You are in room " + name);
 } outOfContext: } outOfContext:
Line 67: Line 67:
  
 **Context-Aware Tuples for the Ambient**, C. Scholliers, E. Gonzalez Boix, W. De Meuter, T. D'Hondt. In Proceeding of **Context-Aware Tuples for the Ambient**, C. Scholliers, E. Gonzalez Boix, W. De Meuter, T. D'Hondt. In Proceeding of
-the 12th International Symposium on Distributed Objects, Middleware, and Applications (DOA'10), LNCS. Srpinger Verlang, October 2010. ([[ http://prog.vub.ac.be/Publications/2010/vub-tr-soft-10-19.pdf | pdf]])+the 12th International Symposium on Distributed Objects, Middleware, and Applications (DOA'10), LNCS. Springer Verlang, October 2010. ([[ http://prog.vub.ac.be/Publications/2010/vub-tr-soft-10-19.pdf | pdf]])
contextawaretuples.1287587329.txt.gz ยท Last modified: 2010/10/20 17:10 (external edit)