public abstract class Devs extends Object implements IDevs
CoupledDevs
) or an Atomic model (AtomicDevs
), or any user
own definition / implementation.
This class gives its children message-exchange abilities, a parent model, a managing simulator and a name.
Modifier and Type | Class and Description |
---|---|
static class |
Devs.DevsFactory
Creates an abstract level for all the children classes of this class.
|
Modifier and Type | Field and Description |
---|---|
protected Message |
_inputMessage
Messages that are on the input.
|
protected Ports |
_inputPorts
An HashSet of Ports on the input.
|
protected String |
_name
A unique identifier for this DEVS model.
|
protected Message |
_output
Messages that are on the output.
|
protected Ports |
_outputPorts
An HashSet of Ports on the output.
|
protected ICoupledDevs |
_parent
The parent model.
|
protected ISimulator |
_simulator
The model's simulator.
|
Constructor and Description |
---|
Devs(String name)
DEVS constructor that takes a string as the name of the instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addInport(String portName)
Add an input
Port on the model. |
void |
addOutport(String portName)
Add an output
Port on the model. |
int |
compareTo(INamed in) |
String |
fullName()
The name of the model and all its parents.
|
static <V> Content<V> |
makeContent(String p,
V value)
|
String |
name()
The name of this model.
|
ICoupledDevs |
parent()
Getter on the parent model.
|
void |
setParent(ICoupledDevs p)
Set the parent model which is a
ICoupledDevs implementation if
it exists. |
void |
setSimulator(ISimulator si)
Setter of the model's simulator.
|
ISimulator |
simulator()
Getter on the model's simulator.
|
protected String _name
protected Ports _inputPorts
protected Ports _outputPorts
protected Message _inputMessage
protected Message _output
protected ICoupledDevs _parent
protected ISimulator _simulator
public Devs(String name)
name
- The DEVS's instance name.public String name()
public void setParent(ICoupledDevs p)
ICoupledDevs
implementation if
it exists.public ISimulator simulator()
public void setSimulator(ISimulator si)
setSimulator
in interface IDevs
si
- The simulator to set as the model's simulator.public ICoupledDevs parent()
public void addOutport(String portName)
Port
on the model.addOutport
in interface IDevs
portName
- The name of the new output Port.public int compareTo(INamed in)
compareTo
in interface Comparable<INamed>
Copyright © 2017–2019 UniversitĂ© CĂ´te d'Azur, CNRS, I3S. All rights reserved.