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: New member introduction



------=_Part_14943_23567635.1130456533288
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 27/10/05, Stuart Booth <lists@xxxxxxx> wrote:
>
>
> <big snip>
>
> HTH?

HTH? - It certainly does :D
When I said I needed to be "spoon fed" your reponse fitted the
bill
perfectly!!!!
Many thanks for all that effort!!
Next question : receiving the message at the other end - I instantiate a
xAPHubClientListener and handle the MessageReceived event. From that I get
the message and to retrieve the data in a safe way, I need to convert it to
a xAPSerialSendBlock object, which I do using the following code :

if(message.Header.Class.ClassType =3D=3D "Serial.Comms")
{
xAPMessageBlock xmb =3D
event_args.Message.Body.GetMessage("Serial.Send");
if(xmb !=3D null)
{
xAPSerialSendBlock block =3D new xAPSerialSendBlock(xmb);
Debug.WriteLine(block.ToString(mfi));
Debug.WriteLine(block.Name);
Debug.WriteLine(block.Data);
Debug.WriteLine(block.Port);
}
}
My question : is this correct? Or is there a better/safer way to do it?
Or should I be using a xAPSerialReceivedBlock here instead?
Thanks
Simon

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

<html><body>


<br><br>
<div><span class="gmail_quote">On 27/10/05, <b
class="gmail_sendername">Stuart Booth</b> &lt;<a
href="mailto:lists@xxxxxxx";>lists@xxxxxxx</a>&gt;
wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex;
MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px
solid"><tt><span
class="q"><br></span>&lt;big
snip&gt;<br><br>HTH?</tt></blockquote>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>HTH? - It certainly does&nbsp; :D </div>
<div>&nbsp;</div>
<div>When I said I needed to be &quot;spoon fed&quot; your
reponse fitted the bill perfectly!!!!</div>
<div>&nbsp;</div>
<div>Many thanks for all that effort!!</div>
<div>&nbsp;</div>
<div>Next question : receiving the message at the other end - I
instantiate a <font face="courier new,monospace"
size="2">xAPHubClientListener</font><font
size="2"> and handle the <font face="courier
new,monospace">MessageReceived
</font> event. From that I get the message and to retrieve the data
in a safe way,&nbsp;I need to convert it to a <font
size="2"><font face="courier
new,monospace">xAPSerialSendBlock</font> object, which I do
using the following code :
</font></font></div>
<div><font color="#0000ff" size="2">
<p><font face="courier
new,monospace">if</font></p></font><font
face="courier new,monospace"><font
size="2">(message.Header.Class.ClassType ==
&quot;Serial.Comms&quot;)<br>{<br>&nbsp;
xAPMessageBlock xmb = event_args.Message.Body.GetMessage(&quot;
Serial.Send&quot;);<br></font><font
color="#0000ff" size="2">&nbsp;
if</font><font size="2">(xmb != </font><font
color="#0000ff"
size="2">null</font></font><font
face="courier new,monospace"><font
size="2">)<br>&nbsp;
{<br>&nbsp;&nbsp;&nbsp; xAPSerialSendBlock block =
</font><font color="#0000ff"
size="2">new</font></font><font
face="courier new,monospace"><font size="2">
xAPSerialSendBlock(xmb);<br>&nbsp;&nbsp;&nbsp;
Debug.WriteLine(block.ToString(mfi));<br>&nbsp;&nbsp;&nbsp;
Debug.WriteLine(block.Name);<br>&nbsp;&nbsp;&nbsp;
Debug.WriteLine
(block.Data);<br>&nbsp;&nbsp;&nbsp;
Debug.WriteLine(block.Port);<br>&nbsp;
}<br></font><font
size="2">}</font></font></div>
<div>My question : is this correct? Or is there a better/safer way to
do it?</div>
<div>&nbsp;</div>
<div>Or should I be using a <font size="2"><font
face="courier
new,monospace">xAPSerialReceivedBlock</font> here
instead?</font></div>
<div><font
size="2"></font>&nbsp;</div>
<div><font size="2">Thanks</font></div>
<div><font
size="2"></font>&nbsp;</div>
<div><font size="2">Simon</font></div>
<div>&nbsp;</div><br>&nbsp;</div>




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

<br>
<div style="text-align:center; color:#909090;
width:500px;">
<hr style="border-bottom:1px; width:500px;
text-align:left;">
<tt>YAHOO! GROUPS LINKS</tt>
</div>
<br>
<ul>
<tt><li type=square>&nbsp;Visit your group "<a
href="http://groups.yahoo.com/group/xap_automation";>xap_automation</a>"
on the web.<br>&nbsp;</tt>
<tt><li type=square>&nbsp;To unsubscribe from this group,
send an email to:<br>&nbsp;<a href="mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe";>xap_automation-unsubscribe@xxxxxxx</a><br>&nbsp;</tt>
<tt><li type=square>&nbsp;Your use of Yahoo! Groups is
subject to the <a href="http://docs.yahoo.com/info/terms/";>Yahoo!
Terms of Service</a>.</tt>
</ul>
<br>
<div style="text-align:center; color:#909090;
width:500px;">
<hr style="border-bottom:1px; width:500px;
text-align:left;">
</div>
</br>

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


</body></html>

------=_Part_14943_23567635.1130456533288--



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