8
BEGIN { require "test.conf.pl"; }
12
my $mon = PGM::Test->new(tag => 'mon', host => $config{mon}{host}, cmd => $config{mon}{cmd});
13
my $sim = PGM::Test->new(tag => 'sim', host => $config{sim}{host}, cmd => $config{sim}{cmd});
14
my $app = PGM::Test->new(tag => 'app', host => $config{app}{host}, cmd => $config{app}{cmd});
21
$mon = $sim = $app = undef;
25
$SIG{'INT'} = sub { print "interrupt caught.\n"; close_ssh(); };
27
$mon->say ("filter $config{app}{ip}");
28
print "mon: ready.\n";
30
$sim->say ("create ao");
31
$sim->say ("bind ao");
32
$sim->say ("connect ao");
33
print "sim: ready.\n";
35
$app->say ("create ao");
36
$app->say ("bind ao");
37
$app->say ("connect ao");
38
$app->say ("listen ao"); # to process NAK requests
40
print "app: publish test data.\n";
41
$app->say ("send ao ringo");
42
$app->say ("send ao ichigo");
43
$app->say ("send ao momo");
48
print "mon: wait for odata ...\n";
49
$odata = $mon->wait_for_odata;
51
print "mon: received $ocnt x odata.\n";
54
print "sim: send nak to app.\n";
55
$sim->say ("net send nak ao $odata->{PGM}->{gsi}.$odata->{PGM}->{sourcePort} 2");
57
print "mon: wait for rdata ...\n";
59
print "mon: rdata received.\n";
61
print "test completed successfully.\n";