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: c# help please



------=_NextPart_000_0018_01C5E64A.CF650640
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

re-send

_____

From: Edward Pearson [mailto:edward.pearson@xxxxxxx]
Sent: 09 November 2005 23:47
To: 'xap_automation@xxxxxxx'
Subject: RE: [xap_automation] c# help please


Yes, the newer version is stricter.

You are not setting the UID explicitly so the framework is picking up the
default from the .config file (or the wired in one if the .config file
can't
be found). The default is FF123400. The last two digits are the sub-UID are
only allowed to be 00 when sending from the 'main device' - in your case
"Pace.CID.home.Line1". When you send messages from the main
device's
sub-addresses (Tapi.input in your example) then the last two digits need to
be non-zero.

A quick fix for your code could be adding, just after setting the header
source:

message.header.UID = new xAPHeaderUID("FF123401");

There are other constructors for the UID - eg, one that construct it from
it's three separate elements, and just setting the last element on its own.
Doing it that way would let you keep the FF and 1234 parts in the .config
file and let you set the 01 in code (assuming that you have other endpoints
too - they should all have unique numbers)

BTW - I see you are using "Pace" in the manufacturer field of the
source.
Traditionally this should identify you, as the producer of the interface,
leaving "Pace" to Pace the company. So, eg, my Barix Barionet
interface has
source address like
ERSP.Barix.Barionet.ServerRack1:Outputs.Relays.1 - where ERSP is me.

Edward


_____

From: xap_automation@xxxxxxx [mailto:xap_automation@xxxxxxx]
On Behalf Of lasses nilsson
Sent: 08 November 2005 22:18
To: xap_automation@xxxxxxx
Subject: [xap_automation] c# help please


Hi
I had it all working but went over to newer dll:s(mine were from
2002) and now I cn't send a xap message from my c# code....
The error lies in the create message and it complains about uuid not
being subclass.I know its prb easy but I can't find the doc for a
message creating.pease help.the code looks like this. what am I
missing?

xAPMessage message = new xAPMessage();
message.Header = new xAPHeader();

message.Header.Class = new xAPHeaderClass
("CID" , "Incoming");
message.Header.Source = new xAPHeaderSource
("Pace", "CID", "home.line1:Tapi.input");

xAPMessageBlock block = new xAPMessageBlock
("CID.Incoming");

xAPDateTime datetime = new xAPDateTime();

block.FormattedDateValue    =
datetime.FormattedDate;

block.Add("number", number);

block.Add("Phone",number);

message.AddMessageBlock(block);

return message;





_____

YAHOO! GROUPS LINKS



*	 Visit your group "xap_automation
<http://groups.yahoo.com/group/xap_automation>
" on the web.


*	 To unsubscribe from this group, send an email to:
xap_automation-unsubscribe@xxxxxxx
<mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe>


*	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/>
.


_____



------=_NextPart_000_0018_01C5E64A.CF650640
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=us-ascii">
<META content="MSHTML 6.00.2900.2769"
name=GENERATOR></HEAD>
<BODY>


<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN
class=046450123-10112005>re-send</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Edward Pearson
[mailto:edward.pearson@xxxxxxx]
<BR><B>Sent:</B> 09 November 2005
23:47<BR><B>To:</B>
'xap_automation@xxxxxxx'<BR><B>Subject:</B> RE:
[xap_automation] c# help
please<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2>Yes, the newer version is
stricter.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2>You are not setting the UID explicitly so the
framework is
picking up the default from the .config file (or the wired in one if the
.config
file can't be found). The default is FF123400. The last two digits are the
sub-UID are only allowed to be 00 when sending from the 'main device' - in
your
case "Pace.CID.home.Line1". When you send messages from the main
device's
sub-addresses (Tapi.input in your example) then the last two digits need to
be
non-zero.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2>A quick fix for&nbsp;your code could be adding,
just after
setting the header source:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT size=2><FONT
face="Courier
New"></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT size=2><FONT face="Courier
New">message.header.UID =
</FONT></FONT><FONT face="Courier New"><FONT
color=#0000ff
size=2>new</FONT><FONT size=2>
xAPHeaderUID("FF123401");</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT face="Courier New"><FONT
size=2></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT face="Courier New"><FONT
size=2><FONT
face=Arial>There are other constructors for the UID - eg, one that
construct it
from it's three separate elements, and just setting the last element on its
own.
Doing it that way would let you keep the FF and 1234 parts in the .config
file
and let you set the 01 in code (assuming that you have other endpoints too
-
they should all have unique
numbers)</FONT></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT face="Courier New"><FONT
size=2><FONT
face=Arial></FONT></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT face="Courier New"><FONT
size=2><FONT face=Arial>BTW
- I see you are using "Pace" in the manufacturer field of the
source.
Traditionally this should identify you, as the producer of the interface,
leaving "Pace" to Pace the company. So, eg, my Barix Barionet
interface has
source address
like</FONT></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2>ERSP.Barix.Barionet.ServerRack1:Outputs.Relays.1 -
where
ERSP is me.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT face="Courier New"><FONT
size=2><FONT
face=Arial></FONT></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=157193023-09112005><FONT
face=Arial
color=#0000ff size=2><FONT face="Courier New"><FONT
size=2><FONT
face=Arial>Edward</FONT></DIV></FONT></FONT></FONT></SPAN><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px
solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
xap_automation@xxxxxxx
[mailto:xap_automation@xxxxxxx]
<B>On Behalf Of </B>lasses
nilsson<BR><B>Sent:</B> 08 November 2005
22:18<BR><B>To:</B>
xap_automation@xxxxxxx<BR><B>Subject:</B>
[xap_automation] c# help
please<BR></FONT><BR></DIV>
<DIV></DIV><TT>Hi<BR>I had it all working but went
over to newer dll:s(mine
were from <BR>2002) and now I cn't send a xap message from my c#
code....<BR>The error lies in the create message and it complains
about uuid
not <BR>being subclass.I know its prb easy but I can't find the doc
for a
<BR>message creating.pease help.the code looks like this. what am I
<BR>missing?<BR><BR>xAPMessage message = new
xAPMessage();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message.Header = new
xAPHeader();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
message.Header.Class = new xAPHeaderClass<BR>("CID" ,
"Incoming");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message.Header.Source =
new
xAPHeaderSource<BR>("Pace", "CID",
"home.line1:Tapi.input");<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xAPMessageBlock
block = new
xAPMessageBlock<BR>("CID.Incoming");<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xAPDateTime
datetime = new
xAPDateTime();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
block.FormattedDateValue&nbsp;&nbsp;&nbsp; =
<BR>datetime.FormattedDate;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
block.Add("number",
number);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
block.Add("Phone",number);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
message.AddMessageBlock(block);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return
message;<BR><BR><BR><BR></TT>



<!-- **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>

------=_NextPart_000_0018_01C5E64A.CF650640--




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.