|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommunicationModel
Interface for the subsystem that controls communication.
Implementation classes may be made Configurable, or
annotated as such, and a gui will be generated
| Method Summary | |
|---|---|
float |
broadcast(Speck speck,
Message m,
MessageShell shell)
Simulate a broadcast |
boolean |
carrierSense(Speck speck,
int channel)
Detects if a speck is currently affected by a transmission |
java.lang.String |
getName()
Gets the name of this communication model |
SerializableState |
getState()
Gets a state object that will be passed to the gui |
void |
init(SpeckSim simulator)
Called when the simulator is reset |
void |
initiateBroadcast(Speck speck,
Message m,
MessageShell shell,
MACProtocol mac)
Called by specks when they want to broadcast a message |
void |
initiateBroadcast(Speck speck,
MessageProducer mp,
MessageShell shell,
MACProtocol mac)
Called by specks when they want to broadcast a message. |
float |
isBroadcasting(Speck speck,
int channel)
Determines if a speck is currently broadcasting on a given channel |
| Method Detail |
|---|
java.lang.String getName()
void init(SpeckSim simulator)
simulator - The simulator
float isBroadcasting(Speck speck,
int channel)
speck - The speck to test forchannel - The channel to test for
boolean carrierSense(Speck speck,
int channel)
speck - The speck to test forchannel - The channel to test in
true if the speck is affected by a
broadcast in the specified channel, false
otherwise
float broadcast(Speck speck,
Message m,
MessageShell shell)
speck - The broadcasting speckm - The message to broadcastshell - The extents of the broadcast
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 will control the transmission
void initiateBroadcast(Speck speck,
MessageProducer mp,
MessageShell shell,
MACProtocol mac)
speck - The transmitting speckmp - An object that will provide the message to be
transmitted when the time comesshell - The extents of the broadcastmac - The MAC protocol that will control the transmissionSerializableState getState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||