1 package org.wcb.autohome.util;
2 /***
3 * Copyright (C) 1999 Walter Bogaardt
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 */
19
20
21 import com.jpeterson.x10.event.FunctionListener;
22 import com.jpeterson.x10.event.FunctionEvent;
23
24
25 import org.wcb.autohome.AutoHomeAdminSession;
26 import org.wcb.autohome.model.MonitorTableModel;
27
28 /***
29 * Project: Home Automation Interface
30 * Filename: $Id: AliceListener.java,v 1.5 2004/01/17 08:15:46 wbogaardt Exp $
31 * Abstract: Monitors CM11A device and power line for events occuring outside of
32 * the application and logs the results.
33 *
34 * $Log: AliceListener.java,v $
35 * Revision 1.5 2004/01/17 08:15:46 wbogaardt
36 * Have an initial working monitoring frame that actually shows the date and time an event takes place
37 *
38 * Revision 1.4 2003/12/13 05:36:52 wbogaardt
39 * fixed javadoc comments.
40 *
41 */
42 public class AliceListener implements FunctionListener{
43
44 private MonitorTableModel mModel;
45
46 public AliceListener(MonitorTableModel model) {
47 this.mModel = model;
48 }
49
50 public void functionAllLightsOff(FunctionEvent functionEvent) {
51 AutoHomeAdminSession.getInstance().printMessage("all lights off in section " + functionEvent.getHouseCode());
52 }
53
54 public void functionAllLightsOn(FunctionEvent functionEvent) {
55 AutoHomeAdminSession.getInstance().printMessage("all lights on in section " + functionEvent.getHouseCode());
56 }
57
58 public void functionAllUnitsOff(FunctionEvent functionEvent) {
59 AutoHomeAdminSession.getInstance().printMessage("all off in section " + functionEvent.getHouseCode());
60 }
61
62 public void functionBright(FunctionEvent functionEvent) {
63 }
64
65 public void functionDim(FunctionEvent functionEvent) {
66 }
67
68 public void functionHailAcknowledge(FunctionEvent functionEvent) {
69 }
70
71 public void functionHailRequest(FunctionEvent functionEvent) {
72 }
73
74 public void functionOff(FunctionEvent functionEvent) {
75 AutoHomeAdminSession.getInstance().printMessage("turn off module ");
76 }
77
78 public void functionOn(FunctionEvent functionEvent) {
79 AutoHomeAdminSession.getInstance().printMessage("turn on module.");
80 }
81
82 public void functionPresetDim1(FunctionEvent functionEvent) {
83 }
84
85 public void functionPresetDim2(FunctionEvent functionEvent) {
86 }
87
88 public void functionStatusOff(FunctionEvent functionEvent) {
89 AutoHomeAdminSession.getInstance().printMessage("Detected status off module at " + functionEvent.getHouseCode());
90 }
91
92 public void functionStatusOn(FunctionEvent functionEvent) {
93 AutoHomeAdminSession.getInstance().printMessage("Detected status on module at " + functionEvent.getHouseCode());
94 }
95
96 public void functionStatusRequest(FunctionEvent functionEvent) {
97 }
98
99 }