nl.tudelft.simulation.messaging.devices.components
Class SendingDevice

java.lang.Object
  extended bynl.tudelft.simulation.event.EventProducer
      extended bynl.tudelft.simulation.messaging.devices.components.Device
          extended bynl.tudelft.simulation.messaging.devices.components.SendingDevice
All Implemented Interfaces:
DeviceInterface, nl.tudelft.simulation.event.EventProducerInterface, SendingDeviceInterface, java.io.Serializable
Direct Known Subclasses:
DelaySendingDevice, QueuingSendingDevice

public abstract class SendingDevice
extends Device
implements SendingDeviceInterface

Abstract implementation of a sending device. The send method still needs to be implemented.

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.

Version:
$$Revision: 1.3 $$ $$Date: 2005/04/08 11:29:12 $$
Author:
Peter Jacobs , Stijn-Pieter van Houten , Alexander Verbraeck
See Also:
Serialized Form

Field Summary
 
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.DeviceInterface
STATE_CHANGE_EVENT
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
SendingDevice(java.lang.String name, DeviceType deviceType)
          constructs a new device, take the transmission delay and frequency from the DeviceType.
SendingDevice(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
abstract  java.lang.Object send(Message message)
          sends 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
 

Constructor Detail

SendingDevice

public SendingDevice(java.lang.String name,
                     DeviceType deviceType)
constructs a new device, take the transmission delay and frequency from the DeviceType.

Parameters:
name - the name or description of the device
deviceType - the type of device

SendingDevice

public SendingDevice(java.lang.String name,
                     DeviceType deviceType,
                     int transmissionDelay,
                     double transmissionFrequency)
constructs a new device, override the default transmission delay and frequency from the DeviceType.

Parameters:
name - the name or description of the device
deviceType - the type of device
transmissionDelay - the default logarithmic transmission delay of the device.
transmissionFrequency - the maximum transmission frequency of the device.
Method Detail

send

public abstract java.lang.Object send(Message message)
Description copied from interface: SendingDeviceInterface
sends a message

Specified by:
send in interface SendingDeviceInterface
Parameters:
message - the message to be send
Returns:
acknowledgement
See Also:
SendingDeviceInterface.send(nl.tudelft.simulation.messaging.Message)


Copyright © 2004-2005 Delft University of Technology, the Netherlands. All Rights Reserved.