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: xAP-485 Bridge Software


  • Subject: Re: xAP-485 Bridge Software
  • From: Stuart Booth
  • Date: Sat, 08 Nov 2003 19:23:00 +0000

On Sat, 8 Nov 2003 16:00:58 -0000, "Paul Barrett"
<<a
href="/group/xAP_developer/post?postID=_PqGHebgB6zxFSCnjUjvpbZGbhwuVXFIhMJEH8GlrGGpz_0me9NoKVqARzCG7nFMRFI7whmegk66RUzx-g2U">pbarrett@r...</a>>
wrote:

>OK the converted Hub Client app is now on my website @
>
><a href="http://www.bazautomation.com/modules.php?name=Downloads&d_op=viewdownload&ci";>http://www.bazautomation.com/modules.php?name=Downloads&amp;d_op=viewdownload&amp;ci</a>
>d=3
>
>Until I converted this App I didn't realize how different C# and VB.NET
>actually are.

Heh! I just converted it to VS2003.net and ran it. Then out of sheer
curiousity fiddled it to display message bodies - and realised I
didn't know what the foreach syntax is in VB.net. Had to look it up:

For Each block As xAPMessageBlock In event_args.Message.Body
Console.WriteLine(block.ToString())
Next

In this particular sample you've picked it shows how to listen in on
various events, such as connecting to the Hub application and handling
errors. I don't actually think any of my apps pay any attention to
these other events. Haven't found much of a use for them yet.

A really, really basic xAPplication can drop a lot of the fluffy
Console output and just use this line in the Main function if it
liked:

AddHandler listener.eventMessageReceived, AddressOf MessageReceived

The rest of the code was really just as an example, or actually, when
I wrote it, as a test that it worked correctly.

I also stopped updating these samples loooong ago. There are quite a
few things in them that I don't do anymore. The better examples if you
wanted a template to follow are definitely the full applications that
I continue to update.

There are two varieties of these however. Some following a similar
pattern to this sample you converted; Hub, Listener, Send.

All of the others are written in the style of plugin DLLs. As I've not
documented these anywhere there's a wee bit more to get familiar with.
But the benefit is that I don't need to maintain them all separately -
resulting in possible source drift as shown by the Samples vs the full
apps.

S
--
Stuart Booth <<a
href="/group/xAP_developer/post?postID=0sYUDidjmOdCdKzahVKin5SJVXlkHIaFb1N3xiRZ4vjqOuJzqw7tIyehTiup5GuJRFfrahO6aAeiKswALEvq">stuart@x...</a>>
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.