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: xFx plugins


  • Subject: Re: xFx plugins
  • From: Stuart Booth
  • Date: Sun, 14 Mar 2004 21:29:00 +0000

Hi Paul,

I just loaded up your files that Edward posted over. It all worked
first time. However, check out the attached image as it has a few
errors showing (which are minor):

<a href="http://www.xapframework.net/xAPImages/485.jpg";>http://www.xapframework.net/xAPImages/485.jpg</a>

It's sitting alongside the SlimConnector plugin as you can see. The
error shown here is coming from:

Protected Overrides Sub MessageReceived
:
m_serial_obj.SendMessage(event_args.Message.Raw.ToString())

This is because I have managed to remove that raw message buffer from
the latest builds!! OOPS. I actually put that feature in when I was
still actively using the old console-mode Listener application, as it
allowed us to see the raw bytes that were arriving, particularly since
there was an issue that Kevin &amp; James discovered wrt \r and \n
characters in the data stream.

ANYway, I've just fixed that in my build here, which I hope to upload
tonight. So here it is all fully working:

<a href="http://www.xapframework.net/xAPImages/485ii.jpg";>http://www.xapframework.net/xAPImages/485ii.jpg</a>

The fix is easy with what you have. Change the line above to:

m_serial_obj.SendMessage(event_args.Message.ToString("N"))

That will format the message for "N"etwork transmission rather
than
for "D"isplay.

Other issues:

1. Your vendor name isn't quite being picked up correctly, but that's
because I changed/simplifiied things,

Change this line:

xAPPluginAppConfigSettingAttribute("xAP485Bridge_xAPHeaderSourceVendor",
"BAZAuto"), _

to:

xAPPluginAppConfigSettingAttribute("xAPHeaderSourceVendor",
"BAZAuto"), _

However, this is a bug I have only fixed in the build on my PC.
Otherwise, as Edward found and what he was hinting at wrt X10 target
addressing, it will always be KCSoft.{device}.{instance} ! Sorry.
That's fixed but you'll need to update things later tonight.

2. Instance is not what I expected.

xap-hbeat
{
v=12
hop=1
uid=FF182000
class=xap-hbeat.alive
source=BAZAuto.xAP485Bridge.xAP485Bridge
interval=60
port=3643
pid=5944
}

Ie it is the same as the device name. This is because of this line:

xAPPluginAppConfigSettingAttribute("xAPHeaderSourceInstance",
"xAP485Bridge")> _

Generally you probably won't want to include that line, as that fixes
the instance value at compile-time, rather than allowing it to be
configured by the user at run-time via the config file.

I would recommend removing it. Oh, this might not be an issue with the
current builds but it definitely is with the next release which is
handling this correctly I believe.

3. So why doesn't it work for you? I just figured out that things are
slightly different for VB.NET users and all the sample images in my
plugin tutorial apply to C# only. Oops.

In your Properties of xAPSerialComm_Test01, Configuration Properties,
Build, your Output path is set to "bin\". I suspect you have
configured the GUI runtime to look at this directory for plugins?

If I configure the app.config file to use:

<add key="xAPPluginsRootDirectory" value="H:\xAP\0
Downloads\PaulB\xAPSerialComm_Test01\bin" />

Then it goes wrong pretty much as described. That is exactly why my
tutorial includes a step to copy just the key plugin DLL (and .PDB)
file to ..\ e.g. "copy SlimConnector.* ..\" as it solves that
problem.
It's one of the things I haven't worked out the correct solution for,
hence this work-around.

If you point the runtime application at a different directory and copy
your xAPSerialComm.* files there, rather than use your actual
project's output directory, it'll work fine.

Hope that's okay?? More when I get xFx uploaded. Just got to fix a
little obscure problemette I discovered when I was testing some
things. Obscure in that this has been a problem since xFx was born,
and I've never noticed before.

S

S
--
Stuart Booth <<a
href="/group/xAP_developer/post?postID=yPziB_kbjsqyJHWvlZM_Eug5BEBdtGED8PhSbVuRIINY7UPgbxlGwtS2npmEEBZ4z3d3QRHBo4jpKdRaVBFp">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.