1 # ----------------------------------------------------------------------
2 # PURPOSE: Base class for all electrical appliances that interact
5 # AUTHOR: Michael J. McLennan Phone: (610)712-2842
6 # AT&T Bell Laboratories E-mail: michael.mclennan@att.com
9 # ----------------------------------------------------------------------
10 # Copyright (c) 1993 AT&T Bell Laboratories
11 # ======================================================================
12 # Permission to use, copy, modify, and distribute this software and its
13 # documentation for any purpose and without fee is hereby granted,
14 # provided that the above copyright notice appear in all copies and that
15 # both that the copyright notice and warranty disclaimer appear in
16 # supporting documentation, and that the names of AT&T Bell Laboratories
17 # any of their entities not be used in advertising or publicity
18 # pertaining to distribution of the software without specific, written
21 # AT&T disclaims all warranties with regard to this software, including
22 # all implied warranties of merchantability and fitness. In no event
23 # shall AT&T be liable for any special, indirect or consequential
24 # damages or any damages whatsoever resulting from loss of use, data or
25 # profits, whether in an action of contract, negligence or other
26 # tortuous action, arising out of or in connection with the use or
27 # performance of this software.
28 # ======================================================================
30 itcl_class Appliance {
32 method power {power} {
33 if {[itcl_info objects [info which $outlet]] == ""} {
37 error "cannot use $this: not plugged in"