|
|||||||||||
| 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
An abstract Device that can be extended to a sending device, a receiving
device, or a device that combines sending and receiving.
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 java.lang.String |
name
Name of the device |
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| 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 | |
Device(java.lang.String name,
DeviceType deviceType)
constructs a new device, take the transmission delay and frequency from the DeviceType. |
|
Device(java.lang.String name,
DeviceType deviceType,
int transmissionDelay,
double transmissionFrequency)
constructs a new device, override the default transmission delay and frequency from the DeviceType. |
|
| Method Summary | |
DeviceType |
getDeviceType()
returns the device type |
java.lang.String |
getName()
returns the name of the device |
DeviceState |
getState()
returns the state of the device |
int |
getTransmissionDelay()
The transmission delay is defined on a log-10 scale, indicating the time it takes averagely in seconds to reach the other Actor. |
double |
getTransmissionFrequency()
The maximum transmission frequency indicates the average number of messages (say 1 page with data) that can be sent per second over the communication channel. |
void |
setState(DeviceState state)
|
| 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.event.EventProducerInterface |
addListener, addListener, addListener, addListener, getEventTypes, removeListener |
| Field Detail |
protected java.lang.String name
| Constructor Detail |
public Device(java.lang.String name,
DeviceType deviceType)
name - the name or description of the devicedeviceType - the type of device
public Device(java.lang.String name,
DeviceType deviceType,
int transmissionDelay,
double transmissionFrequency)
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.| Method Detail |
public java.lang.String getName()
DeviceInterface
getName in interface DeviceInterfaceDeviceInterface.getName()public DeviceState getState()
DeviceInterface
getState in interface DeviceInterfaceDeviceInterface.getState()public void setState(DeviceState state)
state - The state to set.public DeviceType getDeviceType()
DeviceInterface
getDeviceType in interface DeviceInterfaceDeviceInterface.getDeviceType()public int getTransmissionDelay()
DeviceInterface
getTransmissionDelay in interface DeviceInterfaceDeviceInterface.getTransmissionDelay()public double getTransmissionFrequency()
DeviceInterface
getTransmissionFrequency in interface DeviceInterfaceDeviceInterface.getTransmissionFrequency()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||