class devs

The devs class provides some fundamental behavior needed by its network and atomic sub-classes.

Inheritance:


Public Classes

[more]enum ModelType
Enumeration of model types

Public Methods

[more] devs(ModelType type = UNKNOWN)
Constructor.
[more] devs(const char* name, ModelType type = UNKNOWN)
Constructor.
[more]inline void setName(const char* name)
Sets the model's name
[more]inline stime_t elapsed() const
Returns time elapsed since the last event.
[more]inline stime_t sigma() const
Returns time remaining until the next event.
[more]inline stime_t ta() const
Returns the time allowed to remain in the current state.
[more]inline stime_t timeNext() const
Returns the next event time
[more]inline stime_t timeLast() const
Returns the last event time
[more]inline stime_t timeCurrent() const
Returns the current simulation time.
[more]void hold(stime_t dt)
Reschedules the model such that tN = t + dt
[more]inline void passivate()
Sets tN = INFINITY
[more]bag* inputOnPort(port_t inport) const
Returns the input available on the port.
[more]void output(port_t outport, object* value, bool gc = true)
Writes a value to the output port.
[more]void output(port_t outport, const object& value)
Writes a clone() of the output value to the port.
[more]virtual void addInputPort(port_t inport)
Add an input port
[more]virtual void addOutputPort(port_t outport)
Add an output port
[more]bool hasInputPort(port_t inport) const
Returns true if the port is found, false otherwise
[more]bool hasOutputPort(port_t outport) const
Returns true if the port is found, false otherwise
[more]inline const char* getName() const
Get the name of the model
[more]void setThreaded(bool value)
Indicate that this model should be assigned its own thread of execution
[more]bool getThreaded() const
Returns true if this model will be assigned its own thread of execution
[more]const port_t* outputPorts(int* count)
Method to support the simulator
[more]bag* outputOnPort(port_t outport) const
Method to support the simulator
[more]void clearPorts()
Method to support the simulator
[more]void clearPorts(indexed& garbage)
Method to support the simulator
[more]void emptyGarbage()
Method to support the simulator
[more]inline void setTime(stime_t t)
Method to support the simulator
[more]inline void setTimeLast(stime_t tL)
Method to support the simulator
[more]inline void setTimeNext(stime_t tN)
Method to support the simulator
[more]virtual void _reset(stime_t t0 = 0.0)
Method to support the simulator.
[more]void input(port_t inport, object* value)
Method to support the simulator
[more]virtual ~devs()
Method to support the simulator
[more]ModelType getType() const
Get the typecode for this model


Inherited from object:

Public Methods

ovirtual bool operator==(const object &obj) const
ovirtual bool operator!=(const object &obj) const
ovirtual unsigned int hashcode() const
ovirtual object* clone() const


Documentation

The devs class provides some fundamental behavior needed by its network and atomic sub-classes. Generally, none of the methods here should be overridden.
oenum ModelType
Enumeration of model types

o UNKNOWN

o ATOMIC

o NETWORK

o devs(ModelType type = UNKNOWN)
Constructor. Default model type is UNKNOWN

o devs(const char* name, ModelType type = UNKNOWN)
Constructor. Assigns the given name to the model.

oinline void setName(const char* name)
Sets the model's name

oinline stime_t elapsed() const
Returns time elapsed since the last event. e = t - tL

oinline stime_t sigma() const
Returns time remaining until the next event. s = tN - t

oinline stime_t ta() const
Returns the time allowed to remain in the current state. ta = tN - tL

oinline stime_t timeNext() const
Returns the next event time

oinline stime_t timeLast() const
Returns the last event time

oinline stime_t timeCurrent() const
Returns the current simulation time.

ovoid hold(stime_t dt)
Reschedules the model such that tN = t + dt

oinline void passivate()
Sets tN = INFINITY

obag* inputOnPort(port_t inport) const
Returns the input available on the port. The bag should not be deleted, it is still owned the devs.

ovoid output(port_t outport, object* value, bool gc = true)
Writes a value to the output port. If gc is false, object will not be garbage collected. Default is to garbage collect object.

ovoid output(port_t outport, const object& value)
Writes a clone() of the output value to the port. Fails with a CloneException if the object does not support the clone() method.

ovirtual void addInputPort(port_t inport)
Add an input port

ovirtual void addOutputPort(port_t outport)
Add an output port

obool hasInputPort(port_t inport) const
Returns true if the port is found, false otherwise

obool hasOutputPort(port_t outport) const
Returns true if the port is found, false otherwise

oinline const char* getName() const
Get the name of the model

ovoid setThreaded(bool value)
Indicate that this model should be assigned its own thread of execution

obool getThreaded() const
Returns true if this model will be assigned its own thread of execution

oconst port_t* outputPorts(int* count)
Method to support the simulator

obag* outputOnPort(port_t outport) const
Method to support the simulator

ovoid clearPorts()
Method to support the simulator

ovoid clearPorts(indexed& garbage)
Method to support the simulator

ovoid emptyGarbage()
Method to support the simulator

oinline void setTime(stime_t t)
Method to support the simulator

oinline void setTimeLast(stime_t tL)
Method to support the simulator

oinline void setTimeNext(stime_t tN)
Method to support the simulator

ovirtual void _reset(stime_t t0 = 0.0)
Method to support the simulator. Indicates that the model should reset its state. t indicates the initial time for the model.

ovoid input(port_t inport, object* value)
Method to support the simulator

ovirtual ~devs()
Method to support the simulator

oModelType getType() const
Get the typecode for this model


Direct child classes:
devsn
atomic

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.