[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/tools/java/com/rincon/blackbook/bboot
BBootEvents.class, NONE, 1.1 BBoot.java, NONE, 1.1 BBoot.class,
NONE, 1.1 BBootEvents.java, NONE, 1.1
dmm
rincon at users.sourceforge.net
Thu Apr 20 16:02:54 PDT 2006
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/tools/java/com/rincon/blackbook/printstatus
PrintSector.java, NONE, 1.1 PrintFile.class, NONE,
1.1 PrintFile.java, NONE, 1.1 PrintSector.class, NONE,
1.1 PrintNode.java, NONE, 1.1 PrintNode.class, NONE,
1.1 readme.txt, NONE, 1.1
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/tools/java/com/rincon/blackbook
readme.txt, NONE, 1.1 DataOutput.class, NONE, 1.1 Util.class,
NONE, 1.1 DataOutput.java, NONE, 1.1 Util.java, NONE,
1.1 Commands.java, NONE, 1.1 Commands.class, NONE,
1.1 BlackbookConnect.java, NONE, 1.1 BlackbookConnect.class,
NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/rincon/tools/java/com/rincon/blackbook/bboot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15414/contrib/rincon/tools/java/com/rincon/blackbook/bboot
Added Files:
BBootEvents.class BBoot.java BBoot.class BBootEvents.java
Log Message:
Fixed the java/com directory, and added in two more packages: Blackbook, and EavesLogger.
--- NEW FILE: BBootEvents.class ---
Êþº¾
SourceFile
--- NEW FILE: BBoot.java ---
package com.rincon.blackbook.bboot;
/*
* Copyright (c) 2004-2006 Rincon Research Corporation.
* All rights reserved.
*
* Rincon Research will permit distribution and use by others subject to
* the restrictions of a licensing agreement which contains (among other things)
* the following restrictions:
*
* 1. No credit will be taken for the Work of others.
* 2. It will not be resold for a price in excess of reproduction and
* distribution costs.
* 3. Others are not restricted from copying it or using it except as
* set forward in the licensing agreement.
* 4. Commented source code of any modifications or additions will be
* made available to Rincon Research on the same terms.
* 5. This notice will remain intact and displayed prominently.
*
* Copies of the complete licensing agreement may be obtained by contacting
* Rincon Research, 101 N. Wilmot, Suite 101, Tucson, AZ 85711.
*
* There is no warranty with this product, either expressed or implied.
* Use at your own risk. Rincon Research is not liable or responsible for
* damage or loss incurred or resulting from the use or misuse of this software.
*/
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.rincon.blackbook.Commands;
import com.rincon.blackbook.messages.BlackbookConnectMsg;
import net.tinyos.message.Message;
import net.tinyos.message.MessageListener;
import net.tinyos.message.MoteIF;
import net.tinyos.util.Messenger;
public class BBoot implements MessageListener {
/** Communication with the mote */
private MoteIF comm = new MoteIF((Messenger) null);
/** List of FileTransferEvents listeners */
private static List listeners = new ArrayList();
/**
* Constructor
*
*/
public BBoot() {
comm.registerListener(new BlackbookConnectMsg(), this);
}
/**
* Add a FileTransferEvents listener
* @param listener
*/
public void addListener(BBootEvents listener) {
if(!listeners.contains(listener)) {
listeners.add(listener);
}
}
/**
* Remove a FileTransferEvents listener
* @param listener
*/
public void removeListener(BBootEvents listener) {
listeners.remove(listener);
}
public void messageReceived(int to, Message m) {
BlackbookConnectMsg inMsg = (BlackbookConnectMsg) m;
switch(inMsg.get_cmd()) {
case Commands.REPLY_BOOT:
for(Iterator it = listeners.iterator(); it.hasNext(); ) {
((BBootEvents) it.next()).booted((int) inMsg.get_length(), inMsg.get_data()[0], inMsg.get_result() == Commands.SUCCESS);
}
}
}
}
--- NEW FILE: BBoot.class ---
Êþº¾
get_length
get_result
SourceFile
BBoot.java
--- NEW FILE: BBootEvents.java ---
package com.rincon.blackbook.bboot;
/*
* Copyright (c) 2004-2006 Rincon Research Corporation.
* All rights reserved.
*
* Rincon Research will permit distribution and use by others subject to
* the restrictions of a licensing agreement which contains (among other things)
* the following restrictions:
*
* 1. No credit will be taken for the Work of others.
* 2. It will not be resold for a price in excess of reproduction and
* distribution costs.
* 3. Others are not restricted from copying it or using it except as
* set forward in the licensing agreement.
* 4. Commented source code of any modifications or additions will be
* made available to Rincon Research on the same terms.
* 5. This notice will remain intact and displayed prominently.
*
* Copies of the complete licensing agreement may be obtained by contacting
* Rincon Research, 101 N. Wilmot, Suite 101, Tucson, AZ 85711.
*
* There is no warranty with this product, either expressed or implied.
* Use at your own risk. Rincon Research is not liable or responsible for
* damage or loss incurred or resulting from the use or misuse of this software.
*/
public interface BBootEvents {
/**
* The file system finished booting
* @param totalNodes - the total number of nodes found on flash
* @param result - SUCCESS if the file system is ready for use.
*/
public void booted(int totalNodes, short totalFiles, boolean result);
}
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/tools/java/com/rincon/blackbook/printstatus
PrintSector.java, NONE, 1.1 PrintFile.class, NONE,
1.1 PrintFile.java, NONE, 1.1 PrintSector.class, NONE,
1.1 PrintNode.java, NONE, 1.1 PrintNode.class, NONE,
1.1 readme.txt, NONE, 1.1
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/tools/java/com/rincon/blackbook
readme.txt, NONE, 1.1 DataOutput.class, NONE, 1.1 Util.class,
NONE, 1.1 DataOutput.java, NONE, 1.1 Util.java, NONE,
1.1 Commands.java, NONE, 1.1 Commands.class, NONE,
1.1 BlackbookConnect.java, NONE, 1.1 BlackbookConnect.class,
NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list