| perfSONAR_PS-Status-Common documentation | Contained in the perfSONAR_PS-Status-Common distribution. |
perfSONAR_PS::Status::Link - A module that provides an object with an interface for link status information.
This module is to be treated as an object representing the status of a link for a certain range of time.
Creates a new instance of a link object with the specified values (None of which is required, they can all be set later).
Sets the identifier for this link.
Sets the knowledge level for the information about this link.
Sets the start time of the range over which this link had the specified status
Sets the end time of the range over which this link had the specified status
Sets the operational status of this link over the range of time specified
Sets the administrative status of this link over the range of time specified
Gets the identifier for this link
Gets the knowledge level for the information about this link.
Gets the start time of the range over which this link had the specified status
Gets the end time of the range over which this link had the specified status
Gets the operational status of this link
Gets the administrative status of this link
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-2008, Internet2 and the University of Delaware
All rights reserved.
| perfSONAR_PS-Status-Common documentation | Contained in the perfSONAR_PS-Status-Common distribution. |
package perfSONAR_PS::Status::Link; use strict; use warnings; our $VERSION = 0.09; use fields 'ID', 'KNOWLEDGE', 'START_TIME', 'END_TIME', 'OPER_STATUS', 'ADMIN_STATUS'; sub new { my ($package, $link_id, $knowledge, $start_time, $end_time, $oper_status, $admin_status) = @_; my $self = fields::new($package); if (defined $link_id and $link_id ne "") { $self->{ID} = $link_id; } if (defined $knowledge and $knowledge ne "") { $self->{KNOWLEDGE} = $knowledge; } if (defined $start_time and $start_time ne "") { $self->{START_TIME} = $start_time; } if (defined $end_time and $end_time ne "") { $self->{END_TIME} = $end_time; } if (defined $oper_status and $oper_status ne "") { $self->{OPER_STATUS} = $oper_status; } if (defined $admin_status and $admin_status ne "") { $self->{ADMIN_STATUS} = $admin_status; } return $self; } sub setID { my ($self, $id) = @_; $self->{ID} = $id; return; } sub setKnowledge { my ($self, $knowledge) = @_; $self->{KNOWLEDGE} = $knowledge; return; } sub setStartTime { my ($self, $starttime) = @_; $self->{START_TIME} = $starttime; return; } sub setEndTime { my ($self, $endtime) = @_; $self->{END_TIME} = $endtime; return; } sub setOperStatus { my ($self, $oper_status) = @_; $self->{OPER_STATUS} = $oper_status; return; } sub setAdminStatus { my ($self, $admin_status) = @_; $self->{ADMIN_STATUS} = $admin_status; return; } sub getID { my ($self) = @_; return $self->{ID}; } sub getKnowledge { my ($self) = @_; return $self->{KNOWLEDGE}; } sub getStartTime { my ($self) = @_; return $self->{START_TIME}; } sub getEndTime { my ($self) = @_; return $self->{END_TIME}; } sub getOperStatus { my ($self) = @_; return $self->{OPER_STATUS}; } sub getAdminStatus { my ($self) = @_; return $self->{ADMIN_STATUS}; } 1; __END__
# vim: expandtab shiftwidth=4 tabstop=4