[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/plugins
AgimonePlugin.java, NONE, 1.1
Chien-Liang Fok
chien-liang at users.sourceforge.net
Mon Sep 18 11:17:13 PDT 2006
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/diku/evb13192/tos/lib/ieee802154/mac
CallbackServiceM.nc, NONE, 1.1 Ieee802154MacC.nc, 1.13,
1.14 mac.h, 1.12, 1.13 DataM.nc, 1.6, 1.7 BeaconTrackerM.nc,
1.13, 1.14 SuperframeM.nc, 1.9, 1.10 IndirectTxM.nc, 1.1,
1.2 MacConst.h, 1.1, 1.2 CfpControlM.nc, 1.1,
1.2 Ieee802154Adts.h, 1.10, 1.11 StartM.nc, 1.6,
1.7 AssociateM.nc, 1.8, 1.9 BeaconGeneratorM.nc, 1.1,
1.2 CapControlM.nc, 1.7, 1.8 GetSetM.nc, 1.4,
1.5 MacStateControlM.nc, 1.2, NONE
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/wustl/apps/AgillaAgents/GroupComm/chat
- New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/plugins
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18659
Added Files:
AgimonePlugin.java
Log Message:
initial commit
--- NEW FILE: AgimonePlugin.java ---
package edu.wustl.mobilab.agilla.plugins;
import limone.*;
import edu.wustl.mobilab.agilla.*;
import edu.wustl.mobilab.agilla.variables.*;
import edu.wustl.mobilab.agilla.mads.LocationManager;
import edu.wustl.mobilab.agimone.*;
import edu.wustl.mobilab.agimone.util.*;
/**
* A plugin that launches the Agimone service.
*
* @author liang
*/
public class AgimonePlugin extends Plugin {
AgimoneAgent agimoneAgent;
/**
* A constructor without any additional arguments
*
* @param injector The AgentInjector
*/
public AgimonePlugin(AgentInjector injector) {
this(injector, new String[0]);
}
/**
* A constructor with additional arguments.
*
* @param injector
* @param args
*/
public AgimonePlugin(AgentInjector injector, String[] args) {
// Prevent creation of new AgentInjector and give AgentInjector reference
// to agimone.
edu.wustl.mobilab.agimone.util.InjectorFactory.setInjector(injector);
String limone_port = "2200"; // The TCP port used by Limone. Limone uses this and the next port.
boolean limone_debug = false;
try {
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-agimone.name")) {
String nwName = args[++i];
if (nwName.length() > 3)
throw new Exception("Invalid network name, length must be 3.");
AgillaProperties.setNetworkName(nwName);
}
//else if (args[i].equals("-agilla.showAgentInjector"))
//InjectorFactory.setShowInjectorGUI(true);
//else if (args[i].equals("-agilla.port"))
//InjectorFactory.setPort(args[++i]);
else if (args[i].equals("-limone.debug"))
limone_debug = true;
else if (args[i].equals("-limone.port"))
limone_port = args[++i];
else if (args[i].equals("-limone.name"))
InjectorFactory.setAgentName(args[++i]); // "AgimoneAgent" default
else throw new Exception("Unknown parameter: " + args[i]);
}
} catch(Exception e) {
e.printStackTrace();
System.exit(1);
}
String[] limoneParams = null;
if (limone_debug)
limoneParams = new String[] {"-sPort", limone_port, "-debug"};
else
limoneParams = new String[] {"-sPort", limone_port};
try {
LimoneServer.getServer().parseArgs(limoneParams);
LimoneServer.getServer().boot();
agimoneAgent = (AgimoneAgent)LimoneServer.getServer()
.loadAgent("edu.wustl.mobilab.agimone.AgimoneAgent", InjectorFactory.getAgentName());
// The advertisement is an array of length 1 that contains a single AgillaString.
agimoneAgent.advertise(new AgillaStackVariable [] {
new AgillaString(AgillaProperties.networkName()) });
} catch(Exception e) {
e.printStackTrace();
}
// Pass a reference to the AgimoneAgent to the:
// QueryAgentLocMsgHandler
// QueryNumAgentsMsgHandler
// QueryNearestAgentMsgHandler
injector.getLocMgr().setAgimoneAgent(agimoneAgent);
}
public void reset() {
}
public String toString() {
return "Agimone Plugin";
}
}
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/diku/evb13192/tos/lib/ieee802154/mac
CallbackServiceM.nc, NONE, 1.1 Ieee802154MacC.nc, 1.13,
1.14 mac.h, 1.12, 1.13 DataM.nc, 1.6, 1.7 BeaconTrackerM.nc,
1.13, 1.14 SuperframeM.nc, 1.9, 1.10 IndirectTxM.nc, 1.1,
1.2 MacConst.h, 1.1, 1.2 CfpControlM.nc, 1.1,
1.2 Ieee802154Adts.h, 1.10, 1.11 StartM.nc, 1.6,
1.7 AssociateM.nc, 1.8, 1.9 BeaconGeneratorM.nc, 1.1,
1.2 CapControlM.nc, 1.7, 1.8 GetSetM.nc, 1.4,
1.5 MacStateControlM.nc, 1.2, NONE
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/wustl/apps/AgillaAgents/GroupComm/chat
- New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list