The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: Re: Schema Question


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: xAP Stock Beta released


  • Subject: Re: xAP Stock Beta released
  • From: Stuart Booth
  • Date: Thu, 18 Dec 2003 15:58:00 +0000

On Mon, 15 Dec 2003 00:45:53 +0000, James <<a
href="/group/xAP_developer/post?postID=Cs03DxwPZ--apLE_ZfNPf1i8GoMN9fiI4aGQZBzYBlf_9vs7ZccziEGyrIVns5ToSbq6tg">james@m...</a>>
wrote:

>xAP Stock collects share information from Yahoo.com and outputs the
>results over xAP. It runs as a tray icon and can collect any number of
>stock results. It should be noted that the free stock information from
>Yahoo is always 15 minutes old!

The xFx support has a similar class interface to the rest, with block
CTOR parameters so that it's fully formed.

I can't find the link to your schemas page, James, so I couldn't
determine which are optional. I've assumed they're all mandatory.

private static void TestStockSchema ()
{
xAPStockReportMessage msg = new xAPStockReportMessage ();
xAPStockReportBlock block = new xAPStockReportBlock ("MI4",
"mi4 Home
Automation", 63.40F, 3.50F);
xAPStockReportBlock block_change_na = new xAPStockReportBlock
("KCSW",
"KC Software", 88.89F);
xAPStockReportBlock block_down = new xAPStockReportBlock ("WAGA",
"WagaSoft", 12.00F, -8.8F);

msg.AddMessageBlock(block);
msg.AddMessageBlock(block_change_na);
msg.AddMessageBlock(block_down);

xAPSender.ApplicationSender.Send(msg);
Console.WriteLine(msg.ToString());
}

Probably the only interesting one is the 'block_change_na' item,
which, if no change price value is specified, assumes it's a N/A
entry.

Is the number of decimal places and such-like important in this one?
I've made it look exactly like your Stock xAPp using 2 decimal places:

Stock.MI4
{
price=63.40
company=mi4 Home Automation
change=+3.50
}

I've also forced in a + if it's a positive number, as shown above.

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