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: Query / Response type messages


  • Subject: Re: Query / Response type messages
  • From: Edward Pearson
  • Date: Thu, 01 Jan 2004 16:46:00 +0000

I've just been playing about with both of these layouts and I think
the best combines features from each.

1) It does seem a litle weird in BSC to have the response to a
request being in different schema. Makes it harder to document for
one. I think I'd prefer:

Class=xAPstatus
xAPstatus.request < request for status
xAPstatus.reply < response to request
xAPstatus.event < unsolicited notification of status
change
xAPstatus.info < unsolicited notification, nothing has
changed

I think the xAPstatus.response should be targetted at the sender of
the xAPstatus.request.

So xAPstatus.request replaces xAPcmd.status; leaving xAPcmd for
doing things that alter state. Which reminds me, xAPcmd.state might
be better as xAPcmd.set since set is a verb.

2) WHA is missing the differentiation between event and info. So at
the moment xAPjukebox spits out
xAP-Audio.Query::Playlist.Event
messages every few seconds even though the only stuff that has
changed is the report of progress through the track. PlayList.Info
would be more appropriate with Playlist.Event sent on track changes.

3) I like the way WHA puts the query back in the response message;
makes things more stateless. You could argue that it is already
implicit in BSC so no need to add it.

Edward

--- In <a
href="/group/xAP_developer/post?postID=BLML5so6dvWCqXMDGMLak8aoqeIo_MgmmvanAmm60lDsg-daCijMKYB3fH6nxPCzhFgIlEllJkm58_NUpARa7SHQE1Ue">xAP_developer@xxxxxxx</a>,
Stuart Booth <lists@x> wrote:
> Whilst I remember, I've seen 2 different systems for query/response
> type messages lately ... that I can recall anyway. You wish to
query a
> device of some status item, and have the response sent as another
xAP
> message.
>
> I've generally put both blocks in the one schema, such as the
> following templated layout:
>
> Class=Class.Type
> Query.Request
> {
> Query=TheQuery
> }
> Query.Response
> {
> Query=TheQuery (so the query is available in standalone
msg)
> Response=TheResponse
> }
>
> For example, from the WHA schema:
>
> Class=xAP-Audio.Query
> Audio.Query
> {
> Query=[mode  sleep  power  volume  balance  bass  treble]
> }
> Audio.Notification
> {
> Query=[mode  sleep  power  volume  balance  bass  treble]
> Status="Response suitable to query command"
> }
>
>
> Recently Kevin, in his Basic Status/Control schema had the
following:
>
> 66
> Class= xAPcmd to instruct a device to do something
> xAPcmd.state
> xAPcmd.status
>
> Class= xAPstatus to report state
> xAPstatus.event < it has changed
> xAPstatus.info < just an update, nothing has changed
> since last time
> 99
>
> So the response came back in a different schema, using the same
body
> layout I think?
>
> Any preferences for consistency? Given the talk recently of context
> parameters I wonder if my v.simple template schema is pants?
>
> Sorry, mushed up head right now, brain deactivated and barely
> functioning. }:(
>
> S
> --
> Stuart Booth <stuart@x...>
> xAPFramework.net - a xAP software development framework for .net
>
> <a href="http://www.xapautomation.org/";>http://www.xapautomation.org/</a>
<a href="http://www.xapframework.net/";>http://www.xapframework.net/</a>






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.