The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Weather, and a new xAPplication coming on


  • Subject: Re: Weather, and a new xAPplication coming on
  • From: "David Buckley" <db@xxxxxxxxxxx>
  • Date: Tue, 12 Oct 2004 20:00:08 -0000



--- In xAP_developer@xxxxxxx, Kevin Hawkins <lists@u...> wrote:
> HI - Looking forward to seeing this - ( I think we spoke about this
> almost a year ago but lost touch so I'm glad it's materialised)

err - Kevin - It wasn't me you discussed this with :-)

> One concern I have is that we are again seeing the issue where
> one paramater  (in the below example the forecastdate) is acting
> as a key value defining the CONTEXT for all the other
> collective data. However from just  examining the message it is
> not possible to ascertain which parameter(s) set the CONTEXT
> and which contain the related DATA . A human can interprest
> these often but not a parser.

This is a valid general concern.  You are correct, parsers are syntax
directed tools, and once you have context you are into semantics.
generally, parsers dont do semantics at all well.

> Also I am concerned by the complexity  of parsing such a message
> as it requires many iterations through a single block

Oh no - you should never multiply parse the message.  What you have to
do is store the contents of the message as you parse it - once, and
all the way through to the syntax-error free end - in some local
format.  This isnt unique to the Weather.Report schema - even the
humble X10 schema suffers from this.

device=A1,A2,B1,B2

easy. generate A,1,2,command,B,1,2,command

device=A1,B2,A2,B1

on-the-fly - A,1,command,B,2,command,A,2,command,B,1,command

Try and do this on-the-fly and you are stuffed.  You are required by
the schema notes to (sensibly) command devices as housecode sets, but
there is no requirement that the devices are in housecode order.
Unless you parse the entire thing and then act upon it, your code will
never underand that there are two sets required, not four.

Does anyone (apart from the connectors) actually generate multiple X10
devices?









xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.