contextawaretuples
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| contextawaretuples [2010/10/20 17:07] – cfscholl | contextawaretuples [2010/10/20 17:48] (current) – cfscholl | ||
|---|---|---|---|
| Line 43: | Line 43: | ||
| In this case the tuple has type inRoom and one field " | In this case the tuple has type inRoom and one field " | ||
| - | In order to make sure only those people | + | In order to make sure that only those devices |
| < | < | ||
| Line 50: | Line 50: | ||
| [Tuple(location , ?loc), WithinBoundary(roomArea , ?loc)]; | [Tuple(location , ?loc), WithinBoundary(roomArea , ?loc)]; | ||
| </ | </ | ||
| - | |||
| - | |||
| ==== 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. | ||
| < | < | ||
| def cat := makeCatSystem(); | def cat := makeCatSystem(); | ||
| - | cat.whenever: | + | cat.whenever: |
| | | ||
| } outOfContext: | } outOfContext: | ||
| Line 67: | Line 67: | ||
| **Context-Aware Tuples for the Ambient**, C. Scholliers, E. Gonzalez Boix, W. De Meuter, T. D' | **Context-Aware Tuples for the Ambient**, C. Scholliers, E. Gonzalez Boix, W. De Meuter, T. D' | ||
| - | the 12th International Symposium on Distributed Objects, Middleware, and Applications (DOA' | + | the 12th International Symposium on Distributed Objects, Middleware, and Applications (DOA' |
contextawaretuples.1287587274.txt.gz · Last modified: (external edit)
