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: TelCanto V1.1.3




On Fri, 28 Jan 2005 11:51:10 -0000, "Malcolm Green"
<groups@xxxxxxx> wrote:

>Ah, then I'm confused as I thought the source name was the unique
identifier
>for an xAP application.  I'm not setting a UID anywhere, and neither
does
>the sample application which I used as a starting point.  Can someone
>clarify how and where I should set this using xAPFramework.net, and how
I
>can ensure that the value is unique within the network?

Add the following to your app.config file to completely customise the
UID:

<appSettings>
<!-- xAP Framework configuration parameters -->

<!-- The default value for the Network Domain ID component of the UID
-->
<add key="xAPNetworkDomainID" value="FF" />

<!-- The default value for the device ID component of the UID -->
<add key="xAPUniqueDeviceID" value="1234" />

<!-- The default value for the subaddress node component of the UID
-->
<add key="xAPSubaddressNode" value="01" />
:

In practise all you really need is this though:

<appSettings>
<!-- xAP Framework configuration parameters -->
<add key="xAPUniqueDeviceID"            value="1020"
/>
:

xAPFramework (xFx) takes care of the rest for you automagically.

xFx fills in the blanks with default values if none are provided hence
the fact that neither your app nor the sample app you examined had
this setting present anywhere obvious. I try to make things as easy as
possible to get up and running with flexibility later on when you need
it.

You can tweak the Source address and UID in one location in your code
to have it picked up elsewhere in xFx:

static void Main()
{
// Fix the Vendor & Device values to use wherever the values would
otherwise be retrieved from the app.config file
xAPConfig.HeaderSourceVendor = "TelGen";
xAPConfig.HeaderSourceDevice = "TelCanto";
xAPConfig.UniqueDeviceID = 1234;

:
}

You wouldn't normally want the UniqueDeviceID fixed down like that in
the code though, that's a thing for the config file. I'm just
demonstrating what could be done if required.

HTH,

S
--
Stuart Booth <stuart@xxxxxxx>
xAPFramework.NET - a xAP software development framework for .NET

http://www.xapautomation.org/ 
     http://www.xapframework.net/




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.