Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
ffb52b97
Commit
ffb52b97
authored
Nov 19, 2004
by
Robert Ricci
Browse files
Change to handle the fact that motes are now subnodes of thier hosts.
parent
182ee5a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
mote/tbuisp.in
View file @
ffb52b97
...
...
@@ -89,28 +89,48 @@ MOTE: foreach my $mote (@motes) {
#
my
@uisp_args
;
my
(
$type
,
$class
)
=
TBNodeType
(
$mote
);
if
(
$class
ne
"
mote
")
{
#
# Make sure they gave us an actual mote
#
my
(
$motetype
,
$moteclass
)
=
TBNodeType
(
$mote
);
if
(
$moteclass
ne
"
mote
")
{
warn
"
$mote
is not a mote - skipping
\n
";
$errors
++
;
next
MOTE
;
}
#
# Find out the type of the mote's host, which we use for actual programming
#
my
$host
;
if
(
!
TBPhysNodeID
(
$mote
,
\
$host
))
{
warn
"
Error getting host for
$mote
- skipping
\n
";
$errors
++
;
next
MOTE
;
}
if
(
$host
eq
$mote
)
{
warn
"
Error - no host found for
$mote
- skipping
\n
";
$errors
++
;
next
MOTE
;
}
my
(
$hosttype
,
$hostclass
)
=
TBNodeType
(
$host
);
#
# Figure out how we talk to the programming board, and what chipset it has
#
TSWITCH:
for
(
$type
)
{
TSWITCH:
for
(
$
host
type
)
{
/^emote$/
&&
do
{
# Crossbow MIB600CA
# The name of the host to communicate with
push
@uisp_args
,
"
-dhost=
$
mote
";
push
@uisp_args
,
"
-dhost=
$
host
";
# The type of programming board on a emote
push
@uisp_args
,
"
-dprog=stk500
";
last
TSWITCH
;
};
# Default
warn
"
Mote
$mote
has unsupported type
$type
- skipping
";
warn
"
Mote host
$host
for
$mote
has unsupported type
$hosttype
"
.
"
- skipping
";
$errors
++
;
next
MOTE
;
}
...
...
@@ -118,7 +138,7 @@ MOTE: foreach my $mote (@motes) {
#
# Find the name of the microcontroller on the board
#
my
(
$proc
,
$speed
)
=
TBNodeTypeProcInfo
(
$type
);
my
(
$proc
,
$speed
)
=
TBNodeTypeProcInfo
(
$
mote
type
);
PSWITCH:
for
(
$proc
)
{
/^ATmega128/i
&&
do
{
push
@uisp_args
,
"
-dpart=ATmega128
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment