status_scheme.txt from EmStar at Krugle
Show status_scheme.txt syntax highlighted
Plan for tosnic/new_framer status scheme.
* clients of this status/config mechanism connect to a paremeterized
interface and supply a string for the name of the status parameter
and for the type that they report, and whether that value is
read/write or read only.
* requests are made by number; a request message makes one or more
requests by listing the indices of the requests, where the index is
the parameterized type# + 1. index 0 means "get directory"
for example, consider the emstarbase program:
it declares:
base/acks_enable (parameter 0)
base/stats (parameter 1)
=> STATUS(0)
<= STATUS(0,1,RW,uint8_t,base/acks_enable)
<= STATUS(0,2,RO,base_status_t,base/stats)
=> STATUS(1,2)
<= STATUS(1,1)
<= STATUS(2,{tx:45,rx:67,crcfail:89...})
=> CONFIG(1,12)
<= STATUS(1,12)
the PC side looks up the type strings in a table of known types to
figure out how to parse it. if it can't parse it, it can at least
report the string name of the type and the raw bytes to the user.
status replies are coded with a length field so that more than one
can be packed into a single packet; to support cases where multiple
status replies are pending while the UART is busy.
the parameterized status interface allows clients to cause
notification; the status values themselves are generated on demand by
callback. there is also a config callback that pushes a new value to
the client. this interface matches emstatusserver almost identically.
See more files for this project here
EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.
Project homepage:
http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other
status_scheme.txt
tosnic_framer.c
tosnic_i.h
tosnic_lower.c
tosnic_main.c
tosnic_status.c
tosnic_status_types.h
tosnic_upper.c