[Xml1-wire-devel] Tagging scenarios
Status: Planning
Brought to you by:
vinculum
From: Sean K. <ke...@ad...> - 2000-11-07 17:14:58
|
Folks: To try to focus my thoughts on requirements, I'm trying to come up with some actual scenarios where tagging information is useful. Here are a few basic ones ... what do you think? Application: DS2406's arranged on a small bus in a digital video server used to toggle control points in diagnostic mode. Software control needs to determine what DS2406 to toggle based on what control point it's connected to. It looks up in its storage that I/O board A's TP3 is controlled by switch 12.00.01.1a.30.11.5f. It instructs the busmaster to match and toggle the switch. The mapping here is from object-to-device. Application: DS18S20's in long bus on arranged throughout a building. Software control performs an alarming device search, and one DS18S20 appears. It maps the device ID 10.00.00.5f.a3.20.6c to the thermometer in office number 5 on level 3, and takes appropriate action. The mapping here is from device-to-object. In both cases, the tagging ties a device to a rather unique object; a board identifier and test point in one case, a room number and floor number in another. Defining the metadata for these kinds of bindings won't be easy since they're so application-specific. I'm almost tempted to say that tagging schema should be completely generic instead. Consider: <!-- A bus consists of zero or more devices --> <!ELEMENT bus (device*)> <!-- A device has an ID and a maps to an object --> <!ELEMENT device (id, object)> <!-- A device has an attribute that indicates its type. This is redundant since the ID has the family code which also indicates the type. --> <!ATTLIST device type (switch | thermometer | memory | serialNum | dualSwitch) #REQUIRED)> <!-- A device ID, the syntax is 8 hexadecimal numbers --> <!ELEMENT id (#PCDATA)> <!-- A serialized Java object, encoded in base-64 --> <!ELEMENT object (#PCDATA)> Giving documents that look like this: <bus> <device type="switch"> <id>12.00.01.1a.30.11.5f</id> <object>6ejoa*1had...</object> </device> <device type="switch"> <id>12.00.01.29.35.08.cd</id> <object>koi=ijfe12...</object> </device> ... In the alarming temperature case, mapping the device ID to a serialized Java object is particularly powerful because the object can be the thing responsible for taking action on adjusting the temperature in that particular room. No other knowledge is needed in tagging software. But this doesn't solve the reverse mapping problem in the first scenario. Thoughts? --Sean |