| perfSONAR_PS-Collectors-Daemon documentation | Contained in the perfSONAR_PS-Collectors-Daemon distribution. |
perfSONAR_PS::Collectors::Base - The base module for periodic collectors.
This module provides a very simple base class to be used by all perfSONAR collectors.
To join the 'perfSONAR-PS' mailing list, please visit:
https://mail.internet2.edu/wws/info/i2-perfsonar
The perfSONAR-PS subversion repository is located at:
https://svn.internet2.edu/svn/perfSONAR-PS
Questions and comments can be directed to the author, or the mailing list.
$Id:$
Aaron Brown, <aaron@internet2.edu>, Jason Zurawski, <zurawski@internet2.edu>
You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>
Copyright (c) 2004-2007, Internet2 and the University of Delaware
All rights reserved.
| perfSONAR_PS-Collectors-Daemon documentation | Contained in the perfSONAR_PS-Collectors-Daemon distribution. |
package perfSONAR_PS::Collectors::Base; use strict; use warnings; use Log::Log4perl qw(get_logger); use fields 'CONF', 'DIRECTORY'; our $VERSION = 0.09; sub new { my ($self, $conf, $directory) = @_; $self = fields::new($self) unless ref $self; if (defined $conf and $conf ne "") { $self->{CONF} = \%{$conf}; } if (defined $directory and $directory ne "") { $self->{DIRECTORY} = $directory; } return $self; } sub setConf { my ($self, $conf) = @_; my $logger = get_logger("perfSONAR_PS::Collectors::Base"); if(defined $conf and $conf ne "") { $self->{CONF} = \%{$conf}; } else { $logger->error("Missing argument."); } return; } sub setDirectory { my ($self, $directory) = @_; my $logger = get_logger("perfSONAR_PS::Collectors::Base"); if(defined $directory and $directory ne "") { $self->{DIRECTORY} = $directory; } else { $logger->error("Missing argument."); } return; } sub init { my ($self) = @_; my $logger = get_logger("perfSONAR_PS::Collectors::Base"); $logger->error("collectMeasurements() function is not implemented"); return -1; } sub collectMeasurements { my ($self) = @_; my $logger = get_logger("perfSONAR_PS::Collectors::Base"); $logger->error("collectMeasurements() function is not implemented"); return -1; } 1; __END__
# vim: expandtab shiftwidth=4 tabstop=4