Bristol Wearable Computing

[ Home | Plans | Meetings | Members | Search | Papers | Links | CyberWear | LocoSoft]

Note Server


A note consists of a data file of any type together with a set of attributes. A common example of a note would be an audio file with attributes to say when it should be played back. However, the definition of a note is general enough that it could represent almost anything.

The Meaning of a Note

From the point of view of the Note Server, a note has no meaning at all. The note server simply acts as a search engine. Meaning is attached to notes in the various Managers which sit above the note server and use its services. Initially, there will be managers to handle the recording and rendering of notes, sending and receiving over the footbridge link, and also deletion and temporary suspension of notes. Adding new managers is one of the primary ways in which locomedia and the Cyberjacket can be expanded.

Note Server Functions

Functions are provided to add or remove notes from the Note Server and to add and remove individual attributes from a note. The function which will be most used by things like the Render Manager is the `Search' function which provides a general wildcard search on attributes. Any note which has an attribute fitting the search will be returned. The search returns only the id of the notes to reduce traffic and managers then use either GetFile or GetAttributes to find out more about the matching notes.

Note Server Protocol

Request Name Request Form Response Forms Description
Add Note [<BL>] AddNote <BL> <filename> [<BL>] <NL> <note id> <SP> +OK <NL>

-NO <NL>

Add a note whose content is in the file <filename> to the Note Server. Initially, the note will not have any attributes. These can be added using AddAttributes. If successful, an id for the note is returned which is unique on this server.
Remove Note [<BL>] RemoveNote <BL> <note id> [<BL>] <NL> +OK <NL>
-NO <NL>
Remove the note with the given unique id from the Note Server.
Add Attribute [<BL>] AddAttribute <BL> <note id> <BL> <prefix> <BL> <action> <BL> <DV expression> [<BL>] <NL> +OK <NL>
-NO <NL>
Add an attribute to the attribute list of the note with the given id. The attribute prefix, action and matching expression will be exactly as given.
Remove Attribute [<BL>] RemoveAttribute <BL> <note id> <BL> (<prefix> | "*") <BL> (<action> | "*") <BL> (<DV expression> | "*") [<BL>] <NL> <number removed> <SP> +OK <NL>

-NO <NL>

Either remove an attribute from the note with given <note id> by specifying its prefix, action and matching expression, or leave any or all of these open with the wildcard * to remove any attributes which match. By using * * *, all attributes can be removed.
Get File [<BL>] GetFile <BL> <note id> [<BL>] <NL> <filename> <SP> +OK <NL>

-NO <NL>

Get the <filename> containing the content of the note specified by <note id>.
Get Attributes [<BL>] GetAttributes <BL> <note id> [<BL>] <NL> {<prefix> <SP> <action> <SP> <DV expression> <NL>} +OK <NL>

-NO <NL>

Get the full list of attributes for the note specified by <note id> as a list separated by newline characters and terminated by "+OK".
Search [<BL>] Search <BL> (<prefix> | "*") <BL> (<action> | "*") <BL> (<D expression> | "*" | "All") <BL> (<DV expression> | "*") [<BL>] <NL> {<note id> <NL>} +OK <NL>

-NO <NL>

Perform a general purpose search on the note database, returning just the ids of matches. <prefix> and <action> are exactly as given in AddAttribute. <D expression> represents the sensed contexts, <DV expression> the user contexts, and both of these must match against at least one attrbute in a note for it to satisfy the search. In addition, <D expression> must find registered context drivers to give values to its domains before matching occurs. Wildcards are allowed in all parts, and a special "All" is allowed in place of <D expression> to match against all currently registered contexts.
Search Attribute [<BL>] SearchAttribute <BL> (<prefix> | "*") <BL> (<action> | "*") <BL> (<D expression> | "*" | "All") <BL> (<DV expression> | "*") [<BL>] <NL> {<note id> <SP> <prefix> <SP> <action> <SP> <DV expression> <NL>} +OK <NL>

-NO <NL>

As standard Search above, but instead of just returning the note id of each match, it also returns the attribute which caused the match.

Protocol Notes

No part of the protocol described above is case sensitive. getattributes is equally as valid as GetAttributes. The syntax is in BNF form. In addition, the notation (a | b) is used to mean that either a or b should appear in the form (The brackets and "|" symbol should not appear).

Initial boolean expression syntax
<X expression> ::= "(" <X exp> ")"
<X exp> ::= X | <X exp> <or> <X exp> | "(" <X exp> ")"
<or> ::= "|"
Final boolean expression syntax
<X expression> ::= "(" <X exp> ")"
<X exp> ::= X | <X exp> <or> <X exp> | <X exp> <and> <X exp> | <not> <X exp> | "(" <X exp> ")"
<or> ::= "|"
<and> ::= "&"
<not> ::= "!"
Types used in boolean expressions above
<DV> ::= <domain> | <domain>:<value>
<D> ::= <domain>
Definitions of simple types
<prefix> ::= "Yes" | "No"
<note id> ::= An integer id which is unique for this jacket/server (but not unique in the world).
<filename> ::= The full pathname of a note file.
<action> ::= Any string
"*" ::= The standard wildcard (matches on anything).
"All" ::= Use all available context drivers to form the sensed context expression.
<SP> ::= A single space character.
<NL> ::= A single newline character
<BL> ::= One or more whitespace characters (space, tab or newline).

Protocol Examples: Managers which use the Note Server

Documentation coming soon.

  1. How to use the note server.
  2. better description of the meaning of the table above.

Back to Notes and Domains main page.

unicrest.gif (4191 bytes)

The material displayed is provided 'as is' and is subject to use restrictions.
For problems or questions regarding this web contact Cliff Randell.
Last updated: January 14, 2000.
logoep.gif (1404 bytes)
ęCopyright Hewlett-Packard 1997-2000.