#include <actor.h>

Inheritance diagram for FSMSADF::Actor:
Collaboration diagram for FSMSADF::Actor:

List of all members.

Classes

class  ProcessorType
class  ProcessorTypes

Public Member Functions

 Actor (GraphComponent c)
 ~Actor ()
Actorcreate (GraphComponent c) const
ActorcreateCopy (GraphComponent c) const
Actorclone (GraphComponent c) const
void constructFromXML (const CNodePtr actorNode)
void constructPropertiesFromXML (Scenario *s, const CNodePtr actorPropertiesNode)
void convertToXML (const CNodePtr actorNode)
void convertPropertiesToXML (Scenario *s, const CNodePtr actorPropertiesNode)
void isolateScenario (Scenario *s)
CString getType () const
void setType (const CString &t)
PortsgetPorts ()
PortgetPort (const CId id)
PortgetPort (const CString &name)
void addPort (Port *p)
void removePort (const CString &name)
PortcreatePort (GraphComponent &c)
PortcreatePort (const Port::PortType type)
bool isConnected () const
Time getExecutionTimeOfScenario (Scenario *s, const CString &processorType) const
void setExecutionTimeOfScenario (Scenario *s, const CString &processorType, const Time t)
Size getStateSizeOfScenario (Scenario *s, const CString &processorType) const
void setStateSizeOfScenario (Scenario *s, const CString &processorType, const Size sz)
const ProcessorTypesgetProcessorTypes () const
void setProcessorTypes (const ProcessorTypes &p)
const ProcessorTypegetProcessorType (const CString &type) const
const CStringgetDefaultProcessorType () const
void setDefaultProcessorType (const CString &t)
ScenarioGraphgetScenarioGraph () const
ostream & print (ostream &out)

Private Member Functions

ScenariogetDefaultScenario () const

Private Attributes

CString type
Ports ports
ProcessorTypes processorTypes
CString defaultProcessorType

Friends

ostream & operator<< (ostream &out, Actor &a)

Detailed Description

Actor Actor in FSM-based SADF graph


Constructor & Destructor Documentation

FSMSADF::Actor::Actor ( GraphComponent  c  ) 

Actor () Constructor.

Referenced by create().

FSMSADF::Actor::~Actor (  ) 

~Actor () Destructor.

References ports.


Member Function Documentation

void FSMSADF::Actor::addPort ( Port p  ) 

addPort () Add a port to an actor.

References ports.

Referenced by clone(), constructFromXML(), and createPort().

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

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

References a, addPort(), FSMSADF::Port::clone(), createCopy(), FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::GraphComponent(), and ports.

Here is the call graph for this function:

void FSMSADF::Actor::constructFromXML ( const CNodePtr  actorNode  ) 

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

References addPort(), CGetAttribute(), CGetChildNode(), CHasAttribute(), CNextNode(), component, FSMSADF::Port::constructFromXML(), getPorts(), FSMSADF::GraphComponent::GraphComponent(), FSMSADF::GraphComponent::setName(), and setType().

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

Here is the call graph for this function:

void FSMSADF::Actor::constructPropertiesFromXML ( Scenario s,
const CNodePtr  actorPropertiesNode 
)

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

References CGetAttribute(), CGetChildNode(), CHasAttribute(), CHasChildNode(), CNextNode(), getPort(), setDefaultProcessorType(), setExecutionTimeOfScenario(), FSMSADF::Port::setRateOfScenario(), and setStateSizeOfScenario().

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

Here is the call graph for this function:

void FSMSADF::Actor::convertPropertiesToXML ( Scenario s,
const CNodePtr  actorPropertiesNode 
)
void FSMSADF::Actor::convertToXML ( const CNodePtr  actorNode  ) 

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

References CAddAttribute(), CAddNode(), FSMSADF::GraphComponent::getName(), getType(), and ports.

Here is the call graph for this function:

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

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

References Actor().

Referenced by createCopy().

Here is the call graph for this function:

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

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

References a, create(), getDefaultProcessorType(), FSMSADF::GraphComponent::getName(), getProcessorTypes(), getType(), setDefaultProcessorType(), FSMSADF::GraphComponent::setName(), setProcessorTypes(), and setType().

Referenced by clone().

