Net-TL1UDP

 view release on metacpan or  search on metacpan

lib/Net/TL1UDP.pm  view on Meta::CPAN

   our @ISA = qw(Exporter);
   # Functions and variables which are exported by default
   our @EXPORT = qw(
      node_login
      tl1_cmd
      tl1_cmdf
      debug_file
      close_debug
      retrieve_sid
      retrieve_ctag
      command_timeout
      timeout_counter
      inhibit_messages
      sarb_retry_limit
      sarb_retry_delay
      logoff
   );
} 

my $currentCTAG  = 0;      # Initialise the current CTAG value
my $sid          = '';     # Initialise the SID value

lib/Net/TL1UDP.pm  view on Meta::CPAN

   close (DEBUG) if (defined (fileno (DEBUG)));
}

# Function to retrieve the SID
sub retrieve_sid  { return $sid; }

# Function to return the current CTAG value
sub retrieve_ctag  { return $currentCTAG; }

# Function to retrieve or set the timeout value
sub command_timeout  {
   # If a value has been provided, set the timeout variable
   $timeout = $_[0] if (scalar(@_) == 1 && $_[0] =~ /^\d+$/ && $_[0] > 0);
   return $timeout;
}

# Function to retrieve or set the timeout counter value
sub timeout_counter  {
   # If a value has been provided, set the counter variable
   $to_counter = $_[0] if (scalar(@_) == 1 && $_[0] =~ /^\d+$/ && $_[0] >= 0);
   return $to_counter;

lib/Net/TL1UDP.pm  view on Meta::CPAN

Closes the debug file.  If this function is not called, the debug file will be closed (automatically) when the script finishes.

=item B<retrieve_sid>

Returns the System ID (SID) of the device if it can be determined.

=item B<retrieve_ctag>

Returns the current correlation tag (ctag) used by the module.

=item B<command_timeout ([TIMEOUT_SECS])>

Returns the current command timeout (in seconds).  Optionally, if TIMEOUT_SECS is provided, the timeout value can be changed.

The default timeout is 60 seconds.

e.g. - C<command_timeout (120)>

=item B<timeout_counter ([NUMBER])>

Returns the current number of commands that timed out (no response within the command timeout period).  Optionally, if NUMBER is provided, the counter value can be changed (e.g. - reset to 0).

e.g. - C<timeout_counter ()>

=item B<inhibit_messages ([01])>

By default, TL1UDP inhibits all autonomous messages (INH-MSG-ALL) when you log into the device.  If you want to allow autonomous messages, set inhibit_messages(0) or send the "ALW-MSG-ALL::ALL" command.  To inhibit messages again, set inhibit_message...



( run in 0.233 second using v1.01-cache-2.11-cpan-4d50c553e7e )