perfSONAR_PS::Services::MP::Agent::ConstantValue - A perfsonar MP Agent class that returns a constant value.
This module returns a constant value. It inherits from perfSONAR_PS::MP::Agent::Base to provide a consistent interface.
# create and setup a new Agent my $agent = perfSONAR_PS::Services::MP::Agent::ConstantValue( 5 ); # collect the results (i.e. run the command) if( $mp->collectMeasurements() == 0 ) { # get the raw datastructure for the measurement print "Results:\n" . $self->results() . "\n"; } # opps! something went wrong! :( else { print STDERR "Command: '" . $self->commandString() . "' failed with result '" . $self->results() . "': " . $agent->error() . "\n"; }
Creates a new agent class
$value = constant value to set
No initiation needed, do nothing
Always okay as long as the constant value is set.
-1 = something failed 0 = command ran okay
Returns the results (ie the constant value assigned in the constructor). No need to redefine here as it's inherited.
To install IEPM::PingER::Statistics::RTT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IEPM::PingER::Statistics::RTT
CPAN shell
perl -MCPAN -e shell install IEPM::PingER::Statistics::RTT
For more information on module installation, please visit the detailed CPAN module installation guide.