diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-18 14:31:07 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-18 14:31:07 +0000 |
commit | cfd61537b47387b0fb5c8228baad6cec16d8f6e6 (patch) | |
tree | 108deea65c09c7c273a9b981f8783efcd433eaea /xpp/utils/zconf/Zaptel/Chans.pm | |
parent | 4391b4a6ee42bdfd8e097c5ee5485e9eb13f19a0 (diff) |
xpp r5151:
* xpd_pri: Basically ready.
* PCM synchronization changes:
- Each Astribank unit ticks independently. Each with its own PLL.
- HOST synchronization is gone. Loading of xpp will no longer cause
useless 250 ticks per second if you have no Astribank.
- Synchronization from the zaptel sync master requires setting
ZAPTEL as sync source (xpp_sync ZAPTEL).
* rx_tasklet is now a parameter of the module xpp, rather than of xpp_usb.
* New FPGA firmware: 5128 (1151) / 5122 (1141, 1131):
- Fixes synchronization issues.
- PRI module: E1 should now work.
* perl module and utilities:
- Modules no longer magically scan system on initialization.
- Scanning is by calling explicit methods.
- "Serial" has been renamed "Label". It is basically unique, but
should be modifieble.
- Some basic documentation of zaptel perl modules.
* Default sort order of zt_registration is back to SORT_CONNCTOR.
* zt_registration proc file now shows the number of span registered to
if registered. Try: grep . /proc/xpp/XBUS-*/XPD-*/zt_registration
* genzaptelconf: Allow using a custom command instead of
/etc/init.d/asterisk to start/stop asterisk.
* Fixed the typo "Slagish".
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3506 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/zconf/Zaptel/Chans.pm')
-rw-r--r-- | xpp/utils/zconf/Zaptel/Chans.pm | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/xpp/utils/zconf/Zaptel/Chans.pm b/xpp/utils/zconf/Zaptel/Chans.pm index f105a8c..236d6af 100644 --- a/xpp/utils/zconf/Zaptel/Chans.pm +++ b/xpp/utils/zconf/Zaptel/Chans.pm @@ -8,34 +8,30 @@ package Zaptel::Chans; # $Id$ # use strict; - -# Accessors (miniperl does not have Class:Accessor) -our $AUTOLOAD; -sub AUTOLOAD { - my $self = shift; - my $name = uc($AUTOLOAD); - $name =~ s/.*://; # strip fully-qualified portion - if (@_) { - return $self->{$name} = shift; - } else { - return $self->{$name}; - } -} +use XppUtils; sub new($$$$$$) { my $pack = shift or die "Wasn't called as a class method\n"; my $span = shift or die "Missing a span parameter\n"; - my $num = shift or die "Missing a channel number parameter\n"; - my $fqn = shift or die "Missing a channel fqn parameter\n"; - my $signalling = shift || ''; - my $info = shift || ''; + my $line = shift or die "Missing an input line\n"; + my ($num, $fqn, $rest) = split(/\s+/, $line, 3); + $num or die "Missing a channel number parameter\n"; + $fqn or die "Missing a channel fqn parameter\n"; + my $signalling = ''; + if(defined $rest && ($rest =~ s/(\w+)//)) { + $signalling = $1; + } + my $info = ''; + if(defined $rest && ($rest =~ s/(.*)//)) { + $info = $1; + } my $self = {}; bless $self, $pack; - $self->span($span); - $self->num($num); - $self->fqn($fqn); - $self->signalling($signalling); - $self->info($info); + $self->{SPAN} = $span; + $self->{NUM} = $num; + $self->{FQN} = $fqn; + $self->{SIGNALLING} = $signalling; + $self->{INFO} = $info; my $type; if($fqn =~ m|\bXPP_(\w+)/.*$|) { $type = $1; # One of our AB |