diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-05-17 22:55:21 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-05-17 22:55:21 +0000 |
commit | 3af1b5fa2ec86d21762ad1cea81d2b275d4a9d48 (patch) | |
tree | 12da5f31396b3b1d3f99ed1bad8725bd50120689 /xpp/utils/xpp_sync | |
parent | c16f6ead0e9050d59d73f39f3015ecb64aecc214 (diff) |
XPP revision 3965:
* Tested with zaptel-1.2.17.1
* Add D-Channel TX, RX and BAD frames count in /proc/xpp/XBUS-*/XPD-*/bri_info
* Adjust output of xpp_sync script. Pad for 8 port BRI.
* Added a debugging module parport_debug (not compiled by default).
* Added an optional patch to zaptel:
- compiles only if ZAPTEL_SYNC_TICK is defined
- Allow interested driver to register for "sync" notification.
- Does not affect drivers that do not use this feature.
* Added external synchronization feature:
- Only if ZAPTEL_SYNC_TICK feature is compiled in
- Than XPP may be synchronized by another card (e.g: an Astribank
with FXS can be synchronized by a Digium PRI card).
- May be enabled/disabled in runtime via the 'sync_tick_active' module
parameter to the xpp.ko module.
* Fixed a potential bug in D-Channel hexdump printing.
* New visual indications in BRI leds:
- Constant ON RED/GREEN: Shows the port type -- NT/TE.
- Very fast "double blink": Layer1 work, no D-Channel yet.
- Steady blinking (1/2 sec): D-Channel trafic detected.
* xpp_fxloader moved to /usr/share/zaptel .
* adj_clock removed: never really used.
* Now we have Zaptel::Hardware and a sample zaptel_hardware script (not
(installed by default).
* We also have a sample perl zapconf (not installed by default) which
aims at replacing genzaptelconf (sans the modules detection).
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2537 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/xpp_sync')
-rwxr-xr-x | xpp/utils/xpp_sync | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/xpp/utils/xpp_sync b/xpp/utils/xpp_sync index e1258d9..d03c0a4 100755 --- a/xpp/utils/xpp_sync +++ b/xpp/utils/xpp_sync @@ -82,6 +82,22 @@ sub unique_xbus(@) { my $curr_sync = Zaptel::Xpp::sync; my @sync_xpds = unique_xbus(get_sorted_xpds()); +sub show_sync() { + foreach my $xpd (@sync_xpds) { + my $xbus = $xpd->xbus; + my @xpds = $xbus->xpds; + my @types = map { $_->type } @xpds; + my $mark = ($curr_sync =~ /\d+/ and $xbus->num == $curr_sync)?"+":""; + printf "\t%1s %s [ ", $mark, $xbus->name; + foreach my $x (sort { $a->num <=> $b->num } @xpds) { + printf "%-3s ", $x->type; + } + print "]"; + my $padding = ' ' x (4 * (8 - @xpds)); + printf "%s (%s)\n", $padding, $xbus->connector; + } +} + sub check_fxo_host_sync() { my @host_synced_xpds = grep { $_->xbus->num() ne $curr_sync } @sync_xpds; my @host_synced_fxos = grep($_->type eq 'FXO', @host_synced_xpds); @@ -111,29 +127,7 @@ if($sync) { } else { print "Current sync: ", $curr_sync, "\n"; print "Best Available Syncers:\n"; - foreach my $xpd (@sync_xpds) { - my $xbus = $xpd->xbus; - my @xpds = $xbus->xpds; - my @types = map { $_->type } @xpds; - my $mark = ($curr_sync =~ /\d+/ and $xbus->num == $curr_sync)?"+":""; - printf "\t%1s %s [ ", $mark, $xbus->name; - my $next = 0; - foreach my $x (sort { $a->num <=> $b->num } @xpds) { - my $n = $x->num; - # Fill spaces - for(my $i = $next; $i < $n; $i++) { - printf "%-3s ", ""; - } - printf "%-3s ", $x->type; - $next = $n + 1; - } - # Fill spaces to end - my $n = 4; - for(my $i = $next; $i < $n; $i++) { - printf "%-3s ", ""; - } - printf "] (%s)\n", $xbus->connector; - } + show_sync; check_fxo_host_sync; } |