#include <channel.h>

Inheritance diagram for FSMSADF::Channel:
Collaboration diagram for FSMSADF::Channel:

List of all members.

Public Member Functions

 Channel (GraphComponent c)
 ~Channel ()
Channelcreate (GraphComponent c) const
ChannelcreateCopy (GraphComponent c) const
Channelclone (GraphComponent c) const
void constructFromXML (const CNodePtr channelNode)
void constructPropertiesFromXML (Scenario *s, const CNodePtr channelPropertiesNode)
void convertToXML (const CNodePtr channelNode)
void convertPropertiesToXML (Scenario *s, const CNodePtr channelPropertiesNode)
void isolateScenario (Scenario *s)
PortgetSrcPort () const
PortgetDstPort () const
ActorgetSrcActor () const
ActorgetDstActor () const
void connectSrc (Port *p)
void connectDst (Port *p)
PortoppositePort (Port *p) const
uint getInitialTokens () const
void setInitialTokens (const uint t)
CStrings getPersistentTokenNames () const
bool isConnected () const
const map< Scenario *, Size > & getTokenSize () const
void setTokenSize (const map< Scenario *, Size > &s)
Size getTokenSizeOfScenario (Scenario *s) const
void setTokenSizeOfScenario (Scenario *s, const Size sz)
bool hasTokenSizeInScenario (Scenario *s) const
ScenarioGraphgetScenarioGraph () const
ostream & print (ostream &out)

Private Member Functions

ScenariogetDefaultScenario () const

Private Attributes

Portsrc
Portdst
uint initialTokens
CStrings scPersistentTokenNames
map< Scenario *, SizetokenSize

Friends

ostream & operator<< (ostream &out, Channel &c)

Detailed Description

class Channel Channel in an FSM-based SADF graph.


Constructor & Destructor Documentation

FSMSADF::Channel::Channel ( GraphComponent  c  ) 

Channel () Constructor.

Referenced by create().

FSMSADF::Channel::~Channel (  ) 

~Channel () Destructor.


Member Function Documentation

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

clone () The function returns a pointer to a newly allocated channel object. All properties and the connection of the channel are cloned.

References connectDst(), connectSrc(), createCopy(), FSMSADF::ScenarioGraph::getActor(), getDstActor(), getDstPort(), FSMSADF::GraphComponent::getName(), FSMSADF::Actor::getPort(), getScenarioGraph(), getSrcActor(), getSrcPort(), and scPersistentTokenNames.

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

Here is the call graph for this function:

void FSMSADF::Channel::connectDst ( Port p  ) 

connectDst () The function connects the channel to a destination port and port to channel.

References FSMSADF::Port::connectToChannel(), dst, getDstPort(), FSMSADF::GraphComponent::getName(), FSMSADF::Port::getType(), and FSMSADF::Port::getTypeAsString().

Referenced by clone(), constructFromXML(), FSMSADF::ScenarioGraph::createChannel(), and FSMSADF::RandomGraph::createChannel().

Here is the call graph for this function:

void FSMSADF::Channel::connectSrc ( Port p  ) 

connectSrc () The function connects the channel to a source port and port to channel.

References FSMSADF::Port::connectToChannel(), FSMSADF::GraphComponent::getName(), getSrcPort(), FSMSADF::Port::getType(), FSMSADF::Port::getTypeAsString(), and src.

Referenced by clone(), constructFromXML(), FSMSADF::ScenarioGraph::createChannel(), and FSMSADF::RandomGraph::createChannel().

Here is the call graph for this function:

void FSMSADF::Channel::constructFromXML ( const CNodePtr  channelNode  ) 

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

References c, CGetAttribute(), CHasAttribute(), connectDst(), connectSrc(), g, FSMSADF::ScenarioGraph::getActor(), FSMSADF::Actor::getPort(), getScenarioGraph(), initialTokens, scPersistentTokenNames, setInitialTokens(), FSMSADF::GraphComponent::setName(), and CString::split().

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

Here is the call graph for this function:

void FSMSADF::Channel::constructPropertiesFromXML ( Scenario s,
const CNodePtr  channelPropertiesNode 
)

constructPropertiesFromXML () The function initializes all channel properties based on the XML data.

References CGetAttribute(), CGetChildNode(), CHasAttribute(), CHasChildNode(), and setTokenSizeOfScenario().

