1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
specification "vpc" {
timeout 5.0
plug name { "0" "1" "2" "3" "4" "5" "6" "7" "8"
"9" "10" "11" "12" "13" "14" "15" }
script login {
send "login\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script logout {
send "logoff\n"
expect "[0-9]* OK\n"
}
script status_all {
# noise generator
# spew more than 1K (MIN_DEV_BUF) but less than 64K (MAX_DEV_BUF) to
# cause cbuf expansion but no wrap. (512 * 78 char = 39K)
send "spew 512\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
send "stat *\n"
foreachplug {
expect "plug ([0-9]+): (ON|OFF)\n"
setplugstate $1 $2 on="ON" off="OFF"
}
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
}
device "test0" "vpc" "./vpcd |&"
node "t[0-15]" "test0"
|