|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.messaging.devices.components.Device
nl.tudelft.simulation.messaging.devices.components.ReceivingDevice
Standard implementation of a receiving device.
Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
Delft, the Netherlands. All rights reserved.
See for project information
www.simulation.tudelft.nl .
The source code and binary code of this software is proprietary information
of Delft University of Technology.
| Field Summary | |
protected MessageQueueInterface |
queue
The queue to store the messages in |
| Fields inherited from class nl.tudelft.simulation.messaging.devices.components.Device |
name |
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| Fields inherited from interface nl.tudelft.simulation.messaging.devices.components.ReceivingDeviceInterface |
RECEIVED_NEW_MESSAGE_EVENT |
| Fields inherited from interface nl.tudelft.simulation.messaging.devices.components.DeviceInterface |
STATE_CHANGE_EVENT |
| Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
FIRST_POSITION, LAST_POSITION |
| Constructor Summary | |
ReceivingDevice(java.lang.String name,
DeviceType deviceType,
int transmissionDelay,
double transmissionFrequency,
MessageQueueInterface queue)
constructs a new receiving device, override the default transmission delay and frequency from the DeviceType. |
|
ReceivingDevice(java.lang.String name,
DeviceType deviceType,
MessageQueueInterface queue)
constructs a new receiving device, override the default transmission delay and frequency from the DeviceType. |
|
| Method Summary | |
MessageQueueInterface |
getQueue()
get the queue of messages that have already been received. |
java.lang.Object |
receive(Message message)
receives a message |
| Methods inherited from class nl.tudelft.simulation.messaging.devices.components.Device |
getDeviceType, getName, getState, getTransmissionDelay, getTransmissionFrequency, setState |
| Methods inherited from class nl.tudelft.simulation.event.EventProducer |
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.messaging.devices.components.DeviceInterface |
getDeviceType, getName, getState, getTransmissionDelay, getTransmissionFrequency |
| Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
addListener, addListener, addListener, addListener, getEventTypes, removeListener |
| Field Detail |
protected MessageQueueInterface queue
| Constructor Detail |
public ReceivingDevice(java.lang.String name,
DeviceType deviceType,
MessageQueueInterface queue)
name - the name or description of the devicedeviceType - the type of devicequeue - the type of queue to store the messages in
public ReceivingDevice(java.lang.String name,
DeviceType deviceType,
int transmissionDelay,
double transmissionFrequency,
MessageQueueInterface queue)
name - the name or description of the devicedeviceType - the type of devicetransmissionDelay - the default logarithmic transmission delay of
the device.transmissionFrequency - the maximum transmission frequency of the
device.queue - the type of queue to store the messages in| Method Detail |
public java.lang.Object receive(Message message)
ReceivingDeviceInterface
receive in interface ReceivingDeviceInterfacemessage - the object or message to receive
public MessageQueueInterface getQueue()
ReceivingDeviceInterface
getQueue in interface ReceivingDeviceInterfaceReceivingDeviceInterface.getQueue()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||