[Message Prev][Message
Next][Thread Prev][Thread Next][Message Index][Thread Index]
Re: Discovery question
<head>
<style type="text/css">
<!--
/* start of attachment style */
.ygrp-photo-title{
clear: both;
font-size: smaller;
height: 15px;
overflow: hidden;
text-align: center;
width: 75px;
}
div.ygrp-photo{
background-position: center;
background-repeat: no-repeat;
background-color: white;
border: 1px solid black;
height: 62px;
width: 62px;
}
div.photo-title
a,
div.photo-title a:active,
div.photo-title a:hover,
div.photo-title a:visited {
text-decoration: none;
}
div.attach-table div.attach-row {
clear: both;
}
div.attach-table div.attach-row div {
float: left;
/* margin: 2px;*/
}
p {
clear: both;
padding: 15px 0 3px 0;
overflow: hidden;
}
div.ygrp-file {
width: 30px;
valign: middle;
}
div.attach-table div.attach-row div div a {
text-decoration: none;
}
div.attach-table div.attach-row div div span {
font-weight: normal;
}
div.ygrp-file-title {
font-weight: bold;
}
/* end of attachment style */
-->
</style>
</head>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<!-- **begin egp html banner** -->
<br><br>
<!-- **end egp html banner** -->
Hi Neil and welcome...<br>
<br>
The BSC schema in xAP is the fullest in terms of supporting a discovery
mode. In fact you can typically discover the name and state of
every
BSC endpoint on a xAP network within one minute.<br>
<br>
Basically in xAP every device sends a heartbeat and typically, although
not mandatory, this at 60 second intervals. This means that a
listener
becomes aware of all xAP 'parent' devices / applications on your
network, by name, within one minute. Now if a device is using the
BSC
schema then it likely it has additional endpoints within the device eg
an input/output board might have 8 inputs and 8 outputs so 16 'sub'
addresses. These can be named as you like as long as they are unique
and the sub address is appended to its parent device address using a
:<sub address><br>
<br>
Parent Device<br>
ACME.Controller.Security<br>
<br>
Endpoints <br>
ACME.Controller.Security:Input.1<br>
ACME.Controller.Security:PIR.Kitchen<br>
ACME.Controller.Security:Output.5<br>
ACME.Controller.Security:Output.Bells<br>
etc<br>
<br>
Every sub address will report its status 'on demand', 'on change' or
'periodically'. The period of the reporting is again down to the
developer of the device/application but is typically 10
minutes.
Hence every end nodes' name and state can be discovered passively
within 10 minutes by just listening to the network for xAPBSC.info
messages. <br>
<br>
Sometimes this is often not as fast as you would like and so another
method is to 'query' the state of all the endpoints. An approach
I use
at startup is to listen for new heartbeats and then as soon as you find
a new device you send a xAPBSC.query message targeted at all endpoints
within that device, using the '>' sub address. . If the device
supports the BSC schema it will immediately respond with a series of
messages, one for each of its endpoints - so the example device above
would respond with 16 messages. Each message clearly
identifies the
name of the endpoint and its current state.<br>
<br>
xap-header<br>
{<br>
...<br>
class=<b>xapbsc.query</b><br>
target=ACME.Controller.Security<b>:></b><br>
}<br>
request<br>
{<br>
ID=* <br>
}<br>
<br>
BTW The request body is just a dummy as all xAP messages must contain a
named body and actually the ID=* within this is not required but
I
recommend you do it this way for future compatability, * means
everything. Also the > after the : at the end of the
target address
means 'match everything from here onwards' in the address ie
every
subadress/endpoint.<br>
<br>
<br>
... so every endpoint will respond individually with a message like
this..<br>
<br>
xap-header<br>
{<br>
....<br>
UID=FF.1234:<b>0A</b><br>
source=ACME.Controller.Security:<b>Output.Bells</b><br>
class=xAPBSC.info<br>
}<br>
output.state<br>
{<br>
state=off<br>
}<br>
<br>
So you will see that we can now deduce the name and state of every
endpoint within a device and wether it is an input or output, (only
outputs are controllable by xAP. Also, should you
require it, you
have the numerical 'ID' for the endpoint which are the hex digits
after the : in the UID value, 0A in the above. In the older xAP
v1.2
it is just the last two digits of the UID. <br>
<br>
This clear identification of the parent device and each of the
endpoints within it, by the use of sub addresses, is a great
feature
of xAP, and absent in xPL. Also if you have chosen to carefully
name
your endpoints in a hierarchical fashion then you can selectively ask
subsets of your endpoints to respond eg<br>
target=ACME.Controller.Security:Output.> might
ask just your
outputs to respond.<br>
<br>
You might also deduce that at startup you could issue the following
command to solicit responses immediately from every BSC parent device
and every endpoint within it.<br>
<br>
xap-header<br>
{<br>
...<br>
class= xapbsc.query<br>
<b>target=>:></b>
(this means
everything)<br>
}<br>
request<br>
{<br>
ID=*<br>
}<br>
<br>
<br>
.. and indeed that would ask for everything, however it is not a
recommended approach as on large xAP networks it will produce
bucketloads of responses that can flood the network.
The approach of
only issuing the xapbsc.query message as you hear heartbeats spreads
the responses over the first minute.<br>
<br>
<br>
Any questions... just ask away :-)<br>
<br>
cheers Kevin<br>
<br>
<br>
<br>
<br>
<blockquote cite="mid:1248829774.2000.37394.m5@xxxxxxx"
type="cite"><br>
<meta http-equiv="Content-Type" content="text/html;
">
<meta name="Generator" content="Microsoft Word 12
(filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p
class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First
post/question<o:p></o:p></p>
<p
class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">How does the discovery process in xAP
work?<o:p></o:p></p>
<p
class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In particular the BSC section. It
refers to this
at the beginning
of the specification and then nothing
else.<o:p></o:p></p>
<p
class="MsoNormal"><o:p> </o:p></p>
<p
class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Regards,</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Neil
Wrightson</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><br>
<span style="color: navy;">Information Technology
Division</span> <br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif"; color: blue;">Newcastle
Weighing Services Pty. Ltd.</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Phone
(02) 4961 4554</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Fax
(02) 4962 1137</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Mobile
0428 50 80 50</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Email
<a class="moz-txt-link-abbreviated" href="mailto:neilw@xxxxxxx">neilw@xxxxxxx</a></span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><br>
</span><span
style="font-size: 10pt; font-family: "Times New
Roman","serif";">Web
<a class="moz-txt-link-abbreviated" href="http://www.nws.com.au">www.nws.com.au</a></span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";">/it
</span><o:p></o:p></p>
</div>
</blockquote>
<br>
<!-- **begin egp html banner** -->
<br>
<br>
<!-- **end egp html banner** -->
<div width="1" style="color: white; clear:
both;"/>__._,_.___</div>
<!-- Start Recommendations -->
<!-- End Recommendations -->
<!-- **begin egp html banner** -->
<img src="http://geo.yahoo.com/serv?s=97476590/grpId=9629476/grpspId=1705007709/msgId=1977/stime=1248863497"
width="1" height="1"> <br>
<!-- **end egp html banner** -->
<!-- **begin egp html banner** -->
<br>
<div style="font-family: verdana; font-size: 77%; border-top: 1px
solid #666; padding: 5px 0;" >
Your email settings: Individual EmailTraditional <br>
<a href="http://groups.yahoo.com/group/xAP_developer/join;_ylc=X3oDMTJmMDFmbXExBF9TAzk3NDc2NTkwBGdycElkAzk2Mjk0NzYEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyNDg4NjM0OTc-">Change
settings via the Web</a> (Yahoo! ID required) <br>
Change settings via email: <a href="mailto:xAP_developer-digest@xxxxxxx?subject=Email
Delivery: Digest">Switch delivery to Daily Digest</a> <a
href = "mailto:xAP_developer-fullfeatured@xxxxxxx?subject=Change
Delivery Format: Fully Featured">Switch to Fully Featured</a>
<br>
<a href="http://groups.yahoo.com/group/xAP_developer;_ylc=X3oDMTJkNXFmbGppBF9TAzk3NDc2NTkwBGdycElkAzk2Mjk0NzYEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjQ4ODYzNDk3">
Visit Your Group
</a>
<a href="http://docs.yahoo.com/info/terms/">
Yahoo! Groups Terms of Use
</a>
<a href="mailto:xAP_developer-unsubscribe@xxxxxxx?subject=Unsubscribe">
Unsubscribe
</a>
<br>
</div>
<br>
<!-- **end egp html banner** -->
<div style="color: white; clear:
both;"/>__,_._,___</div>
</body>
</html>
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|