* Move the project top-level CMakeLists.txt to the root of the project;
  this allows building Cyclone as part of ROS2 without any special
  tricks;
* Clean up the build options:
  ENABLE_SSL:    whether to check for and include OpenSSL support if a
                 library can be found (default = ON); this used to be
                 called DDSC_ENABLE_OPENSSL, the old name is deprecated
                 but still works
  BUILD_DOCS:    whether to build docs (default = OFF)
  BUILD_TESTING: whether to build test (default = OFF)
* Collect all documentation into top-level "docs" directory;
* Move the examples to the top-level directory;
* Remove the unused and somewhat misleading pseudo-default
  cyclonedds.xml;
* Remove unused cmake files
Signed-off-by: Erik Boasson <eb@ilities.com>
		
	
			
		
			
				
	
	
		
			48 lines
		
	
	
	
		
			938 B
		
	
	
	
		
			Perl
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
	
		
			938 B
		
	
	
	
		
			Perl
		
	
	
		
			Executable file
		
	
	
	
	
#!/usr/bin/perl -w
 | 
						|
 | 
						|
use strict;
 | 
						|
use bignum;
 | 
						|
use Time::HiRes qw (time);
 | 
						|
 | 
						|
if (@ARGV != 2) {
 | 
						|
  print STDERR "usage: $0 device {100|1000}\n";
 | 
						|
  exit 1;
 | 
						|
}
 | 
						|
 | 
						|
my $devname = $ARGV[0];
 | 
						|
my $speed = $ARGV[1] * 1e6;
 | 
						|
 | 
						|
$| = 1;
 | 
						|
my ($lt, $t, $lrecv, $lxmit);
 | 
						|
while (1) {
 | 
						|
  open FH, "< /proc/net/dev" or die "can't open /proc/net/dev";
 | 
						|
  $t = time;
 | 
						|
  my $info = undef;
 | 
						|
  while (<FH>) {
 | 
						|
    chomp;
 | 
						|
    if (s/^\s+$devname\s*:\s*//) {
 | 
						|
      $info = $_;
 | 
						|
      last;
 | 
						|
    }
 | 
						|
  }
 | 
						|
  close FH;
 | 
						|
  die "can't locate info for $devname" unless defined $info;
 | 
						|
 | 
						|
  my @info = split ' ', $info;
 | 
						|
  my $recv = $info[0] + 0;
 | 
						|
  my $xmit = $info[8] + 0;
 | 
						|
 | 
						|
  if (defined $lt) {
 | 
						|
    my $dr = $recv - $lrecv;
 | 
						|
    my $dx = $xmit - $lxmit;
 | 
						|
    my $dt = $t - $lt;
 | 
						|
    my $ur = 100 * (8 * $dr) / ($dt * $speed);
 | 
						|
    my $xr = 100 * (8 * $dx) / ($dt * $speed);
 | 
						|
    printf "r %5.1f x %5.1f (%8d %8d)\n", $ur, $xr, $dr, $dx;
 | 
						|
  }
 | 
						|
 | 
						|
  $lt = $t;
 | 
						|
  $lrecv = $recv;
 | 
						|
  $lxmit = $xmit;
 | 
						|
  sleep 1;
 | 
						|
}
 |