Ejemplo n.º 1
0
 /**
  * creates a new channel, if the channel exists it is removed (this method doubles as a
  * removeChannel)
  *
  * @param name the name of the channel
  */
 public void newChannel(String name, boolean pass) {
   if (channels.containsKey(name)) {
     channels.remove(name);
     cboChannels.removeItem(name);
   } else {
     channels.put(name, new Boolean(pass));
     cboChannels.addItem(name);
   }
 }
Ejemplo n.º 2
0
 // ------------------------------------------------------------------------
 // *****---Node Deleted---******//
 // this function defines what you do when a new node is deleted
 // It is called by net.tinyos.tinydb.topology.PacketAnalyzer.ObjectMainter
 public synchronized void NodeDeleted(NodeEvent e) {
   Integer deletedNodeNumber =
       e.GetNodeNumber(); // you probably want to delete the info pbject to track the data of
   // this new node
   proprietaryNodeInfo.remove(deletedNodeNumber);
 }