FSMSADF::Port Class Reference
#include <port.h>
Public Types | |
enum | PortType { In, Out, Undef } |
Public Member Functions | |
Port (GraphComponent c) | |
~Port () | |
Port * | create (GraphComponent c) const |
Port * | createCopy (GraphComponent c) const |
Port * | clone (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) |
Channel * | getChannel () const |
void | connectToChannel (Channel *c) |
Actor * | getActor () const |
bool | isConnected () const |
ostream & | print (ostream &out) |
Private Member Functions | |
Scenario * | getDefaultScenario () const |
Private Attributes | |
PortType | type |
Channel * | channel |
map< Scenario *, Rate > | rate |
Friends | |
ostream & | operator<< (ostream &out, Port &p) |
Detailed Description
Member Enumeration Documentation
Constructor & Destructor Documentation
FSMSADF::Port::Port | ( | GraphComponent | c | ) |
Port () Constructor.
References getDefaultScenario(), and setRateOfScenario().
Referenced by create().
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().
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().
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().
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().
Port * FSMSADF::Port::create | ( | GraphComponent | c | ) | const |
create () The function returns a pointer to a newly allocated port object.
References Port().
Referenced by createCopy().
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().
Actor* FSMSADF::Port::getActor | ( | ) | const [inline] |
References FSMSADF::GraphComponent::getParent().
Referenced by FSMSADF::calcFractionsConnectedActors(), FSMSADF::RandomGraph::createScenarioGraph(), getDefaultScenario(), and setRate().
Channel* FSMSADF::Port::getChannel | ( | ) | const [inline] |
References channel.
Referenced by FSMSADF::MPExplore::State::actorEnabled(), FSMSADF::calcFractionsConnectedActors(), FSMSADF::MPExploreBindingAware::State::consume(), FSMSADF::MPExplore::State::consume(), FSMSADF::RandomGraph::dfsStronglyConnected(), FSMSADF::RandomGraph::findCycles(), FSMSADF::RandomGraph::getChannelsBetweenActors(), isConnected(), FSMSADF::MPExploreBindingAware::State::produce(), and FSMSADF::MPExplore::State::produce().
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().
References rate.
Referenced by FSMSADF::Actor::convertPropertiesToXML(), createCopy(), and FSMSADF::GraphConversion::ensureStronglyBounded().
getRateOfScenario() The function returns the rate of the port in the given scenario. When no specific rate is specified for the scenario, the default scenario is used.
References getDefaultScenario(), FSMSADF::GraphComponent::getName(), and rate.
Referenced by FSMSADF::MPExplore::State::actorEnabled(), FSMSADF::calcFractionsConnectedActors(), FSMSADF::MPExploreBindingAware::State::consume(), FSMSADF::MPExplore::State::consume(), FSMSADF::Actor::convertPropertiesToXML(), convertToXML(), FSMSADF::BindingAwareGraph::createMappedChannelToConnectionNSoC(), FSMSADF::BindingAwareGraph::createMappedChannelToTileNSoC(), FSMSADF::MemoryDimAlgo::estimateStorageDist(), FSMSADF::ScenarioGraph::extractSDFgraph(), isolateScenario(), FSMSADF::PrecedenceGraph::PrecedenceGraph(), FSMSADF::OutputHTML::printScenario(), FSMSADF::MPExploreBindingAware::State::produce(), FSMSADF::MPExplore::State::produce(), FSMSADF::MPExploreBindingAware::SGraph::SGraph(), and FSMSADF::MPExplore::SGraph::SGraph().
PortType FSMSADF::Port::getType | ( | ) | const [inline] |
References type.
Referenced by FSMSADF::MPExplore::State::actorEnabled(), FSMSADF::Channel::connectDst(), FSMSADF::Channel::connectSrc(), createCopy(), FSMSADF::RandomGraph::dfsStronglyConnected(), FSMSADF::RandomGraph::findCycles(), FSMSADF::MPExplore::SGraph::fire(), and FSMSADF::RandomGraph::getChannelsBetweenActors().
CString FSMSADF::Port::getTypeAsString | ( | ) | const |
getTypeAsString() The function returns a string which specifies the port 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().
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().
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().
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().
setRateOfScenario() The function sets the rate of the port in the given scenario.
References rate.
Referenced by FSMSADF::RandomGraph::assignRatesToPorts(), constructFromXML(), FSMSADF::Actor::constructPropertiesFromXML(), FSMSADF::BindingAwareGraph::createMappedActorNSoC(), FSMSADF::BindingAwareGraph::createMappedChannelToConnectionNSoC(), FSMSADF::BindingAwareGraph::createMappedChannelToTileNSoC(), FSMSADF::GraphConversion::ensureStronglyBounded(), isolateScenario(), Port(), and setRate().
void FSMSADF::Port::setType | ( | const CString & | t | ) |
void FSMSADF::Port::setType | ( | const PortType | t | ) | [inline] |
References type.
Referenced by constructFromXML(), createCopy(), and FSMSADF::Actor::createPort().
Friends And Related Function Documentation
ostream& operator<< | ( | ostream & | out, | |
Port & | p | |||
) | [friend] |
Member Data Documentation
Channel* FSMSADF::Port::channel [private] |
Referenced by connectToChannel(), and getChannel().
map<Scenario*,Rate> FSMSADF::Port::rate [private] |
Referenced by getRate(), getRateOfScenario(), isolateScenario(), print(), setRate(), and setRateOfScenario().
PortType FSMSADF::Port::type [private] |
Referenced by getType(), getTypeAsString(), and setType().
The documentation for this class was generated from the following files: