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: Does xPL support Binary Data types?



Howdy again,

> The protocol spec does not specify any means of transmitting binary
data.
> It is up to the individual schema definition to define, if required,
how any binary data should be sent.
> E.g. the proposed infra-red schema (ir.basic) needs to transmit raw
infra-red bytes, and the schema specification mentions using either hex or
BASE64 encoding.
> Hex encoding is the same approach as that used by xAP, whereas BASE64
provides a more efficient means of packing the binary data into the message
element.

> The general guidelines are to avoid using binary data whenever
possible, but if you do need to use it, you should include suitable
encoding mechanisms as part of your schema definition.

I'm not really a big fan of binary either, but I can see a few uses of it
(I/R codes are probably the best I've seen so far).

Since it's not desired, but may be possible, I think it would be a really
good thing to have the xPL protocol be as specific about binary support as
possible.  The reason is that folks building frameworks (like myself) can
include a binary encoder/decoder right in the framework, making it
reasonably easy for developers who need to use binary to do so.

The other thing is that as long as it's not part of the spec, there will be
the possibility of different encoding formats for different uses and that
can get ugly when trying to create generic code.

That all being said, I think it would be really helpful if the xPL powers
that be, when time permits, to consider making a ruling on this along the
lines of:

1) Binary is NEVER allowed in a xPL packet -- in any form

2) Binary is seriously discouraged, but if needed, use the following flags
and encoding for it..

3) Something else?

Note: If there was a preference for #2, I can make some fine arguments for
reusing the xAP binary encoding including a) making bridges between xPL and
xAP easier and 2) being able to reuse code in various frameworks that are
being converted over to xPL :-)

Thanks,

Gerry

--
Gerry Duprey
Ann Arbor, MI 48103
http://www.cdp1802.org



xPL Main Index | xPL Thread Index | xPL 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.