ActiveHome Pro SDK Sample Project |
|
Project: AH C View
Description
This sample C++ application demonstrates how to receive X10 commands using COM events. It creates a small console window that logs incoming and outgoing X10 commands. The console has two buttons to send the specified X10 commands. Notes
AhCView consists of an ATL dialog CMessageDlg, and a event sink class, CNotify. On initialization, the CMessageDlg creates the ActiveHome scripting object using CoCreateInstance. It then advises an event sink with a CNotify class being the target. Thereafter, as ActiveHome scripting events are received by the interface, the events are dispatched to the CNotify object, which in turn directs the CMessageDlg object to add a new event to the list box. CMessageDlg could receive the events directly, without using a helper class. In that case, it would need to provide an IDispatch interface and implementation for _IActiveHomeEvents. The code was implemented with a separate helper class to keep event reception separate from the dialog logic. Requirements
Requires CM15A, X10 device service, and ActiveHome Scripting Interface. Source Package
Source Contents List
While this code sample will get you started, we know you will be developing code that is much more exciting and fun. When you do, we would like to post it to inspire and help others build their own automation masterpiece. Have fun and get recognition for your work. Just send your sample project by e-mail to sdkinfo@activehome.com with a description of the application and a zip file of all related files. |
|
|
| *Prices are posted in $US dollars ONLY! Offer for FREE FEDEX Ground shipping for orders $49.99 or more are valid ONLY in the United States of America. Note: Some orders may be shipped via USPS Priority Mail. Orders to Canada have a $10 Shipping & Handling Charge and will have a 5% goods & services tax (GST #10575 8056 RT0001) added to the order. Prices may change without notice. X10 accepts only credit card payment (VISA, MasterCard, Discover and American Express), for both online and telephone orders. If you would like Express Shipping please call 1-800-675-3044. X10 reserves the right to discontinue or change the posted promotional offers at any time. Technical support is available only to customers in the US and Canada. |
| X10 © 2006 pages are copyrighted and may not be reproduced in any form without the expressed written consent of X10. |