Here is the call graph for this function:

Port * FSMSADF::Actor::createPort ( GraphComponent c  ) 

createPort () Create a new port on the actor.

References addPort().

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

Here is the call graph for this function:

Port * FSMSADF::Actor::createPort ( const Port::PortType  type  ) 

createPort () Create a new port on the actor.

References c, createPort(), getPorts(), FSMSADF::GraphComponent::GraphComponent(), and FSMSADF::Port::setType().

Here is the call graph for this function:

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

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

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

Referenced by getExecutionTimeOfScenario(), and getStateSizeOfScenario().

Here is the call graph for this function:

Time FSMSADF::Actor::getExecutionTimeOfScenario ( Scenario s,
const CString processorType 
) const
Port * FSMSADF::Actor::getPort ( const CId  id  ) 

getPort () The function returns a reference to a port with the given id.

References FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::getName(), and ports.

Referenced by FSMSADF::Channel::clone(), FSMSADF::Channel::constructFromXML(), and constructPropertiesFromXML().

Here is the call graph for this function:

Port * FSMSADF::Actor::getPort ( const CString name  ) 

getPort () The function returns a reference to a port with the given name.

References FSMSADF::GraphComponent::getName(), and ports.

Here is the call graph for this function:

const Actor::ProcessorType & FSMSADF::Actor::getProcessorType ( const CString type  )  const

getProcessorType() The function returns a pointer to the processor type object of the specified type.

References FSMSADF::GraphComponent::getName(), and processorTypes.

Referenced by FSMSADF::MemoryBinding::constructFromXML(), getExecutionTimeOfScenario(), and getStateSizeOfScenario().

Here is the call graph for this function:

const ProcessorTypes& FSMSADF::Actor::getProcessorTypes (  )  const [inline]
Size FSMSADF::Actor::getStateSizeOfScenario ( Scenario s,
const CString processorType 
) const

getStateSizeOfScenario () The function returns the state size of the actor in scenario s on the specified processor type.

References getDefaultScenario(), FSMSADF::GraphComponent::getName(), getProcessorType(), and FSMSADF::Actor::ProcessorType::stateSize.

Referenced by convertPropertiesToXML(), FSMSADF::MemoryBinding::getAllocatedMemorySize(), FSMSADF::MemoryBinding::hasResourcesActorBinding(), isolateScenario(), and FSMSADF::OutputHTML::printScenario().

Here is the call graph for this function:

CString FSMSADF::Actor::getType (  )  const [inline]
bool FSMSADF::Actor::isConnected (  )  const

isConnected () The function returns true if all ports are connected to a channel, else it returns false.

References FSMSADF::Port::isConnected(), and ports.

Here is the call graph for this function:

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

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

References defaultProcessorType, FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::getName(), getType(), ports, FSMSADF::Port::print(), and processorTypes.

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

Here is the call graph for this function:

void FSMSADF::Actor::removePort ( const CString name  ) 

removePort () Remove a port from an actor and destory its memory space.

References FSMSADF::GraphComponent::getName(), and ports.

Referenced by FSMSADF::RandomGraph::createScenarioGraph().

Here is the call graph for this function:

void FSMSADF::Actor::setExecutionTimeOfScenario ( Scenario s,
const CString processorType,
const Time  t 
)
void FSMSADF::Actor::setProcessorTypes ( const ProcessorTypes p  ) 

setProcessorTypes () The function sets the processor type objects of all scenarios.

References FSMSADF::Actor::ProcessorType::executionTime, FSMSADF::ScenarioGraph::getGraph(), FSMSADF::Graph::getScenario(), getScenarioGraph(), processorTypes, FSMSADF::Actor::ProcessorType::stateSize, and FSMSADF::Actor::ProcessorType::type.

Referenced by createCopy().

Here is the call graph for this function:

void FSMSADF::Actor::setStateSizeOfScenario ( Scenario s,
const CString processorType,
const Size  sz 
)

setStateSizeOfScenario () The function sets the state size of the actor in scenario s on the specified processor type.

References processorTypes.

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

void FSMSADF::Actor::setType ( const CString t  )  [inline]

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
Actor a 
) [friend]

Member Data Documentation

Referenced by getType(), and setType().


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