1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // Author : Jean Rahuel
26 /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module
29 #ifndef __SUPERV_IDL__
30 #define __SUPERV_IDL__
32 #include "SALOME_ModuleCatalog.idl"
33 #include "SALOME_Component.idl"
34 #include "SALOMEDS.idl"
36 The main package of interfaces of %SUPERVISION module
41 This enumeration contains a set of elements defining the type of the port.
42 \note <BR>In general, ports represent <STRONG>input or output parameters</STRONG> of the functions,
43 implemented in different kinds of nodes of the graph.
45 enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter ,
46 InLineParameter , LoopParameter , SwitchParameter ,
47 EndSwitchParameter , GOTOParameter , DataStreamParameter } ;
50 This enumeration contains a set of dependencies of InPorts and OutPorts.
52 // enum KindOfDependency { UndefinedDependency , TimeDependency , IterationDependency } ;
55 This enumeration contains a set of schemas of InPorts.
57 enum KindOfSchema { SCHENULL , TI , TF , DELTA } ;
60 This enumeration contains a set of interpolations of InPorts.
62 enum KindOfInterpolation { INTERNULL , L0 , L1 } ;
65 This enumeration contains a set of extrapolations of InPorts.
67 enum KindOfExtrapolation { EXTRANULL , E0 , E1 } ;
70 This enumeration contains a set of dependencies of Ports.
72 enum KindOfDataStreamTrace { WithoutTrace , SummaryTrace , DetailedTrace } ;
75 This enumeration contains a set of elements defining the type of the node.
77 enum KindOfNode { FactoryNode , DataFlowGraph , ComputingNode ,
78 InLineNode , LoopNode , EndLoopNode ,
79 SwitchNode , EndSwitchNode , GOTONode , DataStreamGraph ,
83 This struct contains fields defining the date.
94 This enumeration contains a set of elements defining the type of operation, which has been performed
98 enum GraphEvent { UndefinedEvent , NoEvent , NewThreadEvent ,
99 WaitingEvent , ReadyEvent ,
100 RunningEvent , DoneEvent , ErroredEvent ,
101 SuspendEvent , ResumeEvent ,
102 KillEvent , StopEvent ,
103 ReRunEvent , ReStartEvent } ;
105 // UndefinedState : Non existing Node, Port etc...
107 This enumeration contains a set of elements defining the current state of the node(graph).
110 enum GraphState { UndefinedState , NoState , EditingState , SuspendState ,
111 WaitingState , ReadyState , SuspendReadyState ,
113 DoneState , ErrorState ,
114 SuspendDoneState , SuspendErroredState ,
115 KillState , StopState ,
116 ReRunState , ReStartState ,
117 NumberOfGraphStates } ;
119 /*! A sequence of string values.
121 typedef sequence<string> ListOfStrings ;
126 interface StreamLink ;
128 typedef sequence<Link> ListOfLinks ;
129 typedef sequence<StreamLink> ListOfStreamLinks ;
132 interface StreamPort ;
134 typedef sequence<Port> ListOfPorts ;
135 typedef sequence<StreamPort> ListOfStreamPorts ;
145 interface StreamGraph ;
148 typedef sequence<CNode> ListOfCNodes ;
149 typedef sequence<FNode> ListOfFNodes ;
150 typedef sequence<INode> ListOfINodes ;
151 typedef sequence<GNode> ListOfGNodes ;
152 typedef sequence<LNode> ListOfLNodes ;
153 typedef sequence<ELNode> ListOfELNodes ;
154 typedef sequence<SNode> ListOfSNodes ;
155 typedef sequence<ESNode> ListOfESNodes ;
156 typedef sequence<Graph> ListOfGraphs ;
159 This struct contains fields defining different types of nodes.
163 ListOfCNodes CNodes ;
164 ListOfFNodes FNodes ;
165 ListOfINodes INodes ;
166 ListOfGNodes GNodes ;
167 ListOfLNodes LNodes ;
168 ListOfELNodes ELNodes ;
169 ListOfSNodes SNodes ;
170 ListOfESNodes ESNodes ;
171 ListOfGraphs Graphs ;
174 // ToSuspendState : will be Suspended before running if waiting or
175 // will be Suspended while running or
176 // will be Suspended after run
177 // ToSuspendStartState : will be Suspended at the beginning of execution
178 // ToSuspendDoneState : will be Suspended after run
180 This enumeration contains a set of elements defining the %ControlState of the node.
181 The %ControlState gives a possibility to determine the "control actions" which have been done by
182 the user (Suspend, SuspendDone, Kill, etc...).
184 enum ControlState { VoidState , ToSuspendStartState ,
185 ToSuspendState , ToSuspendDoneState ,
186 ToKillState , ToKillDoneState , ToStopState ,
187 NumberOfControlStates } ;
189 The AutomatonState is an internal state of the automaton of the Executor
190 of the %Supervision %Engine. It is used for inner debugging purposes only.
193 enum AutomatonState { UnKnownState ,
198 SuspendedReadyToResumeState ,
203 SuspendedExecutingState ,
204 ResumedExecutingState ,
205 KilledExecutingState ,
206 StoppedExecutingState ,
207 SuccessedExecutingState ,
208 ErroredExecutingState ,
209 SuspendedSuccessedState ,
210 SuspendedErroredState,
211 ResumedSuccessedState ,
212 ResumedErroredState ,
213 KilledSuccessedState ,
215 StoppedSuccessedState ,
216 StoppedErroredState ,
222 SuspendedSuccessedToReStartState ,
223 SuspendedErroredToReStartState ,
226 NumberOfAutomatonStates
237 /*! \brief interface %SuperG
239 This interface contains a set of methods necessary for management of a %graph.
241 interface SuperG : Engines::Component, SALOMEDS::Driver {
244 Constructs a graph with possibility to read/edit it
245 \param aGraph %aGraphName or %aGraphXmlFile
247 SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile
250 Constructs a read Only graph ( for execution ).
251 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
252 of container names and input data.
253 \param aGraph %aGraphName or %aGraphXmlFile
255 SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
258 Constructs a StreamGraph with possibility to read/edit it
259 \param aGraph %aGraphName or %aGraphXmlFile
261 SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile
264 Constructs a read Only StreamGraph ( for execution ).
265 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
266 of container names and input data.
267 \param aGraph %aGraphName or %aGraphXmlFile
269 SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
272 Creates a value of <b>string</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
273 \param aString Input value of string type.
275 SUPERV::Value StringValue( in string aString ) ;
277 Creates a value of <b>any</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
278 \param anAny Input value of any type.
280 SUPERV::Value AnyValue( in any anAny ) ;
282 Gets a graph with a definite %IOR
283 \param ior String parameter defining %IOR of the graph.
285 SUPERV::Graph getGraph(in string ior); // get Graph from is IOR
288 Gets a graph with a definite %IOR
289 \param ior String parameter defining %IOR of the graph.
291 SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR
295 /*! \brief %CNode interface
297 This is a base class of the SUPERVISION module. It contains a set of methods allowing:
299 <li>creating a <b>Computation</b> node and setting its parameters (Name, Author, Comments etc.)
300 <li>checking the current state of the node in the data flow
301 <li>node execution follow-up
302 <li>management of the components, which can be initialized for execution of calculations in the data flow. (For that purpose %CNode class inherits the methods of the %Engines:Component class)
307 interface CNode : Engines::Component {
312 Returns the name of the node(graph).
316 Returns the service of this node .
318 SALOME_ModuleCatalog::Service Service() ;
320 Returns the type of the node.
322 SUPERV::KindOfNode Kind() ;
324 Returns the date of creation of the node(graph).
326 SUPERV::SDate CreationDate() ;
328 Returns the date of last update of the node(graph).
330 SUPERV::SDate LastUpdateDate() ;
332 Returns the name of the version of the node(graph).
336 Returns the name of the author of the node(graph).
340 Returns the string containing comments about this node(graph).
346 Sets the name of the node(graph).
347 \param aNewName String value defining the name of the node(graph).
348 \return True if the name has been updated.
350 boolean SetName(in string aNewName ) ;
352 Sets the name of the author. Returns True if it is updated.
353 \param anAuthor String value defining the name of the author.
354 \return True if the name has been updated.
356 boolean SetAuthor(in string anAuthor ) ;
358 Allows to update the comments about this node(graph).
359 \param aComment String value containing a comment to this node(graph).
360 \return True if the old comment has been updated.
362 boolean SetComment(in string aComment ) ;
365 Gets a port of the node (for compatibility : see GetInPort - GetOutPort).
367 SUPERV::Port Port( in string aParameterName ) ;
369 /*! Gets an Input port in a node.
370 \param aParameterName This value sets the name of the parameter which will be defined in this port.
372 SUPERV::Port GetInPort( in string aParameterName ) ;
374 /*! Gets an Output port in a node.
375 \param aParameterName This value sets the name of the parameter which will be defined in this port.
377 SUPERV::Port GetOutPort( in string aParameterName ) ;
379 /*! Gets an Input StreamPort in a node.
380 \param aParameterName This value sets the name of the parameter which will be defined in this port.
382 SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ;
384 /*! Gets an Output StreamPort in a node.
385 \param aParameterName This value sets the name of the parameter which will be defined in this port.
387 SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ;
390 Enters a value into an Input %Port
392 SUPERV::Port Input( in string InputParameterName ,
396 Gets a list of ports of the node(graph)
398 SUPERV::ListOfPorts Ports() ;
401 Gets a list of ports of the node(graph)
403 SUPERV::ListOfStreamPorts StreamPorts() ;
405 /*! Gets a list of links of a node(graph)
407 SUPERV::ListOfLinks Links() ;
409 /*! Gets a list of StreamLinks of a node(graph)
411 SUPERV::ListOfStreamLinks StreamLinks() ;
414 Returns True if this node is a graph.
415 \note <BR>A node of the graph can also represent in its turn another graph.
417 boolean IsStreamGraph() ;
419 Returns True if this node is a graph.
420 \note <BR>A node of the graph can also represent in its turn another graph.
424 Returns True if the node appears to be a %computing node.
426 boolean IsComputing() ;
428 Returns True if the node appears to be a %factory node.
430 boolean IsFactory() ;
432 Returns True if the node appears to be an %inline node.
436 Returns True if the node appears to be a %GOTO node.
440 Returns True if the node appears to be a %loop node.
444 Returns True if the node appears to be an %endloop node.
446 boolean IsEndLoop() ;
448 Returns True if the node appears to be a %switch node.
452 Returns True if the node appears to be a %endswitch node.
454 boolean IsEndSwitch() ;
457 Returns the numero of subgraph of a node.
461 Returns the numero of substreamgraph of a node.
463 long SubStreamGraph() ;
466 Returns the number of threads of the graph.
471 Returns True if the node(graph) is waiting for Data input
473 boolean IsWaiting() ;
476 Returns True if the node(graph) is ready for execution
481 Returns True if the node(graph) is currently running
483 boolean IsRunning() ;
486 Returns True if execution is finished
491 Returns True if execution is suspended
494 boolean IsSuspended() ;
496 Returns the current state of the graph.
498 SUPERV::GraphState State() ;
501 Waits for ready_to_run state, Suspend and return.
505 /*! Waits for running state, Suspend and return.
509 /*! Waits for done state, Suspend and return.
513 /*! Waits for Suspend state and return.
515 boolean SuspendedW() ;
521 If not running : will be killed when ready to run.
522 If running : kills immediatly.
528 Execution will be killed only just after running (only for nodes).
534 If not running : will be stopped when ready to run.
535 If running : stops immediatly
538 /*! Suspends execution.
540 If not running : will be Suspended when ready to run. It is used in step-by-step execution.
541 If running : suspends immediatly
544 /*! Suspends execution only just after running.
546 boolean SuspendDone();
548 /*! Resumes execution.
550 If Suspended : running will be continued.
551 If not Suspended : cancels the current ControlState ( Suspend, Kill, ...)
556 Restarts execution of the node.
560 Restarts execution of the graph beginning from a definite node.
562 boolean ReRunAt( in string aNodeName );
565 Restarts and suspends execution of the node(graph).
569 Restarts and suspends execution of the graph beginning from a definite node.
570 \param aNodeName String parameter defining the name of the node.
572 boolean ReStartAt( in string aNodeName );
575 Returns automaton execution state of the node(graph).
577 SUPERV::AutomatonState AutoState() ;
579 // Control state required : Kill, Suspend, Stop
581 Returns control state of the node(graph).
583 SUPERV::ControlState Control() ;
585 Clears the control state of the node(graph).
587 void ControlClear() ;
589 boolean ContainerKill();
591 Sets the position of the node in the window.
593 void Coords( in long X , in long Y ) ;
595 Returns the position of the node along X-axis.
599 Returns the position of the node along Y-axis.
603 Returns the Cpu used by a node for execution of calculations in seconds.
608 /*! \brief %FNode class
610 This class is necessary for management of factory nodes in a data flow. Besides the inherited methods it contains some methods allowing to define
611 the component from the container, which will be called for execution of the calculation.
614 interface FNode : CNode {
616 /*! Gets the name of the component, which will be called for execution of the calculation.
618 string GetComponentName() ;
619 /*! Gets the name of the interface of the component.
621 string GetInterfaceName() ;
622 /*! Gets the container containing the component, which will be called for execution of the calculation.
624 string GetContainer() ;
625 /*! Sets the name of the component, which will be called for execution of the calculation.
626 \param aComponentName Name of the component.
628 boolean SetComponentName(in string aComponentName ) ;
629 /*! Sets the name of the interface of the component.
630 \param anInterfaceName Name of the interface.
632 boolean SetInterfaceName(in string anInterfaceName ) ;
633 /*! Gets the container containing the component, which will be called for execution of the calculation.
634 \param aContainer Container containing the component.
636 boolean SetContainer(in string aContainer ) ;
638 /*! \brief %INode class
640 This class is necessary for management of inline nodes in a data flow. Besides the inherited methods it contains some methods allowing to set a Python function, which will be
641 executed for performing calculations, as well as input and output parameters for the node.
645 interface INode : CNode {
648 /*! Sets Python function for the InLine Node.
649 \param FuncName Name of the function
650 \param aPyInitFunction Python initialization function of the InLine Node
652 void SetPyFunction( in string FuncName ,
653 in SUPERV::ListOfStrings aPyInitFunction ) ;
654 /*! Returns Python function of the InLine Node.
656 SUPERV::ListOfStrings PyFunction() ;
657 /*! Returns the name of the Python function of the InLine Node.
659 string PyFuncName() ;
661 /*! Creates an Input port in a node.
662 \param aParameterName This value sets the name of the parameter which will be defined in this port.
663 \param aParameterType This value sets the type of the parameter which will be defined in this port.
665 SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ;
666 /*! Creates an Output port in an Inline node.
667 \param aParameterName This value sets the name of the parameter which will be defined in this port.
668 \param aParameterType This value sets the type of the parameter which will be defined in this port.
670 SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ;
672 /*! Creates an Input DataStreamPort in an Inline node.
673 \param aParameterName This value sets the name of the parameter which will be defined in this port.
674 \param aParameterType This value sets the type of the parameter which will be defined in this port.
676 SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
678 /*! Creates an Output DataStreamPort in an Inline node.
679 \param aParameterName This value sets the name of the parameter which will be defined in this port.
680 \param aParameterType This value sets the type of the parameter which will be defined in this port.
682 SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
685 /*! \brief %GNode class
687 This class is necessary for management of GOTO/EndLoop/EndSwitch nodes in the dataflow.
688 Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one.
690 // GOTO/EndLoop/EndSwitch Nodes
692 interface GNode : INode {
694 /*! Sets the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
696 boolean SetCoupled( in string anInLineNode ) ;
697 /*! Returns the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
699 SUPERV::INode Coupled() ;
701 /*! %Loop Nodes class
705 interface LNode : GNode {
707 /*! Sets Python Init function of the Loop Node.
708 \param InitName Name of the Init function
709 \param aPyInitFunction Python Init function
711 void SetPyInit( in string InitName ,
712 in SUPERV::ListOfStrings aPyInitFunction ) ;
713 /*! Returns Python Init function of the Loop Node.
715 SUPERV::ListOfStrings PyInit() ;
716 /*! Returns the name of the Python Init function of the Loop Node.
718 string PyInitName() ;
720 /*! Sets Python More function of the Loop Node.
721 \param MoreName Name of the More function
722 \param aPyMoreFunction Python More function
724 void SetPyMore( in string MoreName ,
725 in SUPERV::ListOfStrings aPyMoreFunction ) ;
726 /*! Returns Python More function of the Loop Node.
728 SUPERV::ListOfStrings PyMore() ;
729 /*! Returns the name of the Python More function of the Loop Node.
731 string PyMoreName() ;
733 /*! Sets Python Next function of the Loop Node.
734 \param NextName Name of the Next function
735 \param aPy NextFunction Python Next function
737 void SetPyNext( in string NextName ,
738 in SUPERV::ListOfStrings aPyNextFunction ) ;
740 /*! Returns Python Next function of the Loop Node.
742 SUPERV::ListOfStrings PyNext() ;
743 /*! Returns the name of the Python Next function of the Loop Node.
745 string PyNextName() ;
751 interface ELNode : GNode {
757 interface SNode : GNode {
763 interface ESNode : GNode {
767 /*! \brief Interface of a graph
769 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
773 interface Graph : INode {
776 /*! Creates a Computing Node in a Graph.
778 SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ;
780 /*! Creates a Factory Node in a Graph.
782 SUPERV::FNode FNode( in string aComponentName ,
783 in string anInterfaceName ,
784 in SALOME_ModuleCatalog::Service aService ) ;
786 /*! Creates an InLine Node in a Graph.
788 SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ;
790 /*! Creates a GOTO Node and links it to the corresponding InLine node.
792 SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction ,
793 in string anINode ) ;
795 /*! Creates a Loop Node ("for" or "while" loop) and links it to the corresponding end of loop node.
797 SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction ,
798 in string MoreName , in ListOfStrings MoreFunction ,
799 in string NextName , in ListOfStrings NextFunction ,
800 out SUPERV::INode anEndOfLoop ) ;
802 /*! Creates a conditional "if/elseif/else" or "switch" node and the corresponding end node
804 SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction ,
805 out SUPERV::INode anEndOfSwitch ) ;
807 /*! Returns an existing node with a definite name.
808 \param aNodeName Name of the Node.
810 SUPERV::CNode Node( in string aNodeName ) ;
812 /*! Creates a CORBA Component Object Reference
814 Engines::Component ComponentRef( in string aComputerContainer ,
815 in string aComponentName ) ;
818 Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
820 SUPERV::Link Link( in SUPERV::Port OutputPort ,
821 in SUPERV::Port InputPort ) ;
824 Imports a graph into a file with XML format
825 \param anXmlFile String parameter defining the name of the XML file.
826 \return True, if the graph has been successfully imported.
828 boolean Import( in string anXmlFile ) ;
830 Exports a graph from a file with XML format
831 \param anXmlFile String parameter defining the name of the XML file.
832 \return True, if the graph has been successfully imported.
834 boolean Export( in string anXmlFile ) ;
836 Returns True if the graph is read Only.
838 boolean IsReadOnly() ;
841 Starts asynchronous execution of the graph.
846 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
847 available. And returns immediately Nil, NoEvent and NoState if not.
848 Returns false if the graph is finished, suspended, killed or stopped.
849 \param aNode %Node for which this method is called
850 \param anEvent An operation, which has been performed on this node(graph).
851 \param aState Current state of the graph
853 boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
854 out SUPERV::GraphState aState ) ;
857 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
858 available. Waits if it is not available at the current moment.
859 Returns false if the graph is finished, suspended, killed or stopped.
860 \param aNode %Node for which this method is called
861 \param anEvent An operation, which has been performed on this node(graph).
862 \param aState Current state of the graph
864 boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
865 out SUPERV::GraphState aState ) ;
867 // Same as Event but execution of the thread is suspended between the
868 // return of EventW and the next call to EventW
870 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
871 available. And returns immediately Nil, NoEvent and NoState if not.
872 Returns false if the graph is finished, suspended, killed or stopped.
873 \note <BR>Execution of the thread is suspended between the return of this
874 method and its next usage.
875 \param aNode %Node for which this method is called
876 \param anEvent An operation, which has been performed on this node(graph).
877 \param aState Current state of the graph
879 boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
880 out SUPERV::GraphState aState ) ;
881 /*! \name Methods used for inner debugging purposes of threads management :
887 SUPERV::ListOfNodes LevelNodes( in long aLevel ) ;
893 Returns the number of currently running threads.
897 Returns the number of suspended threads.
899 long SuspendedThreads();
901 Returns True if the graph is valid.
905 Returns True if the graph can be executed.
907 boolean IsExecutable() ;
909 Returns True if the graph is being currently edited.
911 boolean IsEditing() ;
913 Returns True if the graph is being currently executed.
915 boolean IsExecuting() ;
917 long LastLevelDone() ;
920 Launches step-by-step execution of the graph.
921 \note The execution is suspended immediatly after performance of operations of the first node and
922 user can specify the nodes, where execution will be again suspended after its resuming.
926 Allows to copy one graph into another.
928 SUPERV::Graph Copy() ;
930 Convert a FlowGraph to a StreamGraph.
932 SUPERV::StreamGraph ToStreamGraph() ;
936 boolean Merge( in Graph aGraph ) ;
938 Returns a list of nodes of the graph.
940 SUPERV::ListOfNodes Nodes() ;
942 Returns a list of links of the graph.
944 SUPERV::ListOfLinks GLinks() ;
946 Gets IOR of the garph.
951 Returns the number of independent subgraphs
953 long SubGraphsNumber() ;
955 Returns a list of Nodes of a SubGraph.
957 SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ;
965 /*! \brief Interface of a StreamGraph
967 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
970 /////////////////////
971 interface StreamGraph : Graph {
972 /////////////////////
975 Allows to copy one graph into another.
977 SUPERV::StreamGraph StreamCopy() ;
979 Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
981 SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort ,
982 in SUPERV::StreamPort InputPort ) ;
985 Returns a list of links of the graph.
987 SUPERV::ListOfStreamLinks GStreamLinks() ;
988 boolean SetStreamParams( in long Timeout ,
989 in SUPERV::KindOfDataStreamTrace DataStreamTrace ,
990 in double DeltaTime ) ;
991 void StreamParams( out long Timeout ,
992 out SUPERV::KindOfDataStreamTrace DataStreamTrace ,
993 out double DeltaTime ) ;
996 Returns the number of independent subStreamgraphs
998 long SubStreamGraphsNumber() ;
1000 Returns a list of Nodes of a SubStreamGraph.
1002 SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ;
1005 Convert a StreamGraph to a FlowGraph.
1007 SUPERV::Graph ToFlowGraph() ;
1010 Merge a StreamGraph.
1012 boolean StreamMerge( in StreamGraph aStreamGraph ) ;
1021 /*! \brief Interface of the %link
1023 This interface contains a set of methods used for representation and management of the links
1024 connecting nodes in a %graph.
1028 interface Link : Engines::Component {
1031 Returns the %Output %Port of the Link
1033 SUPERV::Port OutPort() ;
1036 Returns the %Input %Port of the Link
1038 SUPERV::Port InPort() ;
1041 /*! \name Methods used for representation of links in GUI of %SALOME application :
1045 Returns the number of coordinate points which are included in the link.
1046 \note <BR>Every link can contain a set of coordinate points which constitute it. These points have
1047 index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of
1048 the points starts from input port to output port of the corresponding link.
1052 Adds a coordinate point to the link.
1053 \param index Index of the point.
1054 \param X Coordinates of the point.
1055 \param Y Coordinates of the point.
1057 boolean AddCoord( in long index , in long X , in long Y ) ;
1059 Changes the location of a definite coordinate point of the link.
1060 \param index Index of the point.
1061 \param X Coordinates of the point.
1062 \param Y Coordinates of the point.
1065 boolean ChangeCoord( in long index , in long X , in long Y ) ;
1067 Removes a coordinate point of the link.
1068 \param index Index of the point.
1071 boolean RemoveCoord( in long index ) ;
1074 Sets the location of a coordinate point of the link.
1075 \param index Index of the point.
1076 \param X Coordinates of the point.
1077 \param Y Coordinates of the point.
1080 boolean Coords( in long index , out long X , out long Y ) ;
1092 /*! \brief Interface of the %link
1094 This interface contains a set of methods used for representation and management of the links
1095 connecting nodes in a %graph.
1098 ////////////////////
1099 interface StreamLink : Link {
1100 ////////////////////
1102 Returns the %Output %StreamPort of the StreamLink
1104 SUPERV::StreamPort OutStreamPort() ;
1107 Returns the %Input %StreamPort of the StreamLink
1109 SUPERV::StreamPort InStreamPort() ;
1118 /*! \brief %Value interface
1120 This interface contains a set of methods used for setting initial parameters of the ports
1124 interface Value : Engines::Component {
1127 Converts the given value into a value of string type.
1131 Converts the given value into a value of independant data type.
1135 Returns True if the value represents an IOR.
1139 Gets data type of the component.
1141 string ComponentDataType() ;
1146 /*! \brief %Port interface
1148 This interface contains a set of methods used for management of the ports.
1152 interface Port : Value {
1156 Gives a value to an Input %Port
1157 \param aValue This parameter defines the input value
1159 boolean Input( in SUPERV::Value aValue ) ;
1162 Returns the node of the port
1164 SUPERV::CNode Node() ;
1166 Sets the name of the port.
1170 /* Gets the type of a port.
1171 \return A string defining the type of a port
1176 // Link of an Input Port
1178 Returns the link of an %Input %Port
1180 SUPERV::Link Link() ;
1183 Returns a list of links of an Input %Port of an EndSwitchNode
1185 SUPERV::ListOfLinks Links() ;
1188 Returns True if this port appears to be an %Input %Port of a Node
1193 Returns True if an %Input %Value exists for that %Input %Port (without link)
1195 boolean HasInput() ;
1198 Returns True if the %Port is linked (without value)
1200 // Port with link (without Value)
1201 boolean IsLinked() ;
1204 /*! Returns the type of this port.
1206 SUPERV::KindOfPort Kind() ;
1208 // Port from the service of the node
1210 Returns True if the %Port is a parameter of a service
1213 // Port is a Gate of the node
1215 Returns True if the %Port appears to be a Gate Port of the Node
1218 // Port is a parameter of an InLineNode
1220 Returns True if the %Port appears to be a parameter of an InLine Node.
1222 boolean IsInLine() ;
1224 // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode
1226 Returns True if the %Port appears to be a Loop Parameter (InitLoop or DoLoop) of a Loop Node
1229 // Port is an output parameter of a SwitchNode connected to an InGate
1231 Returns True if the %Port appears to be a parameter of a switch node
1233 // Port is a parameter of a switch node
1234 boolean IsSwitch() ;
1235 // Port is an Input parameter of a EndSwitchNode connected to several output ports
1237 Returns True if the %Port appears to be an EndSwitch Node connected to several output ports.
1239 boolean IsEndSwitch() ;
1241 boolean IsDataStream() ;
1243 /*! Returns the current state of the port.
1245 SUPERV::GraphState State() ;
1246 /*! Returns True if computation is finished.
1252 ////////////////////
1253 interface StreamPort : Port {
1254 ////////////////////
1256 // Link of a StreamPort
1258 Returns the link of a %StreamPort
1260 SUPERV::StreamLink StreamLink() ;
1262 /*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency
1264 SALOME_ModuleCatalog::DataStreamDependency Dependency() ;
1265 boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
1267 /*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort
1269 boolean SetParams( in KindOfSchema aKindOfSchema ,
1270 in KindOfInterpolation aKindOfInterpolation ,
1271 in KindOfExtrapolation aKindOfExtrapolation ) ;
1272 boolean Params( out KindOfSchema aKindOfSchema ,
1273 out KindOfInterpolation aKindOfInterpolation ,
1274 out KindOfExtrapolation aKindOfExtrapolation ) ;
1276 /*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort
1278 boolean SetNumberOfValues( in long aNumberOfValues ) ;
1279 long NumberOfValues() ;