if (existing >= nextMoteID) {
nextMoteID = existing + 1;
}
}
for (Mote m: newMotes) {
MoteID moteID = m.getInterfaces().getMoteID();
if (moteID != null) {
moteID.setMoteID(nextMoteID++);
} else {
logger.warn("Can't set mote ID (no mote ID interface): " + m);
}
}