SingleThreadAnalogMsgDispatcher Class Reference

Dispatcher of local analog messages (within one thread). More...

#include <SingleThreadAnalogMsgDispatcher.h>

Inheritance diagram for SingleThreadAnalogMsgDispatcher:

Inheritance graph
[legend]
Collaboration diagram for SingleThreadAnalogMsgDispatcher:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SingleThreadAnalogMsgDispatcher ()
virtual ~SingleThreadAnalogMsgDispatcher ()
void addAnalogMessage (SimObject *src, analog_port_id_t src_port, SimObject *dest, analog_port_id_t dest_port)
 Adds new local analog message to the dispatcher.
void addAnalogMessage (SimObject *src, string srcfield, SimObject *dest, string destfield)
 Adds an analog message which ties a value of some field from source object to another field of the destination object.
void addAnalogMessage (SimObject *src, analog_port_id_t src_port, SimObject *dest, string destfield)
 Adds an analog message from some object analog output port to another object field value.
void addAnalogMessage (SimObject *src, string srcfield, SimObject *dest, analog_port_id_t dest_port)
 Adds an analog message from a source field value of some object, to an input port of a destination object.
virtual void dispatchAnalogMsgs ()
 Dispatch all analog messages contained in the dispatcher.
virtual void initialize ()
virtual void reset (double dt)

Protected Types

typedef vector< vector< pair
< SimObject
*, analog_port_id_t > > > 
port_msg_destinations_type
typedef vector< vector< pair
< void *, Field::ValueType > > > 
field_msg_destinations_type
typedef vector< pair
< SimObject
*, analog_port_id_t > > 
port_msg_sources_type
typedef vector< pair< void
*, Field::ValueType > > 
field_msg_sources_type
typedef hash_map< pair
< SimObject
*, analog_port_id_t >, int,
PCSIM::hash< pair< SimObject
*, analog_port_id_t > > > 
port_msg_sources_positions_type
typedef hash_map< void *, int,
PCSIM::hash< void * > > 
field_msg_sources_positions_type

Protected Attributes

port_msg_destinations_type port2port_msg_destinations
field_msg_destinations_type port2field_msg_destinations
port_msg_destinations_type field2port_msg_destinations
field_msg_destinations_type field2field_msg_destinations
port_msg_sources_type port2port_msg_sources
port_msg_sources_type port2field_msg_sources
field_msg_sources_type field2port_msg_sources
field_msg_sources_type field2field_msg_sources
port_msg_sources_positions_typeport2port_msg_sources_positions
port_msg_sources_positions_typeport2field_msg_sources_positions
field_msg_sources_positions_typefield2port_msg_sources_positions
field_msg_sources_positions_typefield2field_msg_sources_positions
bool initialized


Detailed Description

Dispatcher of local analog messages (within one thread).

Definition at line 20 of file SingleThreadAnalogMsgDispatcher.h.


Member Typedef Documentation

Definition at line 64 of file SingleThreadAnalogMsgDispatcher.h.

typedef vector< vector< pair<void *, Field::ValueType> > > SingleThreadAnalogMsgDispatcher::field_msg_destinations_type [protected]

Definition at line 70 of file SingleThreadAnalogMsgDispatcher.h.

Definition at line 81 of file SingleThreadAnalogMsgDispatcher.h.

typedef vector< pair< void *, Field::ValueType> > SingleThreadAnalogMsgDispatcher::field_msg_sources_type [protected]

Definition at line 82 of file SingleThreadAnalogMsgDispatcher.h.

Definition at line 93 of file SingleThreadAnalogMsgDispatcher.h.

typedef hash_map< void *, int, PCSIM::hash<void *> > SingleThreadAnalogMsgDispatcher::field_msg_sources_positions_type [protected]

Definition at line 96 of file SingleThreadAnalogMsgDispatcher.h.


Constructor & Destructor Documentation

