Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

simth::DeviceSystemIntf Class Reference

Abstract base class of a simulation system interface. More...

#include <devicesystemintf.h>

Inheritance diagram for simth::DeviceSystemIntf:

simth::FreeConnectionSystem simth::StreamDrivenSystem List of all members.

Public Member Functions

 DeviceSystemIntf ()
virtual ~DeviceSystemIntf ()
virtual void connectInterface (ControlInterface *interface, const std::string &varName)=0
virtual Devicedevice (int deviceNr)=0
virtual const Devicedevice (int deviceNr) const =0
virtual void queueForProcess (Device *dev)
virtual void stopIteration ()
virtual void stopSimulationPremature ()
template<class T>
void writeParameter (const std::string &parameterName, const T &value) throw (simth::name_conflict)
template<class T>
readParameter (const std::string &parameterName) const throw (simth::no_such_parameter, simth::type_error)
virtual void warningMessage (const std::string &warningMess, int deviceNr) const =0

Protected Member Functions

void printParameterList (std::ostream &os) const

Detailed Description

Abstract base class of a simulation system interface.

This class declares functions to access a SimulationSystem. The class Device takes this interface to access the simulation system.


Constructor & Destructor Documentation

simth::DeviceSystemIntf::DeviceSystemIntf  ) 
 

Class constructor.

virtual simth::DeviceSystemIntf::~DeviceSystemIntf  )  [virtual]
 

Virtual Destructor.


Member Function Documentation

virtual void simth::DeviceSystemIntf::connectInterface ControlInterface interface,
const std::string &  varName
[pure virtual]
 

Connects a ControlInterface of the Device calling this function, to a loop control of the SimulationDeviceIntf.

Parameters:
interface pointer to control interface
varName name of the loop control the controlInterface is connected to

Implemented in simth::StreamDrivenSystem.

virtual Device* simth::DeviceSystemIntf::device int  deviceNr  )  [pure virtual]
 

Returns a pointer to the specified device.

virtual const Device* simth::DeviceSystemIntf::device int  deviceNr  )  const [pure virtual]
 

Returns a pointer to the specified device. (Constant version)

Implemented in simth::StreamDrivenSystem.

virtual void simth::DeviceSystemIntf::queueForProcess Device dev  )  [inline, virtual]
 

Queue the given device for Device::process() in the process queue.

If a device sends this 'READY_TO_PROCESS' signal, the StreamDrivenSystem will queue a request for processing of that device in a 'process queue'. During a simulation run, the StreamDrivenSystem calls the process functions of the device whose 'request for processing' is in the first position of the process queue, and then consecutively every next device.

Parameters:
dev Pointer to the device that should be queued for process.

Reimplemented in simth::StreamDrivenSystem.

virtual void simth::DeviceSystemIntf::stopIteration  )  [inline, virtual]
 

Stops the current iteration.

This means, that no new(!) request for processing will be accepted by the StreamDrivenSystem and the process function of the start device will not be called if the process queue runs empty. With other words, only 'request for processing' that had been queued in the process queue, will be processed by the StreamDrivenSimulationSystem, i.e. the process functions of the corresponding devices will be called.

Reimplemented in simth::StreamDrivenSystem.

virtual void simth::DeviceSystemIntf::stopSimulationPremature  )  [inline, virtual]
 

Stops not only the current iteration, but also the complete simulation run no matter how many iterations are still undone. This also calls stopIteration() internally.

Reimplemented in simth::StreamDrivenSystem.

template<class T>
void simth::DeviceSystemIntf::writeParameter const std::string &  parameterName,
const T &  value
throw (simth::name_conflict) [inline]
 

DEPRECATED. Writes a parameter of any type to the system-wide parameter list.

This concept is deprecated because it totally blurs the data flow between the devices. Please don't use it anymore.

This can be useful, if a device would like to give some parameter values to other devices. If the list already contains a parameter with the given name but a different value, a simth::name_conflict error is thrown.

Parameters:
parameterName name of the parameter
value value of the parameter

template<class T>
T simth::DeviceSystemIntf::readParameter const std::string &  parameterName  )  const throw (simth::no_such_parameter, simth::type_error) [inline]
 

DEPRECATED. Reads a parameter of any type from the system-wide parameter list.

This concept is deprecated because it totally blurs the data flow between the devices. Please don't use it anymore.

This can be useful, if a device would get some parameter values from other devices. However, these parameter values must have been written to that list before using writeParameter(). If the list contains no parameter with the given name, a simth::no_such_parameter error is thrown. If the parameter value stored in the list with the given name and the value a device asked for have different types, a simth::type_error error is thrown.

Parameters:
parameterName name of the parameter
Returns:
value of the parameter

virtual void simth::DeviceSystemIntf::warningMessage const std::string &  warningMess,
int  deviceNr
const [pure virtual]
 

This function can be used to print out warnings.

Implemented in simth::FreeConnectionSystem.

void simth::DeviceSystemIntf::printParameterList std::ostream &  os  )  const [protected]
 

Prints the system parameters to the given output stream.


Generated on Mon Apr 24 21:19:19 2006 for simthetic by  doxygen 1.4.1