|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SpeckCapability
This interface represents the set of simulator capabilities exposed
to Speck instances by default. Specks that require more of the
simulator's functionality can simply cast to SpeckSim, but
this is a bit naughty and opens up the avenue for cheating at being
a speck
| Method Summary | |
|---|---|
Environment |
getEnvironment(java.lang.String name)
Gets an Environment object from the simulator |
float |
getTime()
Gets the current simulation time |
void |
initiateBroadcast(Speck speck,
Message m,
MessageShell shell,
MACProtocol mac)
Initiates a broadcast |
void |
initiateBroadcast(Speck speck,
MessageProducer mp,
MessageShell shell,
MACProtocol mac)
Initiates a broadcast. |
void |
postEvent(SimulationEvent se)
Post an event onto the queue. |
void |
removeEvent(SimulationEvent se)
Removes an event from the event queue. |
void |
removeOwnedEvents(Speck owner)
Remove all events with a particular Speck as an owner |
| Method Detail |
|---|
float getTime()
void initiateBroadcast(Speck speck,
Message m,
MessageShell shell,
MACProtocol mac)
speck - The transmitting speckm - The message to transmitshell - The extents of the broadcastmac - The MAC protocol that controls the broadcast
void initiateBroadcast(Speck speck,
MessageProducer mp,
MessageShell shell,
MACProtocol mac)
speck - The transmitting speckmp - The provider of the method to transmit.shell - The extents of the broadcastmac - The MAC protocol that controls the broadcastEnvironment getEnvironment(java.lang.String name)
Environment object from the simulator
name - The name of the desired Environment object
Environment object, or null if there
is no such objectvoid postEvent(SimulationEvent se)
se - The event to post.void removeEvent(SimulationEvent se)
se - The event to remove. Must be non-nullvoid removeOwnedEvents(Speck owner)
owner - The owner Speck
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||