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]

Allowable characters in xAP parameter values


  • Subject: Allowable characters in xAP parameter values
  • From: Kevin Hawkins <lists@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 29 Mar 2005 15:00:26 +0100


--------------070503060607050903080502
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

The xAP spec says...

*
The delimiter determines the method of value encoding.
o
A =  (equals, ASCII character 61 decimal) indicates that a
value is encoded as an ASCII string. This is the preferred
encoding format.
o
A !  (pling, ASCII character 33 decimal) determines that a
value is encoded as an ASCII hex representation. This allows
the broadcast of raw binary data. Whilst unavoidable under
certain circumstances, it's use is discouraged because of
the issues with portability (numeric representations differ
across processor types).
*
The value is encoded either as printable ASCII characters (where
the delimiter is = ) or upper case ASCII hex (where the delimiter
is ! ).
*
ASCII character strings (denoted by the delimiter = ) may
represent any arbitrary value, including integer and floating
point numbers. Embedded spaces are permitted.
*
ASCII hex strings (denoted by the delimiter !)  are case sensitive
and should use upper case. (ie. 0A is acceptable and represents
decimal value 10, 0a is illegal and has no meaning). Embedded
spaces are not permitted.



So just to clarify this am I correct that *values* can only contain
ASCII characters 0x20 to 0x7E  inclusive and data outside his must be
sent with !   ??

BTW "{" and "}" fall within this range  but I dont
think that is a
problem is it for well written xAP applications  ??  (as values can only
end with chr(10))

Is there an absolute feeling against allowing 8 bit data to appear in
char values  except chr(10) ?  <ducks> as me expects there is ;-).
Bear
in mind serial data on an RS232 line where XON/XOFF flow control
problems exist could be encoded differently.

Does UTF8 encoding adhere to  this range 0x20 to 0x7E  ??

I wonder what happens with ! currently - do people handle this OK and
will it break existing apps ?? (it shouldnt I guess but I feel certian
it will ).  In the OCX  for example is ! handled transparently and
returns a string containing the 8 bit values ??

Reason is our first 'serial data' schema is imminent for the RS232
serial port on the Netiom, and we are talking about whether there should
be an 'auto' mode where the serial RS232 data appears as
data=whatever   but automatically changes to data!A0B1C1FF20  if there
is content outside the 0x20 to 0x7E range. Is that transparent to
everyone currently   ??

Would it work via apps built with the OCX ?
Will it work with HomeSeer to get values into devices ?
Will it work with all the hubs ?

I guess it should work with everything but I know I personally haven't
allowed for it so you couldn't send

STATE=ON   or STATE!6F6E and it work inside a BSC command to my xAP
C-Bus gateway    ........    maybe its acceptable just to know that the
TEXT=  value in BSC should allow for TEXT!   ...  I know ! is
discouraged but it's a necessary evil to support  serial data eg to
drive a serial  lcd display and to send a <CR> <FF> or
<LF> character or
the CHR(254) escape character so often used in serial lcd control.

Kevin

--------------070503060607050903080502
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">


