Class InputPort<T extends Number & Comparable<T>,TYPE>
java.lang.Object
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InputPort<T,TYPE>
- Type Parameters:
T
- the time typeTYPE
- The type of messages the input port accepts.
- All Implemented Interfaces:
InputPortInterface<T,
TYPE>
public class InputPort<T extends Number & Comparable<T>,TYPE>
extends Object
implements InputPortInterface<T,TYPE>
InputPort class. The input port can function as an input port for a Parallel DEVS Atomic Model as well as for a Parallel
Hierarchical DEVS Coupled Model. A boolean in the class indicates whether it behaves as a port for an atomic model or a
coupled model. For a coupled model, the input message is passed on to the external input couplings (EIC), for an atomic
model, the external event handler is called (or the confluent event handler in case of a conflict).
Copyright (c) 2009-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Mamadou Seck
, Alexander Verbraeck
-
Constructor Summary
ConstructorDescriptionInputPort
(AtomicModel<T> atomicModel) Constructor for the input port where the model is an atomic model.InputPort
(CoupledModel<T> coupledModel) Constructor for the input port where the model is a coupled model. -
Method Summary
-
Constructor Details
-
InputPort
Constructor for the input port where the model is a coupled model.- Parameters:
coupledModel
- CoupledModel<T>; the coupled model to which the port is added.
-
InputPort
Constructor for the input port where the model is an atomic model.- Parameters:
atomicModel
- AtomicModel<T>; the atomic model to which the port is added.
-
-
Method Details
-
receive
Receive and handle an event on the port.- Specified by:
receive
in interfaceInputPortInterface<T extends Number & Comparable<T>,
TYPE> - Parameters:
value
- TYPE; the value that is received of type <T>time
- T; the time on which the value is received- Throws:
RemoteException
- a remote exception occurredSimRuntimeException
- a simulation run time exception occurred
-
getModel
- Specified by:
getModel
in interfaceInputPortInterface<T extends Number & Comparable<T>,
TYPE> - Returns:
- the model to which the port belongs.
-