Bristol Wearable Computing

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


Device Drivers

Definition

A device driver is simply any process that offers a service to other running applications.  A device driver may provide a service to render, transform or to create data.  All device drivers have to register with the device manager to advertise the service(s) they provide, and to also specify the name of the socket where processes can connect to in order to access the services.

There are three header files that aid in accessing the device manager in order to register or ask about other processes, and these should be used by device drivers in order to communicate with the device manager (Although in special cases it may be useful to connect to the device manager directly). 

All device drivers must also use a single common protocol to communicate with other processes.  This protocol is defined next.

Interprocess Protocol

Client Requests

All device drivers must create, provide and poll a socket on which service requests can arrive.  This socket must then be able to support at least the following operations.

Server Responses

Device drivers should respond to a request in the following ways.

Request Response Description

<Service name> <SP> [<Data size in bytes><NL>]<Data><NL>

[<Data size in bytes>]<Data><NL>
[[<Data size in bytes>]<Data><NL>]
+OK<NL>

 

The size of the data may be returned, followed by the requested data.  A new line character must be present at after the returned data.

Optionally more than one data item maybe returned.

The string '+OK<NL>' shows that there are no more items of data to be read.

/DONE<NL> None The device driver should close it's socket and not try to read any further data.
/SHUTDOWN<NL> None The device driver should close it's socket and not try to read any further data from there, and the device driver should then quit as soon as possible.

Service Names

Description

Service names are the means by which a device can describe the functions it can offer to other devices. Service names will be registered with the device manager so that other devices may at any time ask where a service may be found.

Definition

Char ::= any printable ANSI character, excluding '+' and '-'
String ::= Char [String]
ServiceType ::= /INPUT | /OUTPUT | /TRANSFORM | /BOOLEAN/MATCH | /PROCESS
ServicePart ::= /String
ServiceLength ::= ServicePart [ServiceLength]
ServiceName ::= ServiceType ServiceLength

Examples

All the following service names are valid.

Defined Services

The following is a list of services and names that have already been decided upon and may be requested by any device.

/INPUT/LOCATION/ABSOLUTE Raw GPS co-ordinate data.
/BOOLEAN/MATCH/LOCATION/ABSOLUTE Match raw GPS co-ordinate data with the current GPS position
/INPUT/LOCATION/NAME Returns the current domains that the user is physically located in.
/INPUT/LOCATION/TEXT Returns a text string that describes the users current location
/BOOLEAN/MATCH/LOCATION/NAME Match place names.
/TRANSFORM/LOCATION/ABSOLUTE/2/NAME Takes absolute positional data and replys with a place/street name
/OUTPUT/TEXT/AUDIO Rendering of text to audio using TTS.
/OUTPUT/PAGE/Nino Rendeing of a page to the Nino
/PROCESS/NotesServer The Notes Server.

Note: Other people may add other service names here as they feel appropriate.


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.