# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

package Event_queue;

#
# This is my events queue entry for the Insteon PLCs. The Events are listed
# the SDK but if you write your own SALad app you can add Events
#
# Events are in the form of 02 45 xx, where xx is the Event number
#
sub new {
   my ($class, $etime, $emsg, $e) = @_;

   my $self = {};

   $$self{time}    = $etime; # a time string for the event
   $$self{message} = $emsg;  # the Event string (message)
   $$self{value}   = $e;     # the Event number

   bless $self, $class;

   return $self;
}

sub print {
   my ($self) = @_;

   return $$self{time} . ": [" . $$self{value} . "] " . $$self{message};
}

return 1;
__END__