The xAP spec says...<br>
<ul>
<li>
<div>The delimiter determines the method of value encoding.
</div>
<ul>
<li>
<div>A<font color="fuchsia">&nbsp;=&nbsp;
</font>(equals, ASCII
character 61 decimal) indicates that a value is encoded as an ASCII
string. This is the preferred encoding format. </div>
</li>
<li>
<div>A<font
color="fuchsia">&nbsp;!</font>&nbsp; (pling,
ASCII character
33 decimal) determines that a value is encoded as an ASCII hex
representation. This allows the broadcast of raw binary data. Whilst
unavoidable under certain circumstances, it's use is discouraged
because of the issues with portability (numeric representations differ
across processor types). </div>
</li>
</ul>
</li>
<li>
<div>The value is encoded either as printable ASCII characters
(where the delimiter is<font
color="fuchsia">&nbsp;=</font> ) or upper case
ASCII hex (where the delimiter is<font
color="fuchsia">&nbsp;!</font> ). </div>
</li>
<li>
<div> ASCII character strings (denoted by the delimiter<font
color="fuchsia">&nbsp;= <font
color="black">) </font></font>may represent
any arbitrary value, including integer and floating point numbers.
Embedded spaces are permitted. </div>
</li>
<li>
<div> ASCII hex strings (denoted by the delimiter<font
color="fuchsia">&nbsp;!</font><font
color="fuchsia"><font
color="black">)&nbsp;</font></font>&nbsp;are
case sensitive and should use upper case. (ie. 0A is acceptable
and&nbsp;represents decimal value 10, 0a is illegal and has no
meaning).
Embedded spaces are not permitted.</div>
</li>
</ul>
<br>
<br>
So just to clarify this am I correct that <b>values</b> can
only
contain ASCII characters 0x20 to 0x7E&nbsp; inclusive and data outside
his
must be sent with !&nbsp;&nbsp; ??<br>
<br>
BTW "{" and "}" fall within this range&nbsp; but I
dont think that is a
problem is it for well written xAP applications&nbsp; ??&nbsp; (as
values can
only end with chr(10))<br>
<br>
Is there an absolute feeling against allowing 8 bit data to appear in
char values&nbsp; except chr(10) ?&nbsp; &lt;ducks&gt; as
me expects there is
;-). Bear in mind serial data on an RS232 line where XON/XOFF flow
control problems exist could be encoded differently.&nbsp; <br>
<br>
Does UTF8 encoding adhere to&nbsp; this range 0x20 to 0x7E&nbsp;
??<br>
<br>
I wonder what happens with ! currently - do people handle this OK and
will it break existing apps ?? (it shouldnt I guess but I feel certian
it will ).&nbsp; In the OCX&nbsp; for example is ! handled
transparently and
returns a string containing the 8 bit values ??&nbsp;&nbsp;
<br>
<br>
Reason is our first 'serial data' schema is imminent for the RS232
serial port on the Netiom, and we are talking about whether there
should be an 'auto' mode where the serial RS232 data appears
as&nbsp;&nbsp;
data=whatever&nbsp;&nbsp; but automatically changes to
data!A0B1C1FF20&nbsp; if there
is content outside the 0x20 to 0x7E range. Is that transparent to
everyone currently&nbsp;&nbsp; ??&nbsp; <br>
<br>
Would it work via apps built with the OCX ?<br>
Will it work with HomeSeer to get values into devices ?<br>
Will it work with all the hubs ?<br>
<br>
I guess it should work with everything but I know I personally haven't
allowed for it so you couldn't send <br>
<br>
STATE=ON&nbsp;&nbsp; or STATE!6F6E and it work inside a BSC command
to my xAP
C-Bus gateway&nbsp;&nbsp;&nbsp;
........&nbsp;&nbsp;&nbsp; maybe its acceptable just to know
that the
TEXT=&nbsp; value in BSC should allow for TEXT!&nbsp;&nbsp;
...&nbsp; I know ! is
discouraged but it's a necessary evil to support&nbsp; serial data eg
to
drive a serial&nbsp; lcd display and to send a &lt;CR&gt;
&lt;FF&gt; or
&lt;LF&gt; character or the CHR(254) escape character so often used
in
serial lcd control.<br>
<br>
&nbsp;&nbsp; Kevin<br>


<br>

<!-- **begin egp html banner** -->

<table border=0 cellspacing=0 cellpadding=2>
<tr bgcolor=#FFFFCC>
<td align=center><font size="-1"
color=#003399><b>Yahoo! Groups
Sponsor</b></font></td>
</tr>
<tr bgcolor=#FFFFFF>
<td align=center width=470><table border=0 cellpadding=0
cellspacing=0> <tr> <td align=center><font face=arial
size=-2>ADVERTISEMENT</font><br><a href="http://us.ard.yahoo.com/SIG=129u0o5rt/M=298184.6018725.7038619.3001176/D=groups/S=1705007709:HM/EXP=1112191112/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075";
alt=""><img src="http://us.a1.yimg.com/us.yimg.com/a/ne/netflix/22305_0205_016_b_300250_a.gif";
alt="click here" width="300" height="250"
border="0"></a></td></tr></table>
</td>
</tr>
<tr><td><img alt="" width=1 height=1 src="http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=:HM/A=2593423/rand=437951641";></td></tr>
</table>

<!-- **end egp html banner** -->



<!-- **begin egp html banner** -->

<br>
<tt><hr width="500">
<b>Yahoo! Groups Links</b><br>
<ul>
<li>To visit your group on the web, go to:<br><a
href="http://groups.yahoo.com/group/xAP_developer/";>http://groups.yahoo.com/group/xAP_developer/</a><br>&nbsp;
<li>To unsubscribe from this group, send an email to:<br><a
href="mailto:xAP_developer-unsubscribe@xxxxxxx?subject=Unsubscribe";>xAP_developer-unsubscribe@xxxxxxx</a><br>&nbsp;
<li>Your use of Yahoo! Groups is subject to the <a href="http://docs.yahoo.com/info/terms/";>Yahoo!
Terms of Service</a>.
</ul>
</tt>
</br>

<!-- **end egp html banner** -->


</body>
</html>

--------------070503060607050903080502--




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.