|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.state.BroadcastDetails
public class BroadcastDetails
Holds details of a broadcast
| Field Summary | |
|---|---|
int |
broadcastChannel
The channel ID of the broadcast |
float |
broadcastEndTime
The time at which the broadcast ended |
int |
broadcastingSpeckID
The id of the sending speck |
float |
broadcastStartTime
The time at which the broadcast started |
int[] |
interferedSpeckIDs
An array of the IDs of the specks that are interfered by the broadcast |
int |
messageSize
The size of the message |
int |
possibleRecipients
The number of specks that would be able to receive the broadcast under perfect conditions ie: no movement or interference |
int[] |
receivingSpeckIDs
An array of the IDs of the specks that are receiving the broadcast |
| Constructor Summary | |
|---|---|
BroadcastDetails()
Constructs a dummy BroadcastDetails that can be used to
constructs others with the decode method |
|
BroadcastDetails(int broadcastingSpeckID,
int broadcastChannel,
int possibleRecipients,
int[] receivingSpeckIDs,
int[] interferedSpeckIDs,
float broadcastStartTime,
float broadcastEndTime,
int messageSize)
Constructs a new BroadcastDetails |
|
| Method Summary | |
|---|---|
BroadcastDetails |
decode(byte[] data)
Decode the supplied data and construct a new state object from it. |
byte[] |
encode()
Encode the data of this state object to a byte array, such that it may be decoded by decode( data ) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int broadcastingSpeckID
public final int broadcastChannel
public final int possibleRecipients
public final int[] receivingSpeckIDs
public final int[] interferedSpeckIDs
public final float broadcastStartTime
public final float broadcastEndTime
public final int messageSize
| Constructor Detail |
|---|
public BroadcastDetails()
BroadcastDetails that can be used to
constructs others with the decode method
public BroadcastDetails(int broadcastingSpeckID,
int broadcastChannel,
int possibleRecipients,
int[] receivingSpeckIDs,
int[] interferedSpeckIDs,
float broadcastStartTime,
float broadcastEndTime,
int messageSize)
BroadcastDetails
broadcastingSpeckID - broadcastChannel - possibleRecipients - receivingSpeckIDs - interferedSpeckIDs - broadcastStartTime - broadcastEndTime - messageSize - | Method Detail |
|---|
public BroadcastDetails decode(byte[] data)
throws java.io.IOException
SerializableState
decode in interface SerializableStatedata - The data to decode. It was produced by the encode()
method
java.io.IOExceptionpublic byte[] encode()
SerializableState
encode in interface SerializableState
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||