diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-06-17 17:49:05 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-06-17 17:49:05 +0000 |
commit | 5b937d8b8c168e124442874b56a593a587160427 (patch) | |
tree | ab335626cf5cc47885d2a2e7b24224febbc5844c /drivers/dahdi/xpp/utils/zconf/Zaptel.pm | |
parent | ee0bc6496d06fac25b57ac93bab4a439f410ebde (diff) |
Move the xpp utilities to the tools side.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4374 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/utils/zconf/Zaptel.pm')
-rw-r--r-- | drivers/dahdi/xpp/utils/zconf/Zaptel.pm | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/dahdi/xpp/utils/zconf/Zaptel.pm b/drivers/dahdi/xpp/utils/zconf/Zaptel.pm deleted file mode 100644 index a7e7d6c..0000000 --- a/drivers/dahdi/xpp/utils/zconf/Zaptel.pm +++ /dev/null @@ -1,68 +0,0 @@ -package Zaptel; -# -# Written by Oron Peled <oron@actcom.co.il> -# Copyright (C) 2007, Xorcom -# This program is free software; you can redistribute and/or -# modify it under the same terms as Perl itself. -# -# $Id$ -# -use strict; -use Zaptel::Span; - -=head1 NAME - -Zaptel - Perl interface to Zaptel information - -This package allows access from Perl to information about Zaptel -hardware and loaded Zaptel devices. - -=head1 SYNOPSIS - - # Listing channels in analog spans: - use Zaptel; - # scans system: - my @xbuses = Zaptel::spans(); - for my $span (@spans) { - next if ($span->is_digital); - $span->num. " - [". $span->type ."] ". $span->name. "\n"; - for my $chan ($span->chans) { - print " - ".$chan->num . " - [". $chan->type. "] ". $chan->fqn". \n"; - } - } -=cut - -my $proc_base = "/proc/zaptel"; - -=head1 spans() - -Returns a list of span objects, ordered by span number. - -=cut - -sub spans() { - my @spans; - - -d $proc_base or return (); - foreach my $zfile (glob "$proc_base/*") { - $zfile =~ s:$proc_base/::; - my $span = Zaptel::Span->new($zfile); - push(@spans, $span); - } - @spans = sort { $a->num <=> $b->num } @spans; - return @spans; -} - -=head1 SEE ALSO - -Span objects: L<Zaptel::Span>. - -Zaptel channels objects: L<Zaptel::Chan>. - -Zaptel hardware devices information: L<Zaptel::Hardware>. - -Xorcom Astribank -specific information: L<Zaptel::Xpp>. - -=cut - -1; |