Changeset 283


Ignore:
Timestamp:
Sep 25, 2017, 8:32:54 PM (7 years ago)
Author:
g7moreau
Message:
  • Add modulo parameter to shift node in graph (to many switch children)
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r282 r283  
    27312731
    27322732   my $format = 'txt';
     2733   my $modulo = 0;
    27332734
    27342735   GetOptions(
    27352736      'format|f=s'  => \$format,
     2737      'modulo|m=i'  => \$modulo,
    27362738      );
    27372739
     
    27432745   $format = 'txt' if not defined $possible_format{$format};
    27442746
    2745    $possible_format{$format}->(@ARGV);
     2747   $possible_format{$format}->($modulo, @ARGV);
    27462748   return;
    27472749   }
     
    27902792#---------------------------------------------------------------
    27912793sub cmd_exportsw_dot {
     2794   my $modulo = shift;
    27922795
    27932796   my $switch_connection = YAML::Syck::LoadFile("$KLASK_SW_FILE");
     
    28732876               print "\"$sw:$port_connect\" -> \"$sw\" [len=2, style=bold, color=$color, arrowhead=normal, arrowtail=inv];\n";
    28742877               
    2875                $db_switch_line{$sw}++;
     2878               #$db_switch_line{$sw}++;
    28762879               #if ($db_switch_line{$sw} % 9 == 0) {
    28772880               #   # Create invisible node
     
    29192922            printf "   \"%s:%s\" -> \"%s:%s\" [style=$style, color=$color];\n", $sw, $db_switch_output_port{$sw}, $sw_connect, $port_connect;
    29202923
    2921             if ($db_switch_line{$sw_connect} % 9 == 0) {
     2924            next if $modulo == 0; # No shift (invisible nodes) in graph
     2925            $db_switch_line{$sw_connect}++;
     2926            if ($db_switch_line{$sw_connect} % $modulo == 0) {
    29222927               # Create invisible node
    29232928               $invisible_node++;
  • trunk/push-web

    r202 r283  
    4545
    4646
    47 $KLASK exportsw --format dot > ${TMP}/switch-map.txt
     47$KLASK exportsw --format dot --modulo 9 > ${TMP}/switch-map.txt
    4848
    4949
Note: See TracChangeset for help on using the changeset viewer.