Composed node to group elementary and composed nodes. More...
#include <Bloc.hxx>
Public Member Functions | |
Bloc (const Bloc &other, ComposedNode *father, bool editionOnly) | |
Bloc (const std::string &name) | |
Create a Bloc node with a given name. More... | |
virtual | ~Bloc () |
bool | isFinished () |
Indicate if the bloc execution is finished. More... | |
int | getNumberOfCFLinks () const |
void | init (bool start=true) |
Initialize the bloc. More... | |
void | getReadyTasks (std::vector< Task * > &tasks) |
Collect all nodes that are ready to execute. More... | |
void | exUpdateState () |
Update the bloc state. More... | |
bool | edAddChild (Node *DISOWNnode) throw (Exception) |
Add a child node to the bloc. More... | |
void | edRemoveChild (Node *node) throw (Exception) |
std::list< Node * > | getChildren () const |
std::list< Node * > | edGetDirectDescendants () const |
std::vector< std::list< Node * > > | splitIntoIndependantGraph () const |
Node * | getChildByShortName (const std::string &name) const throw (Exception) |
virtual void | writeDot (std::ostream &os) const |
Dump to the input stream a dot representation of the node. More... | |
void | accept (Visitor *visitor) |
template<bool direction> | |
void | findAllPathsStartingFrom (Node *start, std::list< std::vector< Node * > > &vec, std::map< Node *, std::set< Node * > > &accelStr) const |
template<bool direction> | |
void | findAllNodesStartingFrom (Node *start, std::set< Node * > &result, std::map< Node *, std::set< Node * > > &accelStr, LinkInfo &info) const |
virtual std::string | typeName () |
int | getMaxLevelOfParallelism () const |
void | removeRecursivelyRedundantCL () |
template<bool direction> | |
unsigned | appendIfAlreadyFound (std::list< std::vector< Node * > > &res, const std::vector< Node * > &startRes, Node *node, std::map< Node *, std::set< Node * > > &fastFinder) |
Public Member Functions inherited from YACS::ENGINE::StaticDefinedComposedNode | |
bool | isPlacementPredictableB4Run () const |
bool | isMultiplicitySpecified (unsigned &value) const |
void | forceMultiplicity (unsigned value) |
void | selectRunnableTasks (std::vector< Task * > &tasks) |
Public Member Functions inherited from YACS::ENGINE::ComposedNode | |
virtual | ~ComposedNode () |
bool | isFinished () |
void | init (bool start=true) |
virtual void | shutdown (int level) |
Stop all pending activities of the composed node. More... | |
virtual void | resetState (int level) |
Reset the state of the node and its children depending on the parameter level. More... | |
std::string | getName () const |
std::string | getTaskName (Task *task) const |
DeploymentTree | getDeploymentTree () const |
Essentially for test. Use checkDeploymentTree instead to be sure that returned DeploymentTree is consistent. More... | |
DeploymentTree | checkDeploymentTree (bool deep) const throw (Exception) |
Perform check of deployment consistency of the current graph. More... | |
std::vector< Task * > | getNextTasks (bool &isMore) |
void | notifyFrom (const Task *sender, YACS::Event event, const Executor *execInst) |
Notify the node a task has emitted an event. More... | |
bool | edAddLink (OutPort *start, InPort *end) throw (Exception) |
Add a dataflow link between two data ports. More... | |
virtual bool | edAddDFLink (OutPort *start, InPort *end) throw (Exception) |
Connect an OutPort to an InPort and add the necessary control link. More... | |
bool | edAddLink (OutGate *start, InGate *end) throw (Exception) |
Add a controlflow link between two control ports. More... | |
bool | edAddCFLink (Node *nodeS, Node *nodeE) throw (Exception) |
Add a controlflow link between two nodes. More... | |
void | edRemoveCFLink (Node *nodeS, Node *nodeE) throw (Exception) |
Remove a controlflow link. More... | |
void | edRemoveLink (OutPort *start, InPort *end) throw (Exception) |
Remove a dataflow link. More... | |
void | edRemoveLink (OutGate *start, InGate *end) throw (Exception) |
Remove a controlflow link. More... | |
virtual bool | isRepeatedUnpredictablySeveralTimes () const |
std::list< ElementaryNode * > | getRecursiveConstituents () const |
std::list< Node * > | getAllRecursiveNodes () |
Get all children nodes elementary and composed including this node. More... | |
virtual std::list< Node * > | getAllRecursiveConstituents () |
Idem getAllRecursiveNodes, but this node is NOT included. More... | |
std::list< ProgressWeight > | getProgressWeight () const |
Get the progress weight for all elementary nodes. More... | |
std::string | getInPortName (const InPort *) const throw (Exception) |
Get the input port name. More... | |
std::string | getOutPortName (const OutPort *) const throw (Exception) |
int | getNumberOfInputPorts () const |
int | getNumberOfOutputPorts () const |
std::list< InputPort * > | getSetOfInputPort () const |
std::list< OutputPort * > | getSetOfOutputPort () const |
std::list< InputPort * > | getLocalInputPorts () const |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself More... | |
std::list< OutputPort * > | getLocalOutputPorts () const |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself More... | |
std::set< OutPort * > | getAllOutPortsLeavingCurrentScope () const |
List all output ports of children nodes that are linked to out of scope input ports. More... | |
std::set< InPort * > | getAllInPortsComingFromOutsideOfCurrentScope () const |
List all input ports that are linked to out of scope ports. More... | |
std::list< InputDataStreamPort * > | getSetOfInputDataStreamPort () const |
std::list< OutputDataStreamPort * > | getSetOfOutputDataStreamPort () const |
OutPort * | getOutPort (const std::string &name) const throw (Exception) |
InputPort * | getInputPort (const std::string &name) const throw (Exception) |
Get an input port given its name. More... | |
OutputPort * | getOutputPort (const std::string &name) const throw (Exception) |
Get an output port given its name. More... | |
InputDataStreamPort * | getInputDataStreamPort (const std::string &name) const throw (Exception) |
OutputDataStreamPort * | getOutputDataStreamPort (const std::string &name) const throw (Exception) |
std::vector< std::pair < OutPort *, InPort * > > | getSetOfInternalLinks () const |
virtual std::vector< std::pair < OutPort *, InPort * > > | getSetOfLinksLeavingCurrentScope () const |
void | checkConsistency (LinkInfo &info) const throw (Exception) |
virtual std::vector< std::pair < InPort *, OutPort * > > | getSetOfLinksComingInCurrentScope () const |
virtual void | edUpdateState () |
update the status of the node More... | |
virtual void | checkBasicConsistency () const throw (Exception) |
virtual std::string | getErrorReport () |
returns a string that contains an error report if the node is in error More... | |
ComposedNode * | getRootNode () const throw (Exception) |
bool | isNodeAlreadyAggregated (const Node *node) const |
Check that Node 'node' is already a direct son of this. More... | |
Node * | isInMyDescendance (Node *nodeToTest) const |
Returns the parent of a node that is the direct child of this node. More... | |
std::string | getChildName (const Node *node) const throw (Exception) |
virtual std::string | getMyQualifiedName (const Node *directSon) const |
Node * | getChildByName (const std::string &name) const throw (Exception) |
void | loaded () |
void | connected () |
void | accept (Visitor *visitor) |
virtual void | cleanNodes () |
Clean the composed node in case of not clean exit. More... | |
virtual std::string | getProgress () const |
Public Member Functions inherited from YACS::ENGINE::Node | |
virtual | ~Node () |
Node * | clone (ComposedNode *father, bool editionOnly=true) const |
This method MUST NEVER BE VIRTUAL More... | |
Node * | cloneWithoutCompAndContDeepCpy (ComposedNode *father, bool editionOnly=true) const |
This method MUST NEVER BE VIRTUAL More... | |
void | setState (YACS::StatesForNode theState) |
Sets the given state for node. More... | |
virtual YACS::StatesForNode | getState () const |
virtual YACS::StatesForNode | getEffectiveState () const |
Return the node state in the context of its father. More... | |
virtual YACS::StatesForNode | getEffectiveState (const Node *) const |
Return the effective state of a node in the context of this one (its father) More... | |
std::string | getColorState (YACS::StatesForNode state) const |
Return the color associated to a state. More... | |
InGate * | getInGate () |
OutGate * | getOutGate () |
const std::string & | getName () const |
void | setName (const std::string &name) |
Change the name of the node. More... | |
ComposedNode * | getFather () const |
const std::string | getId () const |
bool | exIsControlReady () const |
std::list< Node * > | getOutNodes () const |
virtual void | exFailedState () |
Notify this node that its execution has failed. More... | |
virtual void | exDisabledState () |
Notify this node that it has been disabled. More... | |
std::list< InPort * > | getSetOfInPort () const |
std::list< OutPort * > | getSetOfOutPort () const |
virtual std::set< InputPort * > | edGetSetOfUnitializedInputPort () const |
Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More... | |
virtual bool | edAreAllInputPortInitialized () const |
Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More... | |
InPort * | getInPort (const std::string &name) const throw (Exception) |
InPropertyPort * | getInPropertyPort () const throw (Exception) |
std::list< ComposedNode * > | getAllAscendanceOf (ComposedNode *levelToStop=0) const |
bool | operator> (const Node &other) const |
bool | operator< (const Node &other) const |
std::string | getImplementation () const |
virtual void | setProperty (const std::string &name, const std::string &value) |
virtual std::string | getProperty (const std::string &name) |
std::map< std::string, std::string > | getProperties () |
std::map< std::string, std::string > | getPropertyMap () |
virtual void | setProperties (std::map< std::string, std::string > properties) |
virtual Proc * | getProc () |
virtual const Proc * | getProc () const |
std::string | getQualifiedName () const |
same as Node::getName() in most cases, but differs for children of switch More... | |
int | getNumId () |
return node instance identifiant, unique for each node instance More... | |
std::vector< std::pair < std::string, int > > | getDPLScopeInfo (ComposedNode *gfn) |
virtual void | applyDPLScope (ComposedNode *gfn) |
virtual void | sendEvent (const std::string &event) |
emit notification to all observers registered with the dispatcher More... | |
virtual void | sendEvent2 (const std::string &event, void *something) |
emit notification to all observers registered with the dispatcher More... | |
virtual std::string | getErrorDetails () const |
virtual void | setErrorDetails (const std::string &error) |
virtual void | modified () |
Sets Node in modified state and its father if it exists. More... | |
virtual int | isModified () |
virtual int | isValid () |
indicates if the node is valid (returns 1) or not (returns 0) More... | |
virtual std::string | getContainerLog () |
returns a string that contains the name of the container log file if it exists More... | |
virtual void | ensureLoading () |
Put this node into TOLOAD state when possible. More... | |
virtual void | getCoupledNodes (std::set< Task * > &coupledNodes) |
Public Member Functions inherited from YACS::ENGINE::Scheduler | |
virtual | ~Scheduler () |
Protected Member Functions | |
Node * | simpleClone (ComposedNode *father, bool editionOnly=true) const |
bool | areAllSubNodesFinished () const |
bool | areAllSubNodesDone () const |
bool | isNameAlreadyUsed (const std::string &name) const |
void | checkNoCyclePassingThrough (Node *node) throw (Exception) |
std::vector< std::pair < OutGate *, InGate * > > | getSetOfInternalCFLinks () const |
YACS::Event | updateStateOnFinishedEventFrom (Node *node) |
YACS::Event | updateStateOnFailedEventFrom (Node *node, const Executor *execInst) |
Notify this bloc that a node has failed. More... | |
void | initComputation () const |
void | performCFComputationsOnlyOneLevel (LinkInfo &info) const |
void | performCFComputations (LinkInfo &info) const |
void | destructCFComputations (LinkInfo &info) const |
destroy recursively all results of initial computations. More... | |
void | checkControlDependancy (OutPort *start, InPort *end, bool cross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &fw, std::vector< OutPort * > &fwCross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &bw, LinkInfo &info) const |
bool | areLinked (Node *start, Node *end, bool fw) const |
Check if two nodes are linked. More... | |
bool | arePossiblyRunnableAtSameTime (Node *start, Node *end) const |
Check if two nodes can run in parallel. More... | |
void | checkCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const |
Check control flow links. More... | |
void | seekOkAndUseless1 (std::vector< Node * > &okAndUseless1, std::set< Node * > &allNodes) const |
void | seekUseless2 (std::vector< Node * > &useless2, std::set< Node * > &allNodes) const |
Protected Member Functions inherited from YACS::ENGINE::StaticDefinedComposedNode | |
StaticDefinedComposedNode (const std::string &name) | |
StaticDefinedComposedNode (const StaticDefinedComposedNode &other, ComposedNode *father) | |
void | checkControlDependancy (OutPort *start, InPort *end, bool cross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &fw, std::vector< OutPort * > &fwCross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &bw, LinkInfo &info) const |
Protected Member Functions inherited from YACS::ENGINE::ComposedNode | |
ComposedNode (const std::string &name) | |
ComposedNode (const ComposedNode &other, ComposedNode *father) | |
void | performDuplicationOfPlacement (const Node &other) |
performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More... | |
void | performShallowDuplicationOfPlacement (const Node &other) |
performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More... | |
void | edDisconnectAllLinksWithMe () |
YACS::Event | updateStateFrom (Node *node, YACS::Event event, const Executor *execInst) |
Update node state on receiving event from a node. More... | |
virtual YACS::Event | updateStateOnStartEventFrom (Node *node) |
Method used to notify the node that a child node has started. More... | |
virtual void | checkLinkPossibility (OutPort *start, const std::list< ComposedNode * > &pointsOfViewStart, InPort *end, const std::list< ComposedNode * > &pointsOfViewEnd) throw (Exception) |
virtual void | buildDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
virtual void | buildDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) |
virtual void | getDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
virtual void | getDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
virtual void | releaseDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
virtual void | releaseDelegateOf (OutPort *portDwn, OutPort *portUp, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
void | checkInMyDescendance (Node *nodeToTest) const throw (Exception) |
Check if a node is in the descendance of this node. More... | |
template<class PORT > | |
std::string | getPortName (const PORT *port) const throw (Exception) |
void | checkNoCrossHierachyWith (Node *node) const throw (Exception) |
Node * | getLowestNodeDealingAll (const std::list< OutPort * > &ports) const |
void | checkLinksCoherenceRegardingControl (const std::vector< OutPort * > &starts, InputPort *end, LinkInfo &info) const throw (Exception) |
void | solveObviousOrDelegateCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const |
Protected Member Functions inherited from YACS::ENGINE::Node | |
Node (const std::string &name) | |
Node (const Node &other, ComposedNode *father) | |
virtual void | exForwardFailed () |
virtual void | exForwardFinished () |
Static Protected Member Functions | |
static void | verdictForOkAndUseless1 (const std::map< Node *, std::list< OutPort * > > &pool, InputPort *end, const std::vector< Node * > &candidates, unsigned char &alreadyFed, bool direction, LinkInfo &info) |
static void | verdictForCollapses (const std::map< Node *, std::list< OutPort * > > &pool, InputPort *end, const std::set< Node * > &candidates, unsigned char &alreadyFed, bool direction, LinkInfo &info) |
Protected Attributes | |
std::list< Node * > | _setOfNode |
std::map< Node *, std::set < Node * > > * | _fwLinks |
For internal calculations. More... | |
std::map< Node *, std::set < Node * > > * | _bwLinks |
For internal calculations. More... | |
Static Private Member Functions | |
static void | findUselessLinksIn (const std::list< std::vector< Node * > > &res, LinkInfo &info) |
template<bool direction> | |
static unsigned | appendIfAlreadyFound (std::list< std::vector< Node * > > &res, const std::vector< Node * > &startRes, Node *node, std::map< Node *, std::set< Node * > > &fastFinder) |
static void | updateWithNewFind (const std::vector< Node * > &path, std::map< Node *, std::set< Node * > > &fastFinder) |
Additional Inherited Members | |
Static Public Member Functions inherited from YACS::ENGINE::ComposedNode | |
static ComposedNode * | getLowestCommonAncestor (Node *node1, Node *node2) throw (Exception) |
Retrieves the lowest common ancestor of 2 nodes. More... | |
static std::string | getLowestCommonAncestorStr (const std::string &node1, const std::string &node2) |
Public Attributes inherited from YACS::ENGINE::Node | |
YACS::Colour | _colour |
Static Public Attributes inherited from YACS::ENGINE::Node | |
static std::map< int, Node * > | idMap |
Static Protected Attributes inherited from YACS::ENGINE::ComposedNode | |
static const char | SEP_CHAR_BTW_LEVEL [] ="." |
static const unsigned char | FED_ST = 2 |
static const unsigned char | FREE_ST = 0 |
static const unsigned char | FED_DS_ST = 1 |
Bloc::Bloc | ( | const Bloc & | other, |
ComposedNode * | father, | ||
bool | editionOnly | ||
) |
Definition at line 46 of file Bloc.cxx.
References _setOfNode, YACS::ENGINE::ComposedNode::edAddCFLink(), YACS::ENGINE::ComposedNode::edAddLink(), YACS::ENGINE::ComposedNode::getChildByName(), YACS::ENGINE::ComposedNode::getChildName(), YACS::ENGINE::Node::getInPort(), YACS::ENGINE::ComposedNode::getLowestCommonAncestor(), YACS::ENGINE::Port::getNode(), YACS::ENGINE::ComposedNode::getOutPort(), YACS::ENGINE::ComposedNode::getPortName(), getSetOfInternalCFLinks(), and YACS::ENGINE::ComposedNode::getSetOfInternalLinks().
Referenced by simpleClone().
Bloc::Bloc | ( | const std::string & | name | ) |
|
virtual |
|
virtual |
Implements YACS::ENGINE::Node.
Reimplemented in YACS::ENGINE::Proc.
Definition at line 445 of file Bloc.cxx.
References YACS::ENGINE::Visitor::visitBloc().
|
staticprivate |
unsigned YACS::ENGINE::Bloc::appendIfAlreadyFound | ( | std::list< std::vector< Node * > > & | res, |
const std::vector< Node * > & | startRes, | ||
Node * | node, | ||
std::map< Node *, std::set< Node * > > & | fastFinder | ||
) |
Internal method for CF computation. Given 'fastFinder' it searched 'node' to see if an already found path in 'res' go through 'node'. If true all paths are deduced and append to res and 'fastFinder' is updated for next turn.
Definition at line 125 of file Bloc.hxx.
References CORBAEngineTest::i, PMMLBasicsTestLauncher::ret, and updateWithNewFind().
|
protected |
Definition at line 286 of file Bloc.cxx.
References _setOfNode, YACS::DISABLED, and YACS::DONE.
Referenced by updateStateOnFailedEventFrom(), and updateStateOnFinishedEventFrom().
|
protected |
Definition at line 297 of file Bloc.cxx.
References _setOfNode, YACS::DISABLED, YACS::DONE, YACS::ERROR, YACS::FAILED, and YACS::INTERNALERR.
Referenced by updateStateOnFailedEventFrom(), and updateStateOnFinishedEventFrom().
Check if two nodes are linked.
'start' and 'end' must be direct son of 'this'. Typically used for data link.
start | : start node |
end | : end node |
fw | indicates if it is a forward link searched (true : default value) or a backward link serach. |
Definition at line 625 of file Bloc.cxx.
Referenced by checkControlDependancy().
Check if two nodes can run in parallel.
Typically used for stream link. 'start' and 'end' must be direct son of 'this'.
start | : start node |
end | : end node |
Definition at line 639 of file Bloc.cxx.
Referenced by checkControlDependancy().
|
protectedvirtual |
Check control flow links.
starts | If different of 0, must aggregate at leat 1 element. |
end | : end port |
alreadyFed | in/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port. |
direction | If true : forward direction else backward direction. |
info | : collected information |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 654 of file Bloc.cxx.
References YACS::ENGINE::E_COLLAPSE_DFDS, YACS::ENGINE::ComposedNode::FED_DS_ST, YACS::ENGINE::ComposedNode::FED_ST, YACS::ENGINE::ComposedNode::FREE_ST, YACS::ENGINE::ComposedNode::isInMyDescendance(), YACS::ENGINE::LinkInfo::pushErrLink(), seekOkAndUseless1(), seekUseless2(), verdictForCollapses(), and verdictForOkAndUseless1().
Referenced by verdictForCollapses().
|
protectedvirtual |
WARNING Needs call of performCFComputations before beeing called. Perform updates of containers regarding attributes of link 'start' -> 'end' and check the correct linking. The output is in info struct.
start | : start port |
end | : end port |
cross | : |
fw | out parameter being append if start -> end link is a forward link without cross type DF/DS. |
fwCross | out parameter being append if start -> end link is a forward link with cross type DF/DS. |
bw | out parameter being append if start -> end link is a backward link. |
info | out parameter being informed about eventual errors. |
Implements YACS::ENGINE::ComposedNode.
Definition at line 589 of file Bloc.cxx.
References areLinked(), arePossiblyRunnableAtSameTime(), YACS::ENGINE::E_DS_LINK_UNESTABLISHABLE, YACS::ENGINE::E_UNPREDICTABLE_FED, YACS::ENGINE::Port::getNode(), YACS::ENGINE::ComposedNode::isInMyDescendance(), and YACS::ENGINE::LinkInfo::pushErrLink().
Implements YACS::ENGINE::ComposedNode.
Definition at line 336 of file Bloc.cxx.
References insertNodeChildrenInSet().
|
protectedvirtual |
destroy recursively all results of initial computations.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 569 of file Bloc.cxx.
References _bwLinks, _fwLinks, and YACS::ENGINE::ComposedNode::destructCFComputations().
Referenced by removeRecursivelyRedundantCL().
Add a child node to the bloc.
node,: | the node to add to the bloc |
If node is already a direct child of current bloc, do nothing. If node is a child of another bloc, throw exception. If node name already used in bloc, throw exception. Publish inputPorts in current bloc and ancestors.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 174 of file Bloc.cxx.
References YACS::ENGINE::Node::_father.
Referenced by YACS::HMI::SubjectNode::registerUndoDestroy().
|
inlinevirtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 53 of file Bloc.hxx.
Referenced by YACS::HMI::GuiEditor::PutGraphInBloc().
Remove 'node' from the set of direct children.
If | 'node' is NOT the son of 'this'. |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 218 of file Bloc.cxx.
References YACS::ENGINE::ComposedNode::edRemoveChild().
|
virtual |
Update the bloc state.
Update the '_state' attribute. Typically called by 'this->_inGate' when 'this->_inGate' is ready. Contrary to Node::exUpdateState no check done on inputs because internal linked DF inputports are not valid yet.
Reimplemented from YACS::ENGINE::Node.
Definition at line 151 of file Bloc.cxx.
References YACS::ENGINE::Node::_inGate, _setOfNode, YACS::ENGINE::Node::_state, YACS::ACTIVATED, YACS::DISABLED, YACS::DONE, YACS::ENGINE::InGate::exIsReady(), and YACS::ENGINE::Node::setState().
Referenced by YACS::ENGINE::loadState(), and main().
void YACS::ENGINE::Bloc::findAllNodesStartingFrom | ( | Node * | start, |
std::set< Node * > & | result, | ||
std::map< Node *, std::set< Node * > > & | accelStr, | ||
LinkInfo & | info | ||
) | const |
void YACS::ENGINE::Bloc::findAllPathsStartingFrom | ( | Node * | start, |
std::list< std::vector< Node * > > & | vec, | ||
std::map< Node *, std::set< Node * > > & | accelStr | ||
) | const |
Method for CF computation.DFS visitor is used. if direction is true forward visiting is performed, if false backward is performed.
start | must be a direct descendant of 'this'. |
vec | : |
accelStr |
Definition at line 191 of file Bloc.hxx.
References YACS::ENGINE::Node::_colour, YACS::Black, initComputation(), and updateWithNewFind().
|
staticprivate |
Internal method : After all paths have been found, useless CF links are searched
Definition at line 858 of file Bloc.cxx.
References YACS::ENGINE::LinkInfo::pushUselessCFLink().
Referenced by findAllNodesStartingFrom().
Implements YACS::ENGINE::ComposedNode.
Definition at line 277 of file Bloc.cxx.
Referenced by YACS::HMI::GuiEditor::PutGraphInBloc(), and YACS::HMI::GuiEditor::PutGraphInNode().
|
inline |
Definition at line 52 of file Bloc.hxx.
Referenced by YACS::ENGINE::ProcCataLoader::loadCata(), YACS::HMI::CommandPutInComposedNode::localExecute(), and writeDot().
|
virtual |
Returns the max level of parallelism is this. The max of parallelism is equal to the sum of the max parallelism level for all concurrent branches in this.
Implements YACS::ENGINE::Node.
Definition at line 454 of file Bloc.cxx.
References YACS::ENGINE::SetOfPoints::getMaxLevelOfParallelism(), PMMLBasicsTestLauncher::ret, YACS::ENGINE::SetOfPoints::simplify(), and splitIntoIndependantGraph().
int Bloc::getNumberOfCFLinks | ( | ) | const |
|
virtual |
Collect all nodes that are ready to execute.
tasks | : vector of tasks to collect ready nodes |
Implements YACS::ENGINE::Node.
Definition at line 131 of file Bloc.cxx.
References _setOfNode, YACS::ENGINE::Node::_state, YACS::ACTIVATED, YACS::ENGINE::Node::setState(), and YACS::TOACTIVATE.
Definition at line 348 of file Bloc.cxx.
References _setOfNode, and PMMLBasicsTestLauncher::ret.
Referenced by Bloc().
|
virtual |
Initialize the bloc.
start | : a boolean flag indicating the kind of initialization If start is true, it's a complete initialization with reinitialization of port values If start is false, there is no initialization of port values |
Reimplemented from YACS::ENGINE::Node.
Reimplemented in YACS::ENGINE::SalomeProc.
Definition at line 93 of file Bloc.cxx.
References _setOfNode, and YACS::ENGINE::Node::init().
Referenced by YACS::ENGINE::SalomeProc::init(), YACS::ENGINE::loadState(), and main().
|
protected |
Definition at line 676 of file Bloc.cxx.
References _setOfNode, and YACS::White.
Referenced by findAllPathsStartingFrom(), and removeRecursivelyRedundantCL().
|
virtual |
Indicate if the bloc execution is finished.
The execution bloc is finished if all its child nodes are finished with or without error or if it is disabled (not to execute)
Implements YACS::ENGINE::Scheduler.
Definition at line 105 of file Bloc.cxx.
References YACS::ENGINE::Node::_state, YACS::DISABLED, YACS::DONE, YACS::ERROR, and YACS::FAILED.
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 311 of file Bloc.cxx.
References _setOfNode.
|
protectedvirtual |
Updates mutable structures _fwLinks and _bwLinks with the result of computation (CPU consuming method). _fwLinks is a map with a Node* as key and a set<Node*> as value. The set gives all nodes that are forwardly connected to the key node _bwLinks is a map for backward dependencies The method is : for all CF link (n1->n2) add n2 and _fwLinks[n2] in forward dependencies of n1 and _bwLinks[n1] add n1 and _bwLinks[n1] in backward dependencies of n2 and _fwLinks[n2] For useless links If a node is already in a forward dependency when adding and the direct link already exists so it's a useless link (see the code !)
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 563 of file Bloc.cxx.
References YACS::ENGINE::ComposedNode::performCFComputations(), and performCFComputationsOnlyOneLevel().
|
protected |
Definition at line 479 of file Bloc.cxx.
References _bwLinks, _fwLinks, _setOfNode, YACS::ENGINE::OutGate::edSetInGate(), YACS::ENGINE::Node::getOutGate(), YACS::ENGINE::LinkInfo::pushUselessCFLink(), and PMMLBasicsTestLauncher::ret.
Referenced by performCFComputations(), and removeRecursivelyRedundantCL().
|
virtual |
This method recursively all redundant control links in this.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 467 of file Bloc.cxx.
References destructCFComputations(), YACS::ENGINE::ComposedNode::edRemoveCFLink(), YACS::ENGINE::LinkInfo::getInfoUselessLinks(), YACS::ENGINE::I_CF_USELESS, initComputation(), performCFComputationsOnlyOneLevel(), and YACS::ENGINE::ComposedNode::removeRecursivelyRedundantCL().
|
protected |
WARNING use this method only after having called Bloc::performCFComputations method.
okAndUseless1 | out param contains at the end, the nodes without any collapse. |
allNodes | in/out param. At the end, all the nodes in 'okAndUseless1' are deleted from 'allNodes'. |
Definition at line 791 of file Bloc.cxx.
Referenced by checkCFLinks().
|
protected |
WARNING use this method only after having called Bloc::performCFComputations method. For params see Bloc::seekOkAndUseless1.
Definition at line 817 of file Bloc.cxx.
Referenced by checkCFLinks().
|
protectedvirtual |
std::vector< std::list< Node * > > Bloc::splitIntoIndependantGraph | ( | ) | const |
Definition at line 229 of file Bloc.cxx.
References YACS::ENGINE::Node::_colour, _setOfNode, YACS::Grey, PMMLBasicsTestLauncher::ret, and YACS::White.
Referenced by getMaxLevelOfParallelism().
|
inlinevirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Reimplemented in YACS::ENGINE::Proc, and YACS::ENGINE::SalomeProc.
|
protectedvirtual |
Notify this bloc that a node has failed.
node | : node that has emitted the event |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 406 of file Bloc.cxx.
References YACS::ABORT, areAllSubNodesDone(), areAllSubNodesFinished(), YACS::DONE, YACS::ENGINE::Node::exForwardFailed(), YACS::FAILED, YACS::FINISH, YACS::NOEVENT, and YACS::ENGINE::Node::setState().
|
protectedvirtual |
Calls the node's outgate OutGate::exNotifyDone if all nodes are not finished
Implements YACS::ENGINE::ComposedNode.
Definition at line 368 of file Bloc.cxx.
References YACS::ABORT, areAllSubNodesDone(), areAllSubNodesFinished(), DEBTRACE, YACS::DONE, YACS::ENGINE::Node::exForwardFailed(), YACS::ENGINE::Node::exForwardFinished(), YACS::FAILED, YACS::FINISH, YACS::ENGINE::Node::getName(), YACS::NOEVENT, YACS::ENGINE::Node::setState(), and YACS::Exception::what().
|
staticprivate |
Internal method : Given a succeful path : updates 'fastFinder'
Definition at line 844 of file Bloc.cxx.
Referenced by appendIfAlreadyFound(), and findAllPathsStartingFrom().
|
staticprotected |
Part of final step for CF graph anylizing. This is the part of collapses nodes.
pool | : |
end | : |
candidates | : |
alreadyFed | in/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port. |
direction | |
info | : collected information |
Definition at line 740 of file Bloc.cxx.
References checkCFLinks(), YACS::ENGINE::LinkInfo::endCollapseTransac(), YACS::ENGINE::ComposedNode::FED_ST, YACS::ENGINE::ComposedNode::FREE_ST, YACS::ENGINE::LinkInfo::pushWarnLink(), YACS::ENGINE::LinkInfo::startCollapseTransac(), YACS::ENGINE::W_BACK_COLLAPSE, YACS::ENGINE::W_BACK_COLLAPSE_AND_USELESS, YACS::ENGINE::W_BACK_COLLAPSE_EL, YACS::ENGINE::W_BACK_COLLAPSE_EL_AND_USELESS, YACS::ENGINE::W_COLLAPSE, YACS::ENGINE::W_COLLAPSE_AND_USELESS, YACS::ENGINE::W_COLLAPSE_EL, and YACS::ENGINE::W_COLLAPSE_EL_AND_USELESS.
Referenced by checkCFLinks().
|
staticprotected |
Part of final step for CF graph anylizing. This is the part of non collapse nodes.
pool | : |
end | : |
candidates | : |
alreadyFed | in/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port. |
direction | |
info | : collected information |
Definition at line 695 of file Bloc.cxx.
References YACS::ENGINE::ComposedNode::FED_ST, YACS::ENGINE::ComposedNode::FREE_ST, YACS::ENGINE::I_BACK, YACS::ENGINE::I_BACK_USELESS, YACS::ENGINE::I_USELESS, YACS::ENGINE::LinkInfo::pushInfoLink(), YACS::ENGINE::LinkInfo::pushWarnLink(), YACS::ENGINE::W_BACK_COLLAPSE_EL, YACS::ENGINE::W_BACK_COLLAPSE_EL_AND_USELESS, YACS::ENGINE::W_COLLAPSE_EL, and YACS::ENGINE::W_COLLAPSE_EL_AND_USELESS.
Referenced by checkCFLinks().
|
virtual |
Dump to the input stream a dot representation of the node.
os | : the input stream |
Reimplemented from YACS::ENGINE::Node.
Reimplemented in YACS::ENGINE::Proc.
Definition at line 421 of file Bloc.cxx.
References getChildren(), YACS::ENGINE::Node::getColorState(), YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::getId(), YACS::ENGINE::Node::getQualifiedName(), p, and CORBAEngineTest::state.
Referenced by YACS::ENGINE::Proc::writeDot().
For internal calculations.
Definition at line 37 of file Bloc.hxx.
Referenced by destructCFComputations(), performCFComputationsOnlyOneLevel(), and ~Bloc().
For internal calculations.
Definition at line 35 of file Bloc.hxx.
Referenced by destructCFComputations(), performCFComputationsOnlyOneLevel(), and ~Bloc().
|
protected |
Definition at line 33 of file Bloc.hxx.
Referenced by areAllSubNodesDone(), areAllSubNodesFinished(), Bloc(), exUpdateState(), getNumberOfCFLinks(), getReadyTasks(), getSetOfInternalCFLinks(), init(), initComputation(), isNameAlreadyUsed(), performCFComputationsOnlyOneLevel(), splitIntoIndependantGraph(), and ~Bloc().