diff --git a/lib/Insteon/BaseInsteon.pm b/lib/Insteon/BaseInsteon.pm index 93cbc9e0d..176cc9e2d 100644 --- a/lib/Insteon/BaseInsteon.pm +++ b/lib/Insteon/BaseInsteon.pm @@ -11,7 +11,9 @@ In user code: =head2 DESCRIPTION -Generic class implementation of an Insteon Device. +Generic class implementation of an Insteon Object. This is inherited by all +insteon objects both real (SwitchLinc) and virtual (PLM Scene), with the +exception of the PLM itself, which does not inherit any of these functions. =head2 INHERITS @@ -1127,12 +1129,8 @@ sub get_voice_cmds { my ($self) = @_; my %voice_cmds = ( - #The Sync Links routine really resides in DeviceController, but that - #class seems a little redundant as in practice all devices are controllers - #in some sense. As a result, that class will likely be folded into - #BaseObject/Device at some future date. In order to avoid a bizarre - #inheritance of this routine by higher classes, this command was placed - #here + #The Sync Links routine really resides in BaseController, maybe move this + #there 'sync links' => $self->get_object_name . '->sync_links(0)' ); return \%voice_cmds; @@ -1249,7 +1247,10 @@ You should have received a copy of the GNU General Public License along with thi =head2 DESCRIPTION -Generic class implementation of a Base Insteon Device. +Generic class implementation of a Base Insteon Device such as a SwitchLinc. +This class is inherited by all physical Insteon devices with the +exception of the PLM itself, which does not inherit any of these functions. +These functions are also not inherited by virtual devices such as a PLM Scene. =head2 INHERITS @@ -1263,7 +1264,7 @@ L package Insteon::BaseDevice; -@Insteon::BaseDevice::ISA = ('Insteon::BaseObject'); +@Insteon::BaseDevice::ISA = ('Insteon::BaseController'); our %message_types = ( %Insteon::BaseObject::message_types, @@ -2809,9 +2810,6 @@ one group. This includes, KeyPadLincs, RemoteLincs, FanLincs, Thermostats Nothing. -This package is meant to provide supplemental support and should only be added -as a secondary inheritance to an object. - =head2 METHODS =over @@ -2948,7 +2946,8 @@ You should have received a copy of the GNU General Public License along with thi =head2 DESCRIPTION -Generic class implementation of an Insteon Controller. +Generic class implementation of an Insteon Controller, this is inherited by +both virtual (PLM Scene) and real (Switchlinc) objects. =head2 INHERITS @@ -2964,7 +2963,7 @@ package Insteon::BaseController; use strict; -@Insteon::BaseController::ISA = ('Generic_Item'); +@Insteon::BaseController::ISA = ('Insteon::BaseObject'); =item C @@ -3518,98 +3517,6 @@ You should have received a copy of the GNU General Public License along with thi =cut -#################################### -### ##################### -### DeviceController ############### -### ############### -#################################### - -=head1 B - -=head2 DESCRIPTION - -Generic class implementation of an Device Controller. - -=head2 INHERITS - -L - -=head2 METHODS - -=over - -=cut - -package Insteon::DeviceController; - -use strict; - -@Insteon::DeviceController::ISA = ('Insteon::BaseController'); - -=item C - -Instantiates a new object. - -=cut - -sub new -{ - my ($class,$p_deviceid,$p_interface,$p_devcat) = @_; - - # note that $p_deviceid will be 00.00.00: if the link uses the interface as the controller - my $self = new Insteon::BaseController($p_deviceid,$p_interface); - bless $self,$class; - return $self; -} - -=item C - -Requests the current status of the device and calls C on the response. -This will trigger tied_events. - -=cut - -sub request_status -{ - my ($self,$requestor) = @_; -# if ($self->group ne '01') { - if ($$self{members} and !($self->isa('Insteon::InterfaceController')) - and (!(ref $requestor) or ($requestor eq $self))) { - &::print_log("[Insteon::DeviceController] requesting status for members of " . $$self{object_name}); - foreach my $member (keys %{$$self{members}}) { - next unless $member->isa('Insteon::BaseObject'); - my $member_obj = $$self{members}{$member}{object}; - next if $requestor eq $member_obj; - if ($member_obj->isa('Insteon::BaseDevice')) { - &::print_log("[Insteon::DeviceController] checking status of " . $member_obj->get_object_name() - . " for requestor " . $requestor->get_object_name()); - $member_obj->request_status($self); - } - } - } - # the following has bad assumptions in that we don't always know if a device is a responder - # since it could be a slave - if ($self->is_root && $self->is_responder) { - $self->Insteon::BaseDevice::request_status($requestor); - } -} - -=back - -=head2 AUTHOR - -Gregg Liming / gregg@limings.net, Kevin Robert Keegan, Michael Stovenour - -=head2 LICENSE - -This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -=cut - #################################### ### ############ ### InterfaceController ############ @@ -3620,7 +3527,7 @@ You should have received a copy of the GNU General Public License along with thi =head2 DESCRIPTION -Generic class implementation of an Interface Controller. These are the PLM Scenes. +Generic class implementation that supports PLM Scenes. =head2 INHERITS diff --git a/lib/Insteon/Controller.pm b/lib/Insteon/Controller.pm index f1ca08f7a..03d2ee285 100644 --- a/lib/Insteon/Controller.pm +++ b/lib/Insteon/Controller.pm @@ -41,7 +41,6 @@ must first be put into "awake mode." =head2 INHERITS L, -L, L =head2 METHODS @@ -55,7 +54,7 @@ package Insteon::RemoteLinc; use strict; use Insteon::BaseInsteon; -@Insteon::RemoteLinc::ISA = ('Insteon::BaseDevice','Insteon::DeviceController', 'Insteon::MultigroupDevice'); +@Insteon::RemoteLinc::ISA = ('Insteon::BaseDevice', 'Insteon::MultigroupDevice'); my %message_types = ( %Insteon::BaseDevice::message_types, diff --git a/lib/Insteon/Energy.pm b/lib/Insteon/Energy.pm index 496410eb6..ab30362d8 100644 --- a/lib/Insteon/Energy.pm +++ b/lib/Insteon/Energy.pm @@ -53,8 +53,7 @@ it may require a factory reset. =head2 INHERITS -L, -L +L =head2 METHODS @@ -67,7 +66,7 @@ use Insteon::BaseInsteon; package Insteon::SynchroLinc; -@Insteon::SynchroLinc::ISA = ('Insteon::BaseDevice','Insteon::DeviceController'); +@Insteon::SynchroLinc::ISA = ('Insteon::BaseDevice'); =item C @@ -414,8 +413,7 @@ the following examples: =head2 INHERITS -L, -L +L =head2 METHODS @@ -428,7 +426,7 @@ use Insteon::BaseInsteon; package Insteon::iMeter; -@Insteon::iMeter::ISA = ('Insteon::BaseDevice','Insteon::DeviceController'); +@Insteon::iMeter::ISA = ('Insteon::BaseDevice'); =item C diff --git a/lib/Insteon/IOLinc.pm b/lib/Insteon/IOLinc.pm index 9505c97e6..e95490ba4 100755 --- a/lib/Insteon/IOLinc.pm +++ b/lib/Insteon/IOLinc.pm @@ -85,7 +85,6 @@ in the definition may be enough to make it work, I don't yet know. =head2 INHERITS L, -L =head2 METHODS @@ -98,7 +97,7 @@ use Insteon::BaseInsteon; package Insteon::IOLinc; -@Insteon::IOLinc::ISA = ('Insteon::BaseDevice', 'Insteon::DeviceController'); +@Insteon::IOLinc::ISA = ('Insteon::BaseDevice'); my %operating_flags = ( 'program_lock_on' => '00', diff --git a/lib/Insteon/Irrigation.pm b/lib/Insteon/Irrigation.pm index fe7ca00d5..295a940ba 100755 --- a/lib/Insteon/Irrigation.pm +++ b/lib/Insteon/Irrigation.pm @@ -45,8 +45,7 @@ Provides basic support for the EzFlora (aka EzRain) sprinkler controller. =head2 INHERITS -L, -L +L =head2 METHODS @@ -59,7 +58,7 @@ use Insteon::BaseInsteon; package Insteon::Irrigation; -@Insteon::Irrigation::ISA = ('Insteon::BaseDevice','Insteon::DeviceController'); +@Insteon::Irrigation::ISA = ('Insteon::BaseDevice'); our %message_types = ( %Insteon::BaseDevice::message_types, diff --git a/lib/Insteon/Lighting.pm b/lib/Insteon/Lighting.pm index 9cbb76b39..ae245bd9b 100644 --- a/lib/Insteon/Lighting.pm +++ b/lib/Insteon/Lighting.pm @@ -464,7 +464,6 @@ Provides support for the Insteon ApplianceLinc. =head2 INHERITS L -L =head2 METHODS @@ -477,7 +476,7 @@ package Insteon::ApplianceLinc; use strict; use Insteon::BaseInsteon; -@Insteon::ApplianceLinc::ISA = ('Insteon::BaseLight','Insteon::DeviceController'); +@Insteon::ApplianceLinc::ISA = ('Insteon::BaseLight'); =item C @@ -530,7 +529,7 @@ Provides support for the Insteon LampLinc. =head2 INHERITS L, -L + =head2 METHODS @@ -543,7 +542,7 @@ package Insteon::LampLinc; use strict; use Insteon::BaseInsteon; -@Insteon::LampLinc::ISA = ('Insteon::DimmableLight','Insteon::DeviceController'); +@Insteon::LampLinc::ISA = ('Insteon::DimmableLight'); =item C @@ -596,7 +595,7 @@ Provides support for the Insteon SwitchLinc Relay. =head2 INHERITS L, -L + =head2 METHODS @@ -609,7 +608,7 @@ package Insteon::SwitchLincRelay; use strict; use Insteon::BaseInsteon; -@Insteon::SwitchLincRelay::ISA = ('Insteon::BaseLight','Insteon::DeviceController'); +@Insteon::SwitchLincRelay::ISA = ('Insteon::BaseLight'); =item C @@ -693,7 +692,7 @@ Provides support for the Insteon SwitchLinc. =head2 INHERITS L, -L + =head2 METHODS @@ -706,7 +705,7 @@ package Insteon::SwitchLinc; use strict; use Insteon::BaseInsteon; -@Insteon::SwitchLinc::ISA = ('Insteon::DimmableLight','Insteon::DeviceController'); +@Insteon::SwitchLinc::ISA = ('Insteon::DimmableLight'); =item C @@ -763,7 +762,7 @@ Provides support for the Insteon KeypadLinc Relay. =head2 INHERITS L, -L, +, L =head2 METHODS @@ -777,7 +776,7 @@ package Insteon::KeyPadLincRelay; use strict; use Insteon::BaseInsteon; -@Insteon::KeyPadLincRelay::ISA = ('Insteon::BaseLight','Insteon::DeviceController', 'Insteon::MultigroupDevice'); +@Insteon::KeyPadLincRelay::ISA = ('Insteon::BaseLight', 'Insteon::MultigroupDevice'); our %operating_flags = ( 'program_lock_on' => '00', @@ -1151,7 +1150,7 @@ Provides support for the Insteon KeypadLinc. =head2 INHERITS L, -L + =head2 METHODS @@ -1164,7 +1163,7 @@ package Insteon::KeyPadLinc; use strict; use Insteon::BaseInsteon; -@Insteon::KeyPadLinc::ISA = ('Insteon::KeyPadLincRelay', 'Insteon::DimmableLight','Insteon::DeviceController'); +@Insteon::KeyPadLinc::ISA = ('Insteon::KeyPadLincRelay', 'Insteon::DimmableLight'); =item C @@ -1227,7 +1226,7 @@ Provides support for the Insteon Micro On/Off Module. =head2 INHERITS L, -L + =head2 METHODS @@ -1240,7 +1239,7 @@ package Insteon::MicroSwitchRelay; use strict; use Insteon::BaseInsteon; -@Insteon::MicroSwitchRelay::ISA = ('Insteon::BaseLight','Insteon::DeviceController'); +@Insteon::MicroSwitchRelay::ISA = ('Insteon::BaseLight'); =item C @@ -1500,7 +1499,7 @@ Provides support for the Insteon Micro Dimmer Module. =head2 INHERITS L, -L + =head2 METHODS @@ -1513,7 +1512,7 @@ package Insteon::MicroSwitch; use strict; use Insteon::BaseInsteon; -@Insteon::MicroSwitch::ISA = ('Insteon::MicroSwitchRelay', 'Insteon::DimmableLight','Insteon::DeviceController'); +@Insteon::MicroSwitch::ISA = ('Insteon::MicroSwitchRelay', 'Insteon::DimmableLight'); =item C @@ -1568,7 +1567,7 @@ Provides support for the Insteon FanLinc. =head2 INHERITS L, -L, +, L =head2 METHODS @@ -1582,7 +1581,7 @@ package Insteon::FanLinc; use strict; use Insteon::BaseInsteon; -@Insteon::FanLinc::ISA = ('Insteon::DimmableLight','Insteon::DeviceController', 'Insteon::MultigroupDevice'); +@Insteon::FanLinc::ISA = ('Insteon::DimmableLight', 'Insteon::MultigroupDevice'); =item C diff --git a/lib/Insteon/Security.pm b/lib/Insteon/Security.pm index cdd325efd..16fc64e82 100644 --- a/lib/Insteon/Security.pm +++ b/lib/Insteon/Security.pm @@ -95,7 +95,6 @@ certain threshold. =head2 INHERITS L, -L =head2 METHODS @@ -108,7 +107,7 @@ package Insteon::MotionSensor; use strict; use Insteon::BaseInsteon; -@Insteon::MotionSensor::ISA = ('Insteon::BaseDevice', 'Insteon::DeviceController'); +@Insteon::MotionSensor::ISA = ('Insteon::BaseDevice'); =item C @@ -718,8 +717,7 @@ expense of additional battery usage. =head2 INHERITS -L, -L +L =head2 METHODS @@ -732,7 +730,7 @@ package Insteon::TriggerLinc; use strict; use Insteon::BaseInsteon; -@Insteon::TriggerLinc::ISA = ('Insteon::BaseDevice','Insteon::DeviceController'); +@Insteon::TriggerLinc::ISA = ('Insteon::BaseDevice'); my %message_types = ( %Insteon::BaseDevice::message_types diff --git a/lib/Insteon/Thermostat.pm b/lib/Insteon/Thermostat.pm index 979d00742..39d40be3f 100755 --- a/lib/Insteon/Thermostat.pm +++ b/lib/Insteon/Thermostat.pm @@ -150,8 +150,6 @@ Kevin Robert Keegan =head1 INHERITS -B - B =head1 Methods @@ -165,7 +163,7 @@ package Insteon::Thermostat; use strict; use Insteon::BaseInsteon; -@Insteon::Thermostat::ISA = ('Insteon::BaseDevice','Insteon::DeviceController'); +@Insteon::Thermostat::ISA = ('Insteon::BaseDevice'); # -------------------- START OF SUBROUTINES --------------------