Referenced by FSMSADF::ScenarioGraph::constructPropertiesFromXML().

Here is the call graph for this function:

void FSMSADF::Channel::convertPropertiesToXML ( Scenario s,
const CNodePtr  channelPropertiesNode 
)

convertPropertiesToXML () The function converts all channel properties to XML data.

References CAddAttribute(), CAddNode(), FSMSADF::GraphComponent::getName(), getTokenSizeOfScenario(), and tokenSize.

Here is the call graph for this function:

void FSMSADF::Channel::convertToXML ( const CNodePtr  channelNode  ) 

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

References CAddAttribute(), getDstActor(), getDstPort(), getInitialTokens(), FSMSADF::GraphComponent::getName(), getSrcActor(), getSrcPort(), CString::join(), and scPersistentTokenNames.

Here is the call graph for this function:

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

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

References Channel().

Referenced by createCopy().

Here is the call graph for this function:

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

createCopy () The function returns a pointer to a newly allocated channel object. All properties of the channel are copied.

References create(), getInitialTokens(), FSMSADF::GraphComponent::getName(), getTokenSize(), setInitialTokens(), FSMSADF::GraphComponent::setName(), and setTokenSize().

Referenced by clone().

Here is the call graph for this function:

Scenario * FSMSADF::Channel::getDefaultScenario (  )  const [private]

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

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

Referenced by getTokenSizeOfScenario(), and hasTokenSizeInScenario().

Here is the call graph for this function:

CStrings FSMSADF::Channel::getPersistentTokenNames (  )  const [inline]
const map<Scenario*,Size>& FSMSADF::Channel::getTokenSize (  )  const [inline]

References tokenSize.

Referenced by createCopy().

Size FSMSADF::Channel::getTokenSizeOfScenario ( Scenario s  )  const

getTokenSizeOfScenario () The function returns the token size of a token send on this channel in scenario s. When no token size has been specified for this scenario, the default scenario is checked. When also no default scenario exists, an exception is thrown.

References getDefaultScenario(), FSMSADF::GraphComponent::getName(), and tokenSize.

Referenced by convertPropertiesToXML(), FSMSADF::BindingAwareGraph::createMappedChannelToConnectionNSoC(), isolateScenario(), and FSMSADF::OutputHTML::printScenario().

Here is the call graph for this function:

bool FSMSADF::Channel::hasTokenSizeInScenario ( Scenario s  )  const

hasTokenSizeInScenario () The function returns true when a token size has been specified for scenario s or through a default scenario. Otherwise the function returns false.

References getDefaultScenario(), and tokenSize.

Referenced by isolateScenario().

Here is the call graph for this function:

bool FSMSADF::Channel::isConnected (  )  const

isConnected () The function returns true if the channel is connected to a source and destination port.

References getDstPort(), and getSrcPort().

Referenced by print().

Here is the call graph for this function:

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

isolateScenario() The function removes all scenario except scenario s from the channel.

References getTokenSizeOfScenario(), hasTokenSizeInScenario(), setTokenSizeOfScenario(), and tokenSize.

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

Here is the call graph for this function:

Port* FSMSADF::Channel::oppositePort ( Port p  )  const [inline]

References dst, and src.

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

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

References getDstActor(), getDstPort(), FSMSADF::GraphComponent::getId(), getInitialTokens(), FSMSADF::GraphComponent::getName(), getSrcActor(), getSrcPort(), and isConnected().

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

Here is the call graph for this function:

void FSMSADF::Channel::setTokenSize ( const map< Scenario *, Size > &  sz  ) 

setTokenSize () The function sets the token size of all scenarios.

References FSMSADF::ScenarioGraph::getGraph(), FSMSADF::Graph::getScenario(), getScenarioGraph(), setTokenSizeOfScenario(), and tokenSize.

Referenced by createCopy().

Here is the call graph for this function:

void FSMSADF::Channel::setTokenSizeOfScenario ( Scenario s,
const Size  sz 
)

setTokenSizeOfScenario () Set the token size of scenario s.

References tokenSize.

Referenced by FSMSADF::RandomGraph::assignChannelProperties(), constructPropertiesFromXML(), isolateScenario(), and setTokenSize().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
Channel c 
) [friend]

Member Data Documentation


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