#include <port.h>

Inheritance diagram for FSMSADF::Port:
Collaboration diagram for FSMSADF::Port:

List of all members.

Public Types

enum  PortType { In, Out, Undef }

Public Member Functions

 Port (GraphComponent c)
 ~Port ()
Portcreate (GraphComponent c) const
PortcreateCopy (GraphComponent c) const
Portclone (GraphComponent c) const
void constructFromXML (const CNodePtr portNode)
void convertToXML (const CNodePtr portNode)
void isolateScenario (Scenario *s)
PortType getType () const
CString getTypeAsString () const
void setType (const PortType t)
void setType (const CString &t)
const map< Scenario *, Rate > & getRate () const
void setRate (const map< Scenario *, Rate > &r)
Rate getRateOfScenario (Scenario *s) const
void setRateOfScenario (Scenario *s, const Rate r)
ChannelgetChannel () const
void connectToChannel (Channel *c)
ActorgetActor () const
bool isConnected () const
ostream & print (ostream &out)

Private Member Functions

ScenariogetDefaultScenario () const

Private Attributes

PortType type
Channelchannel
map< Scenario *, Raterate

Friends

ostream & operator<< (ostream &out, Port &p)

Detailed Description

Port Port on an actor.


Member Enumeration Documentation

Enumerator:
In 
Out 
Undef 

Constructor & Destructor Documentation

FSMSADF::Port::Port ( GraphComponent  c  ) 

Port () Constructor.

References getDefaultScenario(), and setRateOfScenario().

Referenced by create().

Here is the call graph for this function:

FSMSADF::Port::~Port (  ) 

~Port () Destructor.


Member Function Documentation

Port * FSMSADF::Port::clone ( GraphComponent  c  )  const

clone () The function returns a pointer to a newly allocated port object. The properties of the port are also cloned. Note: the connection to the channel is lost. Cloning the channel restores this connection.

References createCopy().

Referenced by FSMSADF::Actor::clone().

Here is the call graph for this function:

void FSMSADF::Port::connectToChannel ( Channel c  ) 

connectToChannel () The function connects the port to a channel. A connection can only be made if the port is not yet connected.

References channel, FSMSADF::GraphComponent::getName(), FSMSADF::GraphComponent::getParent(), and isConnected().

Referenced by FSMSADF::Channel::connectDst(), and FSMSADF::Channel::connectSrc().

Here is the call graph for this function:

void FSMSADF::Port::constructFromXML ( const CNodePtr  portNode  ) 

constructFromXML () The function initializes all port properties based on the XML data.

References CGetAttribute(), CHasAttribute(), getDefaultScenario(), FSMSADF::GraphComponent::setName(), setRateOfScenario(), and setType().

Referenced by FSMSADF::Actor::constructFromXML().

Here is the call graph for this function:

void FSMSADF::Port::convertToXML ( const CNodePtr  portNode  ) 

convertToXML () The function converts all port properties to XML data.

References CAddAttribute(), getDefaultScenario(), FSMSADF::GraphComponent::getName(), getRateOfScenario(), and getTypeAsString().

Here is the call graph for this function:

Port * FSMSADF::Port::create ( GraphComponent  c  )  const

create () The function returns a pointer to a newly allocated port object.

References Port().

Referenced by createCopy().

Here is the call graph for this function:

Port * FSMSADF::Port::createCopy ( GraphComponent  c  )  const

createCopy () The function returns a pointer to a newly allocated SDF port object. The properties of the port are also copied.

References create(), FSMSADF::GraphComponent::getName(), getRate(), getType(), FSMSADF::GraphComponent::setName(), setRate(), and setType().

Referenced by clone().

Here is the call graph for this function:

Actor* FSMSADF::Port::getActor (  )  const [inline]
Scenario * FSMSADF::Port::getDefaultScenario (  )  const [private]

getDefaultScenario () The function returns a pointer to the default scenario.

References getActor(), FSMSADF::Graph::getDefaultScenario(), FSMSADF::ScenarioGraph::getGraph(), and FSMSADF::Actor::getScenarioGraph().

Referenced by constructFromXML(), convertToXML(), getRateOfScenario(), isolateScenario(), and Port().

Here is the call graph for this function:

const map<Scenario*,Rate>& FSMSADF::Port::getRate (  )  const [inline]
CString FSMSADF::Port::getTypeAsString (  )  const

getTypeAsString() The function returns a string which specifies the port type.

References In, Out, and type.

Referenced by FSMSADF::Channel::connectDst(), FSMSADF::Channel::connectSrc(), convertToXML(), and print().

bool FSMSADF::Port::isConnected (  )  const

isConnected () The function return true if the port is connected to a channel, else it returns false.

References getChannel().

Referenced by connectToChannel(), FSMSADF::Actor::isConnected(), and print().

Here is the call graph for this function:

void FSMSADF::Port::isolateScenario ( Scenario s  ) 

isolateScenario() The function removes all scenario except scenario s from the actor. The rate of this scenario is set as the rate of the default scenario on this graph.

References getDefaultScenario(), getRateOfScenario(), rate, and setRateOfScenario().

Referenced by FSMSADF::Actor::isolateScenario().

Here is the call graph for this function:

ostream & FSMSADF::Port::print ( ostream &  out  ) 

print () Print the port to the supplied output stream.

References FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::getName(), getTypeAsString(), isConnected(), and rate.

Referenced by FSMSADF::Actor::print().

Here is the call graph for this function:

void FSMSADF::Port::setRate ( const map< Scenario *, Rate > &  r  ) 

setRate () The function sets the port rates of all scenarios.

References getActor(), FSMSADF::ScenarioGraph::getGraph(), FSMSADF::Graph::getScenario(), FSMSADF::Actor::getScenarioGraph(), rate, and setRateOfScenario().

Referenced by createCopy(), and FSMSADF::GraphConversion::ensureStronglyBounded().

Here is the call graph for this function:

void FSMSADF::Port::setType ( const CString t  ) 

setType() The function sets the port type based on the string value.

References type.

void FSMSADF::Port::setType ( const PortType  t  )  [inline]

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
Port p 
) [friend]

Member Data Documentation


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