SingleThreadAnalogMsgDispatcher::SingleThreadAnalogMsgDispatcher (  ) 

SingleThreadAnalogMsgDispatcher::~SingleThreadAnalogMsgDispatcher (  )  [virtual]


Member Function Documentation

void SingleThreadAnalogMsgDispatcher::addAnalogMessage ( SimObject src,
analog_port_id_t  src_port,
SimObject dest,
analog_port_id_t  dest_port 
)

Adds new local analog message to the dispatcher.

The message is originating from a specified output port from the source object and terminating to the specified input port of the destination object.

Parameters:
src source simulation object which send the message
src_port id of the output port on the source object from which the message originates
dest destination object receiving the analog message
dest_port input port on the destination object where the analog message arrives

Definition at line 81 of file SingleThreadAnalogMsgDispatcher.cpp.

References port2port_msg_destinations, port2port_msg_sources, and port2port_msg_sources_positions.

Referenced by STAnalogMessageCreator::addAnalogMessage().

void SingleThreadAnalogMsgDispatcher::addAnalogMessage ( SimObject src,
string  srcfield,
SimObject dest,
string  destfield 
)

Adds an analog message which ties a value of some field from source object to another field of the destination object.

Definition at line 135 of file SingleThreadAnalogMsgDispatcher.cpp.

References field2field_msg_destinations, field2field_msg_sources, field2field_msg_sources_positions, SimObject::findField(), Field::getPtr(), and Field::getType().

Here is the call graph for this function:

void SingleThreadAnalogMsgDispatcher::addAnalogMessage ( SimObject src,
analog_port_id_t  src_port,
SimObject dest,
string  destfield 
)

Adds an analog message from some object analog output port to another object field value.

Definition at line 98 of file SingleThreadAnalogMsgDispatcher.cpp.

References SimObject::findField(), Field::getPtr(), Field::getType(), port2field_msg_destinations, port2field_msg_sources, and port2field_msg_sources_positions.

Here is the call graph for this function:

void SingleThreadAnalogMsgDispatcher::addAnalogMessage ( SimObject src,
string  srcfield,
SimObject dest,
analog_port_id_t  dest_port 
)

Adds an analog message from a source field value of some object, to an input port of a destination object.

Definition at line 117 of file SingleThreadAnalogMsgDispatcher.cpp.

References field2port_msg_destinations, field2port_msg_sources, field2port_msg_sources_positions, SimObject::findField(), Field::getPtr(), and Field::getType().

Here is the call graph for this function:

void SingleThreadAnalogMsgDispatcher::dispatchAnalogMsgs (  )  [virtual]

Dispatch all analog messages contained in the dispatcher.

Copies double analog values from sources to destinations.

Implements AnalogMessageDispatcher.

Definition at line 30 of file SingleThreadAnalogMsgDispatcher.cpp.

References field2field_msg_destinations, field2field_msg_sources, field2port_msg_destinations, field2port_msg_sources, Field::getValue(), port2field_msg_destinations, port2field_msg_sources, port2port_msg_destinations, port2port_msg_sources, and Field::setValue().

Referenced by MultiThreadAnalogMsgDispatcher::dispatchAnalogMsgs().

Here is the call graph for this function:

void SingleThreadAnalogMsgDispatcher::initialize (  )  [virtual]

virtual void SingleThreadAnalogMsgDispatcher::reset ( double  dt  )  [inline, virtual]

Implements AnalogMessageDispatcher.

Definition at line 64 of file SingleThreadAnalogMsgDispatcher.h.


Member Data Documentation

Definition at line 72 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 74 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 76 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 78 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 84 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 85 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 87 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().

Definition at line 88 of file SingleThreadAnalogMsgDispatcher.h.

Referenced by addAnalogMessage(), and dispatchAnalogMsgs().


The documentation for this class was generated from the following files:

Generated on Wed Jul 9 16:34:53 2008 for PCSIM by  doxygen 1.5.5