Java API for X10 controllers
A Java API for X10 home automation controllers
This package contains the specification of the API for X10-compliant home automation drivers. Supporting drivers are expected to implement the X10Controller and X10Driver interf
Tutorial Details:
X10 clients
The client interacts with this API in a manner similar to the code shown below. This example sends an `on\' event to the specified housecode and unitcode. Note that not all events require unitcodes, although the housecode is mandatory
X10Controller controller = X10DriverManager.getX10Controller (url, user, password);
controller.send(new X10Event (X10Event.X10EVENT_ON, housecode, unitcode);
controller.close();
Not all controllers support user authentication, and those that do don\'t always require both user and password. However, the client is required to supply something in these arguments; the underlying driver is free to ignore it if desired.
To make this API work, vendor-specific drivers are required. The driver manager selects a suitable driver from those available by checking the URL. X10 URLs are expected to begin with x10; following this should be a product identifier; everthing after this is vendor specific. For example, the twserial driver will respond when offered URLs like this:
x10:twserial:[host]:[port]
The precise nature of the URL is defined by the driver vendor.
X10DriverManager
X10DriverManager is responsible for selecting drivers on behalf of clients. The mechanism of operation is exactly the same as for the SQL driver manager: the client opens a connection like this:
X10Controller c = X10DriverManager.getX10Controller (url, user, pass);
The driver tries to match the URL to those understood by the loaded drivers. It tries each driver on the list by calling its canConnect() method; it this returns true, it tries to call getX10Controller() on the driver. If this returns a driver, then the driver manager considers its job done. If none of the loaded drivers responds, then getX10Controller throws an X10NoSuitableDriverException.
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Java API for X10 controllers
View Tutorial: Java API for X10 controllers
Related
Tutorials:
A promise of easier
embedded-systems networking - JavaWorld November 1999
A promise of easier
embedded-systems networking - JavaWorld November 1999 |
Untangle your servlet code with reflection - JavaWorld December
2000
Untangle your servlet code with reflection - JavaWorld December
2000 |
Untangle your servlet code with
reflection
Untangle your servlet code with
reflection |
Remote-control
Java
Remote-control
Java |
How to build
an interpreter in Java, Part 1: The BASICs
(JavaWorld /
May 1997 / by Chuck McManis)
How to build
an interpreter in Java, Part 1: The BASICs
(JavaWorld /
May 1997 / by Chuck McManis) |
Picture
this
Picture
this |
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP). |
JHome
JHome
Automation Light Interface Control Environment aka A.L.I.C.E. is written as a 100% Java application using both Swing and Comm API packages, all of which are extensions to the Java core libraries. Alice will allow you to control your X10 enabled li |
Dictionary and Thesaurus API for Java
What is the Dictionary and Thesaurus API for JavaTM?
The Dictionary and Thesaurus API for Java is a standard-based class library for accessing a dictionary and thesaurus using Java. It provides programming access to wordbook data from the Java programm |
PGP Java API 2.0
PGP Java API 2.0 |
Java SMPP API Homepage
Java SMPP API
SMPP (Short Message Peer to Peer) is a protocol used by short message entities (SMEs) to communicate with Short Message Service Centres (SMSC, or just SC) for sending an receiving short messages.
|
Using SSL with Non-Blocking IO
Using SSL with Non-Blocking IO
After the initial experiments with Java NIO, most developers start wondering about security; in particular, how to use SSL with Java NIO. With the traditional blocking sockets API, security is a simple issue: just set up an |
JTwain
JTwain will implement a Java interface to the the Win32 C DLL TWAIN acquire methods. |
Accessing Databases Using Java and JDBC
This article will show how a Java Application, Applet or Servlet can access data stored in relational databases using the JDBC API. |
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack |
Project Looking Glass: Its Architecture and Sneak Preview of the API
Bring a richer user experience to the desktop and to applications, through 3D windowing and visualization capabilities. This article covers Project Looking Glass' main features and API, its basic organization, and the functionality of important classes. |
Getting Started With the Mobile 3D Graphics API for J2ME
This tutorial introduces the Mobile 3D Graphics API for J2ME, JSR 184. The article presents an overview, potential application areas, the differences between JSR 184 and two related APIs, the classes in the new optional package, the programming model, the |
J2ME Wireless Toolkit 2.2
Now available.This version of the toolkit is fully compatible with the Java Technology for the Wireless Industry (JTWI) specification (JSR 185). |
USB FAQ
FAQ topics include recommended USB patches for the Solaris OS, the USBA 1.0 Framework, libusb support, and more. |
Updated Hardware Certification Test Suite Available for Download
Version 2.4 of the HCTS is now available. Use it to certify your hardware on the Solaris 9 Operating System (and updates) and the Solaris 10 OS, 32-bit and 64-bit environments. |
|
|
|