[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
RE: Context parameters within Message Bodies
- Subject: RE: Context parameters within Message Bodies
- From: Patrick Lidstone \(Personal E-mail\)
- Date: Tue, 02 Dec 2003 13:29:00 +0000
> Have you some input on this issue of context being
> carried within bodies ie where the data relates to a state
> for a specific combination of other tags ?? (implicit only
> from the schema)
>
> Eg
>
> Status
> {
> server=pop.ukusa.co.uk
> total=1
> username=kevin
> }
>
> Where two parameters define what the total relates to ??
I'm coming in late to this thread, so forgive me if some of this has
been covered already.
There are two issues here I think:
1) How to label a single status message as containing data related to
Kevin
and
2) How to allow for multiple bodies in a single message which can be
readily parsed.
For the first case, I would use:
status.kevin
{
...
}
For the second case, you may want to know which status items you've got.
There
are a number of hybrid schemes possible - here is just one. Notice the
duplication
of the user id info - it means you can, if you wish, discard the
status.info block
and e.g. display mailbox status by simply breaking apart each
status.user.x block.
Perhaps this could be addressed by:
status.info
{
user.0=kevin
user.1=jim
user.2=fred
}
status.user.0
{
...
user=kevin
...
}
status.user.1
{
...
user=jim
...
}
> And more generally
>
>
> X10.status
> {
> Device=A10
> State=ON
> }
>
> Vs
>
> X10.status
> {
> A10=ON
> }
I personally (and I don't think there is necessarily a cut and dried
answer to this) favour
the first form because it is generic. The second form assumes (a) that
you are using explicit X10 addressing, not some alias for the device and
(b) that the receiver has an implicit knowledge
of how to construct an X10 address. Conversely, the first form could be
used for generic control
of any stateful device, and a receiver doesn't have to know diddly squat
about the mechanics of
addressing/identifying X10 devices.
HTH, do tell me if I have missed the point,
Patrick
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|