\note <BR>In general, ports represent <STRONG>input or output parameters</STRONG> of the functions,
implemented in different kinds of nodes of the graph.
*/
- enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter ,
- InLineParameter , LoopParameter , SwitchParameter ,
- EndSwitchParameter , GOTOParameter , DataStreamParameter } ;
+ enum KindOfPort { UndefinedParameter ,
+ ServiceParameter ,
+ GateParameter ,
+ InLineParameter ,
+ LoopParameter ,
+ SwitchParameter ,
+ EndSwitchParameter ,
+ GOTOParameter ,
+ DataStreamParameter } ;
/*!
This enumeration contains a set of dependencies of InPorts and OutPorts.
/*!
This enumeration contains a set of elements defining the type of the node.
*/
- enum KindOfNode { FactoryNode , DataFlowGraph , ComputingNode ,
- InLineNode , LoopNode , EndLoopNode ,
- SwitchNode , EndSwitchNode , GOTONode , DataStreamGraph ,
- UnknownNode };
+ enum KindOfNode { FactoryNode ,
+ DataFlowGraph ,
+ ComputingNode ,
+ InLineNode ,
+ LoopNode ,
+ EndLoopNode ,
+ SwitchNode ,
+ EndSwitchNode ,
+ GOTONode ,
+ DataStreamGraph ,
+ MacroNode ,
+ UnknownNode };
/*!
This struct contains fields defining the date.
on this node(graph).
*/
- enum GraphEvent { UndefinedEvent , NoEvent , NewThreadEvent ,
- WaitingEvent , ReadyEvent ,
- RunningEvent , DoneEvent , ErroredEvent ,
- SuspendEvent , ResumeEvent ,
- KillEvent , StopEvent ,
- ReRunEvent , ReStartEvent } ;
+ enum GraphEvent { UndefinedEvent ,
+ NoEvent ,
+ NewThreadEvent ,
+ WaitingEvent ,
+ ReadyEvent ,
+ RunningEvent ,
+ DoneEvent ,
+ ErroredEvent ,
+ SuspendEvent ,
+ ResumeEvent ,
+ KillEvent ,
+ StopEvent } ;
// UndefinedState : Non existing Node, Port etc...
/*!
This enumeration contains a set of elements defining the current state of the node(graph).
*/
- enum GraphState { UndefinedState , NoState , EditingState , SuspendState ,
- WaitingState , ReadyState , SuspendReadyState ,
+ enum GraphState { UndefinedState ,
+ NoState ,
+ EditingState ,
+ SuspendState ,
+ WaitingState ,
+ ReadyState ,
+ SuspendReadyState ,
RunningState ,
- DoneState , ErrorState ,
- SuspendDoneState , SuspendErroredState ,
- KillState , StopState ,
- ReRunState , ReStartState ,
- NumberOfGraphStates } ;
+ DoneState ,
+ ErrorState ,
+ SuspendDoneState ,
+ SuspendErroredState ,
+ KillState ,
+ StopState ,
+ LoadingState,
+ NumberOfGraphStates } ;
/*! A sequence of string values.
*/
interface ELNode ;
interface SNode ;
interface ESNode ;
- interface StreamGraph ;
interface Graph ;
+ interface StreamGraph ;
typedef sequence<CNode> ListOfCNodes ;
typedef sequence<FNode> ListOfFNodes ;
typedef sequence<ELNode> ListOfELNodes ;
typedef sequence<SNode> ListOfSNodes ;
typedef sequence<ESNode> ListOfESNodes ;
- typedef sequence<Graph> ListOfGraphs ;
+ typedef sequence<Graph> ListOfGraphs ;
/*!
This struct contains fields defining different types of nodes.
The %ControlState gives a possibility to determine the "control actions" which have been done by
the user (Suspend, SuspendDone, Kill, etc...).
*/
- enum ControlState { VoidState , ToSuspendStartState ,
- ToSuspendState , ToSuspendDoneState ,
- ToKillState , ToKillDoneState , ToStopState ,
+ enum ControlState { VoidState ,
+ ToSuspendStartState ,
+ ToSuspendState ,
+ ToSuspendDoneState ,
+ ToKillState ,
+ ToKillDoneState ,
+ ToStopState ,
NumberOfControlStates } ;
-/*!
-The AutomatonState is an internal state of the automaton of the Executor
-of the %Supervision %Engine. It is used for inner debugging purposes only.
-*/
-
- enum AutomatonState { UnKnownState ,
- DataUndefState ,
- DataWaitingState ,
- DataReadyState ,
- SuspendedReadyState,
- SuspendedReadyToResumeState ,
- ResumedReadyState ,
- KilledReadyState ,
- StoppedReadyState ,
- ExecutingState ,
- SuspendedExecutingState ,
- ResumedExecutingState ,
- KilledExecutingState ,
- StoppedExecutingState ,
- SuccessedExecutingState ,
- ErroredExecutingState ,
- SuspendedSuccessedState ,
- SuspendedErroredState,
- ResumedSuccessedState ,
- ResumedErroredState ,
- KilledSuccessedState ,
- KilledErroredState ,
- StoppedSuccessedState ,
- StoppedErroredState ,
- SuccessedState ,
- ErroredState ,
- SuspendedState ,
- KilledState ,
- StoppedState ,
- SuspendedSuccessedToReStartState ,
- SuspendedErroredToReStartState ,
- ReRunnedState ,
- ReStartedState ,
- NumberOfAutomatonStates
- } ;
-
-
-
-
-
*/
interface SuperG : Engines::Component, SALOMEDS::Driver {
////////////////
+
+//DumpPython is defined in SALOME_Component.idl (SALOMEDS::Driver)
+// SALOMEDS::TMPFile DumpPython( in SALOMEDS::Study theStudy ,
+// in boolean isPublished ,
+// out boolean isValisScript ) ;
+
/*!
Constructs a graph with possibility to read/edit it
\param aGraph %aGraphName or %aGraphXmlFile
*/
SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ;
+/*!
+ Returns true if a Node (or Graph) has StreamPorts
+*/
+ boolean HasStreamPort() ;
+
/*!
Enters a value into an Input %Port
*/
/*!
Returns True if this node is a graph.
-\note <BR>A node of the graph can also represent in its turn another graph.
*/
boolean IsStreamGraph() ;
/*!
Returns True if this node is a graph.
-\note <BR>A node of the graph can also represent in its turn another graph.
*/
boolean IsGraph() ;
+
+/*!
+Returns True if this node is a MacroNode of a DataFlowGraph or a DataStreamGraph.
+*/
+ boolean IsMacro() ;
+/*!
+Returns True if this node is a MacroNode of a DataFlowGraph.
+*/
+ boolean IsFlowMacro() ;
+/*!
+Returns True if this node is a MacroNode of a DataStreamGraph.
+*/
+ boolean IsStreamMacro() ;
+
+/*!
+Returns True if this node is a Head Graph .
+*/
+ boolean IsHeadGraph() ;
+/*!
+Returns the MacroNode Level of this node.
+*/
+ long GraphLevel() ;
+
/*!
Returns True if the node appears to be a %computing node.
*/
*/
boolean Resume();
-/*!
- Restarts execution of the node.
-*/
- boolean ReRun();
-/*!
-Restarts execution of the graph beginning from a definite node.
-*/
- boolean ReRunAt( in string aNodeName );
-
-/*!
- Restarts and suspends execution of the node(graph).
-*/
- boolean ReStart();
-/*!
-Restarts and suspends execution of the graph beginning from a definite node.
-\param aNodeName String parameter defining the name of the node.
-*/
- boolean ReStartAt( in string aNodeName );
-
-/*!
- Returns automaton execution state of the node(graph).
-*/
- SUPERV::AutomatonState AutoState() ;
- // Control state required : Kill, Suspend, Stop
+// Control state required : Kill, Suspend, Stop
/*!
Returns control state of the node(graph).
*/
void ControlClear() ;
boolean ContainerKill();
+
/*!
Sets the position of the node in the window.
*/
*/
///////////////
- interface Graph : INode {
+ interface Graph : GNode {
///////////////
/*! Creates a Computing Node in a Graph.
SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction ,
out SUPERV::INode anEndOfSwitch ) ;
+ /*! Creates a "MacroNode" node which corresponds to a Graph with a xml file
+ */
+ SUPERV::Graph MNode( in string aXmlFileName ) ;
+
+ /*! Creates a "MacroNode" node which corresponds to a Graph with a Graph
+ */
+ SUPERV::Graph GraphMNode( in Graph aGraph ) ;
+
+ /*! Returns a Graph of a "MacroNode" or a "MacroNode" of a Graph
+ */
+ SUPERV::Graph FlowObjRef() ;
+
+ /*! Returns a StreamGraph of a "MacroNode" or a "MacroNode" of a StreamGraph
+ */
+ SUPERV::StreamGraph StreamObjRef() ;
+
/*! Returns an existing node with a definite name.
\param aNodeName Name of the Node.
*/
Engines::Component ComponentRef( in string aComputerContainer ,
in string aComponentName ) ;
-/*!
- Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
-*/
+ /*! Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
+ */
SUPERV::Link Link( in SUPERV::Port OutputPort ,
in SUPERV::Port InputPort ) ;
-/*!
-Imports a graph into a file with XML format
-\param anXmlFile String parameter defining the name of the XML file.
-\return True, if the graph has been successfully imported.
-*/
+ /*!
+ Give the last error[s] message[s]
+ \return string[s] corresponding to last error[s].
+ */
+ string Messages() ;
+
+ /*!
+ Imports a graph into a file with XML format
+ \param anXmlFile String parameter defining the name of the XML file.
+ \return True, if the graph has been successfully imported.
+ */
boolean Import( in string anXmlFile ) ;
-/*!
-Exports a graph from a file with XML format
-\param anXmlFile String parameter defining the name of the XML file.
-\return True, if the graph has been successfully imported.
-*/
+
+ /*!
+ Exports a graph to a file with XML format
+ \param anXmlFile String parameter defining the name of the XML file.
+ \return True, if the graph has been successfully exported.
+ */
boolean Export( in string anXmlFile ) ;
-/*!
-Returns True if the graph is read Only.
-*/
+
+ /*!
+ Exports a graph to a string in python format
+ */
+ string SavePY( in boolean importSuperV ) ;
+
+ /*!
+ Returns True if the graph is read Only.
+ */
boolean IsReadOnly() ;
-/*!
- Starts asynchronous execution of the graph.
-*/
+ /*!
+ Starts asynchronous execution of the graph.
+ */
boolean Run() ;
-/*!
- Assigns to the %Node an %Event and a %State of the %Node, if the Event is
- available. And returns immediately Nil, NoEvent and NoState if not.
- Returns false if the graph is finished, suspended, killed or stopped.
-\param aNode %Node for which this method is called
-\param anEvent An operation, which has been performed on this node(graph).
-\param aState Current state of the graph
-*/
+ /*!
+ Assigns to the %Node an %Event and a %State of the %Node, if the Event is
+ available. And returns immediately Nil, NoEvent and NoState if not.
+ Returns false if the graph is finished, suspended, killed or stopped.
+ \param aNode %Node for which this method is called
+ \param anEvent An operation, which has been performed on this node(graph).
+ \param aState Current state of the graph
+ */
boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
out SUPERV::GraphState aState ) ;
-/*!
- Assigns to the %Node an %Event and a %State of the %Node, if the Event is
- available. Waits if it is not available at the current moment.
- Returns false if the graph is finished, suspended, killed or stopped.
-\param aNode %Node for which this method is called
-\param anEvent An operation, which has been performed on this node(graph).
-\param aState Current state of the graph
-*/
+ /*!
+ Assigns to the %Node an %Event and a %State of the %Node, if the Event is
+ available. Waits if it is not available at the current moment.
+ Returns false if the graph is finished, suspended, killed or stopped.
+ \param aNode %Node for which this method is called
+ \param anEvent An operation, which has been performed on this node(graph).
+ \param aState Current state of the graph
+ */
boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
out SUPERV::GraphState aState ) ;
-
+
// Same as Event but execution of the thread is suspended between the
// return of EventW and the next call to EventW
-/*!
- Assigns to the %Node an %Event and a %State of the %Node, if the Event is
- available. And returns immediately Nil, NoEvent and NoState if not.
- Returns false if the graph is finished, suspended, killed or stopped.
-\note <BR>Execution of the thread is suspended between the return of this
-method and its next usage.
-\param aNode %Node for which this method is called
-\param anEvent An operation, which has been performed on this node(graph).
-\param aState Current state of the graph
-*/
+ /*!
+ Assigns to the %Node an %Event and a %State of the %Node, if the Event is
+ available. And returns immediately Nil, NoEvent and NoState if not.
+ Returns false if the graph is finished, suspended, killed or stopped.
+ \note <BR>Execution of the thread is suspended between the return of this
+ method and its next usage.
+ \param aNode %Node for which this method is called
+ \param anEvent An operation, which has been performed on this node(graph).
+ \param aState Current state of the graph
+ */
boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
out SUPERV::GraphState aState ) ;
-/*! \name Methods used for inner debugging purposes of threads management :
-*/
-/*@{*/
-
+ /*! \name Methods used for inner debugging purposes of threads management :
+ */
+ /*@{*/
+
long EventQSize() ;
long LevelMax() ;
SUPERV::ListOfNodes LevelNodes( in long aLevel ) ;
long ThreadsMax() ;
+
+ /*@}*/
-/*@}*/
-
-/*!
-Returns the number of currently running threads.
-*/
+ /*!
+ Returns the number of currently running threads.
+ */
long Threads();
-/*!
-Returns the number of suspended threads.
-*/
+ /*!
+ Returns the number of suspended threads.
+ */
long SuspendedThreads();
-/*!
-Returns True if the graph is valid.
-*/
+ /*!
+ Returns True if the graph is valid.
+ */
boolean IsValid() ;
-/*!
-Returns True if the graph can be executed.
-*/
+ /*!
+ Returns True if the graph can be executed.
+ */
boolean IsExecutable() ;
-/*!
-Returns True if the graph is being currently edited.
-*/
+ /*!
+ Returns True if the graph is being currently edited.
+ */
boolean IsEditing() ;
-/*!
-Returns True if the graph is being currently executed.
-*/
+ /*!
+ Returns True if the graph is being currently executed.
+ */
boolean IsExecuting() ;
-
+
long LastLevelDone() ;
-
-/*!
- Launches step-by-step execution of the graph.
-\note The execution is suspended immediatly after performance of operations of the first node and
-user can specify the nodes, where execution will be again suspended after its resuming.
-*/
+
+ /*!
+ Launches step-by-step execution of the graph.
+ \note The execution is suspended immediatly after performance of operations of the first node and
+ user can specify the nodes, where execution will be again suspended after its resuming.
+ */
boolean Start() ;
-/*!
-Allows to copy one graph into another.
-*/
+ /*!
+ Allows to copy one graph into another.
+ */
SUPERV::Graph Copy() ;
-/*!
-Convert a FlowGraph to a StreamGraph.
-*/
+ /*!
+ Convert a FlowGraph to a StreamGraph.
+ */
SUPERV::StreamGraph ToStreamGraph() ;
-/*!
-Merges two graphs
-*/
+ /*!
+ Merges two graphs
+ */
boolean Merge( in Graph aGraph ) ;
-/*!
-Returns a list of nodes of the graph.
-*/
+ /*!
+ Returns a list of nodes of the graph.
+ */
SUPERV::ListOfNodes Nodes() ;
-/*!
-Returns a list of links of the graph.
-*/
+ /*!
+ Returns a list of links of the graph.
+ */
SUPERV::ListOfLinks GLinks() ;
-/*!
-Gets IOR of the garph.
-*/
+ /*!
+ Gets IOR of the garph.
+ */
string getIOR();
-
-/*!
-Returns the number of independent subgraphs
-*/
+
+ /*!
+ Returns the number of independent subgraphs
+ */
long SubGraphsNumber() ;
-/*!
-Returns a list of Nodes of a SubGraph.
-*/
+ /*!
+ Returns a list of Nodes of a SubGraph.
+ */
SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ;
+ /*! Forces use of Editor's data model and destroy of Executor
+ */
+ void Editing();
+
} ;
Allows to copy one graph into another.
*/
SUPERV::StreamGraph StreamCopy() ;
+ /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a xml file
+ */
+ SUPERV::StreamGraph StreamMNode( in string aXmlFileName ) ;
+
+ /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a Graph
+ */
+ SUPERV::StreamGraph StreamGraphMNode( in StreamGraph aStreamGraph ) ;
+
/*!
Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
*/
// void Destroy() ;
+ /*! Checks if the types of Ports that it connects are compatible
+ */
+ boolean IsValid();
+
+ /*! Check if the Link equals to the another given Link
+ */
+ boolean IsEqual( in SUPERV::Link aLink );
+
} ;
*/
boolean IsDone() ;
+/*! deactivate the objref of a Port when its node is destroyed
+*/
+ void Remove() ;
+
} ;
////////////////////