X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=idl%2FSUPERV.idl;h=80ef176f698746e9c7dd6a42de19499ad57348df;hb=ca72ab8f2c85d9801744a1ad152e4619b710c3c0;hp=b78f1e40abe07a7e5e02dd2f127dd9bdc8c8c477;hpb=c472be64ad2486a50e224af7c02e34eefaca9304;p=modules%2Fsuperv.git diff --git a/idl/SUPERV.idl b/idl/SUPERV.idl index b78f1e4..80ef176 100644 --- a/idl/SUPERV.idl +++ b/idl/SUPERV.idl @@ -1,27 +1,27 @@ // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : SUPERV.idl // Author : Jean Rahuel -// $Header: +// $Header: /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module */ @@ -32,26 +32,66 @@ #include "SALOME_ModuleCatalog.idl" #include "SALOME_Component.idl" #include "SALOMEDS.idl" -/*! +/*! The main package of interfaces of %SUPERVISION module */ module SUPERV { /*! This enumeration contains a set of elements defining the type of the port. -\note
In general, ports represent input or output parameters of the functions, +\note
In general, ports represent input or output parameters of the functions, implemented in different kinds of nodes of the graph. */ - enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter , - InLineParameter , LoopParameter , SwitchParameter , - EndSwitchParameter , GOTOParameter } ; + enum KindOfPort { UndefinedParameter , + ServiceParameter , + GateParameter , + InLineParameter , + LoopParameter , + SwitchParameter , + EndSwitchParameter , + GOTOParameter , + DataStreamParameter } ; + +/*! +This enumeration contains a set of dependencies of InPorts and OutPorts. +*/ +// enum KindOfDependency { UndefinedDependency , TimeDependency , IterationDependency } ; + +/*! +This enumeration contains a set of schemas of InPorts. +*/ + enum KindOfSchema { SCHENULL , TI , TF , DELTA } ; + +/*! +This enumeration contains a set of interpolations of InPorts. +*/ + enum KindOfInterpolation { INTERNULL , L0 , L1 } ; + +/*! +This enumeration contains a set of extrapolations of InPorts. +*/ + enum KindOfExtrapolation { EXTRANULL , E0 , E1 } ; + +/*! +This enumeration contains a set of dependencies of Ports. +*/ + enum KindOfDataStreamTrace { WithoutTrace , SummaryTrace , DetailedTrace } ; /*! This enumeration contains a set of elements defining the type of the node. */ - enum KindOfNode { FactoryNode , DataFlowNode , ComputingNode , - InLineNode , LoopNode , EndLoopNode , - SwitchNode , EndSwitchNode , GOTONode , UnknownNode }; + enum KindOfNode { FactoryNode , + DataFlowGraph , + ComputingNode , + InLineNode , + LoopNode , + EndLoopNode , + SwitchNode , + EndSwitchNode , + GOTONode , + DataStreamGraph , + MacroNode , + UnknownNode }; /*! This struct contains fields defining the date. @@ -65,42 +105,62 @@ This struct contains fields defining the date. short Year; }; /*! -This enumeration contains a set of elements defining the type of operation, which has been performed +This enumeration contains a set of elements defining the type of operation, which has been performed 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. +*/ typedef sequence ListOfStrings ; interface Value ; interface Link ; + interface StreamLink ; typedef sequence ListOfLinks ; + typedef sequence ListOfStreamLinks ; interface Port ; + interface StreamPort ; typedef sequence ListOfPorts ; + typedef sequence ListOfStreamPorts ; interface CNode ; interface FNode ; @@ -110,6 +170,9 @@ This enumeration contains a set of elements defining the current state of the no interface ELNode ; interface SNode ; interface ESNode ; + interface Graph ; + interface StreamGraph ; + typedef sequence ListOfCNodes ; typedef sequence ListOfFNodes ; typedef sequence ListOfINodes ; @@ -118,6 +181,11 @@ This enumeration contains a set of elements defining the current state of the no typedef sequence ListOfELNodes ; typedef sequence ListOfSNodes ; typedef sequence ListOfESNodes ; + typedef sequence ListOfGraphs ; + +/*! +This struct contains fields defining different types of nodes. +*/ struct ListOfNodes { ListOfCNodes CNodes ; @@ -128,71 +196,27 @@ This enumeration contains a set of elements defining the current state of the no ListOfELNodes ELNodes ; ListOfSNodes SNodes ; ListOfESNodes ESNodes ; + ListOfGraphs Graphs ; } ; - interface Graph ; - - typedef sequence ListOfGraphs ; - // ToSuspendState : will be Suspended before running if waiting or // will be Suspended while running or // will be Suspended after run // ToSuspendStartState : will be Suspended at the beginning of execution // ToSuspendDoneState : will be Suspended after run /*! -This enumeration contains a set of elements defining the %ControlState of the node. +This enumeration contains a set of elements defining the %ControlState of the node. 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 - } ; - - - - - @@ -203,13 +227,19 @@ This interface contains a set of methods necessary for management of a %graph. */ 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::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile -/*! +/*! Constructs a read Only graph ( for execution ). \note
In this graph there is also a possibility to update nodes, coordinates of the links, of container names and input data. @@ -217,224 +247,339 @@ This interface contains a set of methods necessary for management of a %graph. */ SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile -/*! -Creates a value for %Input method in interface %Node. +/*! + Constructs a StreamGraph with possibility to read/edit it + \param aGraph %aGraphName or %aGraphXmlFile +*/ + SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile + +/*! + Constructs a read Only StreamGraph ( for execution ). + \note
In this graph there is also a possibility to update nodes, coordinates of the links, + of container names and input data. + \param aGraph %aGraphName or %aGraphXmlFile +*/ + SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile + +/*! +Creates a value of string type which will be used for Input method in the interface %Node. +\param aString Input value of string type. */ SUPERV::Value StringValue( in string aString ) ; +/*! +Creates a value of any type which will be used for Input method in the interface %Node. +\param anAny Input value of any type. +*/ SUPERV::Value AnyValue( in any anAny ) ; /*! - Gets a graph from its %IOR + Gets a graph with a definite %IOR +\param ior String parameter defining %IOR of the graph. */ SUPERV::Graph getGraph(in string ior); // get Graph from is IOR +/*! + Gets a graph with a definite %IOR +\param ior String parameter defining %IOR of the graph. +*/ + SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR +/*! +Returns a duplicate of the object (omniORB4 problem). +*/ + Object ToObject( in Object anObject ) ; + }; -/*! \brief Interface of a node +/*! \brief %CNode interface -This interface includes a set of methods used for management of the nodes in the graph. -*/ +This is a base class of the SUPERVISION module. It contains a set of methods allowing: +
    +
  • creating a Computation node and setting its parameters (Name, Author, Comments etc.) +
  • checking the current state of the node in the data flow +
  • node execution follow-up +
  • 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) +
+*/ ////////////// interface CNode : Engines::Component { ////////////// -/*! +/*! Returns the name of the node(graph). */ string Name() ; -/*! +/*! Returns the service of this node . */ SALOME_ModuleCatalog::Service Service() ; -/*! +/*! Returns the type of the node. */ SUPERV::KindOfNode Kind() ; -/*! +/*! Returns the date of creation of the node(graph). -*/ +*/ SUPERV::SDate CreationDate() ; -/*! +/*! Returns the date of last update of the node(graph). */ SUPERV::SDate LastUpdateDate() ; -/*! +/*! Returns the name of the version of the node(graph). */ string Version() ; -/*! +/*! Returns the name of the author of the node(graph). */ string Author() ; -/*! +/*! Returns the string containing comments about this node(graph). */ string Comment() ; - -/*! -Sets the name of the node(graph). Returns True if it is updated. + +/*! +Sets the name of the node(graph). +\param aNewName String value defining the name of the node(graph). +\return True if the name has been updated. */ boolean SetName(in string aNewName ) ; -/*! -Sets the name of the author. Returns True if it is updated. +/*! +Sets the name of the author. Returns True if it is updated. +\param anAuthor String value defining the name of the author. +\return True if the name has been updated. */ boolean SetAuthor(in string anAuthor ) ; /*! Allows to update the comments about this node(graph). -*/ +\param aComment String value containing a comment to this node(graph). +\return True if the old comment has been updated. +*/ boolean SetComment(in string aComment ) ; /*! - Gets a port of the node. -*/ + Gets a port of the node (for compatibility : see GetInPort - GetOutPort). +*/ SUPERV::Port Port( in string aParameterName ) ; +/*! Gets an Input port in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::Port GetInPort( in string aParameterName ) ; + +/*! Gets an Output port in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::Port GetOutPort( in string aParameterName ) ; + +/*! Gets an Input StreamPort in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ; + +/*! Gets an Output StreamPort in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ; + +/*! + Returns true if a Node (or Graph) has StreamPorts +*/ + boolean HasStreamPort() ; + /*! Enters a value into an Input %Port -*/ +*/ SUPERV::Port Input( in string InputParameterName , in Value aValue ) ; - - // Create an Input %Port and an Output Port in LabelNode or ControlNode - // boolean BusPort( in string InOutParameterName , - // in string InOutParameterType , - // out SUPERV::Port InputPort , - // out SUPERV::Port OutputPort ) ; - // boolean BusPorts( in string InputParameterName , - // in string InputParameterType , - // in string OutputParameterName , - // in string OutputParameterType , - // out SUPERV::Port InputPort , - // out SUPERV::Port OutputPort ) ; - -/*! +/*! Gets a list of ports of the node(graph) */ SUPERV::ListOfPorts Ports() ; - // Get list of Links +/*! + Gets a list of ports of the node(graph) +*/ + SUPERV::ListOfStreamPorts StreamPorts() ; + +/*! Gets a list of links of a node(graph) +*/ SUPERV::ListOfLinks Links() ; +/*! Gets a list of StreamLinks of a node(graph) +*/ + SUPERV::ListOfStreamLinks StreamLinks() ; + +/*! +Returns True if this node is a graph. +*/ + boolean IsStreamGraph() ; /*! -Returns True if this node is a graph. -\note
A node of the graph can also represent in its turn another graph. +Returns True if this node is a 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 IsComputing() ; +/*! +Returns True if the node appears to be a %factory node. +*/ boolean IsFactory() ; +/*! +Returns True if the node appears to be an %inline node. +*/ boolean IsInLine() ; +/*! +Returns True if the node appears to be a %GOTO node. +*/ boolean IsGOTO() ; +/*! +Returns True if the node appears to be a %loop node. +*/ boolean IsLoop() ; +/*! +Returns True if the node appears to be an %endloop node. +*/ boolean IsEndLoop() ; +/*! +Returns True if the node appears to be a %switch node. +*/ boolean IsSwitch() ; +/*! +Returns True if the node appears to be a %endswitch node. +*/ boolean IsEndSwitch() ; -/*! - Returns the number of SubGraphs +/*! + Returns the numero of subgraph of a node. */ long SubGraph() ; +/*! + Returns the numero of substreamgraph of a node. +*/ + long SubStreamGraph() ; -/*! -Returns nuber of threads. +/*! +Returns the number of threads of the graph. */ long Thread() ; -/*! +/*! Returns True if the node(graph) is waiting for Data input */ boolean IsWaiting() ; -/*! +/*! Returns True if the node(graph) is ready for execution */ boolean IsReady() ; - /*! - Returns True if the node(graph) is running +/*! + Returns True if the node(graph) is currently running */ boolean IsRunning() ; -/*! - Returns True if execution is finished +/*! + Returns True if execution is finished */ - + boolean IsDone() ; -/*! +/*! Returns True if execution is suspended */ - + boolean IsSuspended() ; /*! Returns the current state of the graph. */ SUPERV::GraphState State() ; - // wait for ready_to_run state, Suspend and return +/*! + Waits for ready_to_run state, Suspend and return. +*/ boolean ReadyW() ; - // wait for running state, Suspend and return +/*! Waits for running state, Suspend and return. +*/ boolean RunningW() ; - // wait for done state, Suspend and return +/*! Waits for done state, Suspend and return. +*/ boolean DoneW() ; - // wait for Suspend state and return +/*! Waits for Suspend state and return. +*/ boolean SuspendedW() ; // boolean Ping(); - // if not running : will be killed when ready to run - // if running : Kill immediatly +/*! Kills execution. +
+If not running : will be killed when ready to run. +If running : kills immediatly. +*/ boolean Kill(); - // will be killed only just after running (only for nodes) +/*! Kills execution. +
+Execution will be killed only just after running (only for nodes). +*/ boolean KillDone(); - // if not running : will be stopped when ready to run - // if running : Stop immediatly +/*! Stops execution. +
+If not running : will be stopped when ready to run. +If running : stops immediatly +*/ boolean Stop(); - - // if not running : will be Suspended when ready to run - // if running : Suspend immediatly +/*! Suspends execution. +
+If not running : will be Suspended when ready to run. It is used in step-by-step execution. +If running : suspends immediatly +*/ boolean Suspend(); - - // will be Suspended only just after running +/*! Suspends execution only just after running. +*/ boolean SuspendDone(); - // if Suspended : running will continue - // if not Suspended : cancel current ControlState ( Suspend, Kill, ...) - boolean Resume(); - -/*! - Restarts execution of the node. -*/ - boolean ReRun(); -/*! -Restarts execution of the graph beginning from a definite node. +/*! Resumes execution. +
+If Suspended : running will be continued. +If not Suspended : cancels the current ControlState ( Suspend, Kill, ...) */ - boolean ReRunAt( in string aNodeName ); + boolean Resume(); -/*! - Restarts and suspends execution of the node(graph). -*/ - boolean ReStart(); -/*! -Restarts and suspends execution of the graph beginning from a defined node. -*/ - boolean ReStartAt( in string aNodeName ); +// Control state required : Kill, Suspend, Stop /*! - Returns automaton execution state of the node(graph). + Returns control state of the node(graph). */ - SUPERV::AutomatonState AutoState() ; - - // Control state required : Kill, Suspend, Stop SUPERV::ControlState Control() ; /*! Clears the control state of the node(graph). @@ -442,79 +587,162 @@ Clears the control state of the node(graph). void ControlClear() ; boolean ContainerKill(); -/*! + +/*! Sets the position of the node in the window. */ void Coords( in long X , in long Y ) ; -/*! +/*! Returns the position of the node along X-axis. */ long X() ; -/*! +/*! Returns the position of the node along Y-axis. */ long Y() ; -/*! -Returns the Cpu used by a node in seconds. +/*! +Returns the Cpu used by a node for execution of calculations in seconds. */ long CpuUsed() ; } ; +/*! \brief %FNode class +This class is necessary for management of factory nodes in a data flow. Besides the inherited methods it contains some methods allowing to define +the component from the container, which will be called for execution of the calculation. +*/ ////////////// interface FNode : CNode { ////////////// - +/*! Gets the name of the component, which will be called for execution of the calculation. +*/ string GetComponentName() ; +/*! Gets the name of the interface of the component. +*/ string GetInterfaceName() ; +/*! Gets the container containing the component, which will be called for execution of the calculation. +*/ string GetContainer() ; +/*! Sets the name of the component, which will be called for execution of the calculation. +\param aComponentName Name of the component. +*/ boolean SetComponentName(in string aComponentName ) ; +/*! Sets the name of the interface of the component. +\param anInterfaceName Name of the interface. +*/ boolean SetInterfaceName(in string anInterfaceName ) ; +/*! Gets the container containing the component, which will be called for execution of the calculation. +\param aContainer Container containing the component. +*/ boolean SetContainer(in string aContainer ) ; } ; +/*! \brief %INode class +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 +executed for performing calculations, as well as input and output parameters for the node. +*/ // InLine Nodes ////////////// interface INode : CNode { ////////////// +/*! Sets Python function for the InLine Node. +\param FuncName Name of the function +\param aPyInitFunction Python initialization function of the InLine Node +*/ void SetPyFunction( in string FuncName , in SUPERV::ListOfStrings aPyInitFunction ) ; +/*! Returns Python function of the InLine Node. +*/ SUPERV::ListOfStrings PyFunction() ; +/*! Returns the name of the Python function of the InLine Node. +*/ string PyFuncName() ; - // Create Input/Output Port in InLineNodes +/*! Creates an Input port in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +\param aParameterType This value sets the type of the parameter which will be defined in this port. +*/ SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ; +/*! Creates an Output port in an Inline node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +\param aParameterType This value sets the type of the parameter which will be defined in this port. +*/ SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ; + +/*! Creates an Input DataStreamPort in an Inline node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +\param aParameterType This value sets the type of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; + +/*! Creates an Output DataStreamPort in an Inline node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +\param aParameterType This value sets the type of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; + } ; +/*! \brief %GNode class +This class is necessary for management of GOTO/EndLoop/EndSwitch nodes in the dataflow. +Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one. +*/ // GOTO/EndLoop/EndSwitch Nodes /////////////// interface GNode : INode { /////////////// - +/*! Sets the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node. +*/ boolean SetCoupled( in string anInLineNode ) ; +/*! Returns the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node. +*/ SUPERV::INode Coupled() ; } ; - +/*! %Loop Nodes class +*/ // Loop Nodes /////////////// interface LNode : GNode { /////////////// - - void SetPyInit( in string MoreName , - in SUPERV::ListOfStrings aPyMoreFunction ) ; +/*! Sets Python Init function of the Loop Node. +\param InitName Name of the Init function +\param aPyInitFunction Python Init function +*/ + void SetPyInit( in string InitName , + in SUPERV::ListOfStrings aPyInitFunction ) ; +/*! Returns Python Init function of the Loop Node. +*/ SUPERV::ListOfStrings PyInit() ; +/*! Returns the name of the Python Init function of the Loop Node. +*/ string PyInitName() ; +/*! Sets Python More function of the Loop Node. +\param MoreName Name of the More function +\param aPyMoreFunction Python More function +*/ void SetPyMore( in string MoreName , in SUPERV::ListOfStrings aPyMoreFunction ) ; +/*! Returns Python More function of the Loop Node. +*/ SUPERV::ListOfStrings PyMore() ; +/*! Returns the name of the Python More function of the Loop Node. +*/ string PyMoreName() ; +/*! Sets Python Next function of the Loop Node. +\param NextName Name of the Next function +\param aPy NextFunction Python Next function +*/ void SetPyNext( in string NextName , in SUPERV::ListOfStrings aPyNextFunction ) ; + +/*! Returns Python Next function of the Loop Node. +*/ SUPERV::ListOfStrings PyNext() ; +/*! Returns the name of the Python Next function of the Loop Node. +*/ string PyNextName() ; } ; @@ -540,173 +768,289 @@ Returns the Cpu used by a node in seconds. /*! \brief Interface of a graph This interface includes a set of methods used for management of the graphs in %SUPERVISION module. -*/ +*/ /////////////// - interface Graph : INode { + interface Graph : GNode { /////////////// - // Create a Computing Node in a Graph + /*! Creates a Computing Node in a Graph. + */ SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ; - // Create a Factory Node in a Graph + /*! Creates a Factory Node in a Graph. + */ SUPERV::FNode FNode( in string aComponentName , in string anInterfaceName , in SALOME_ModuleCatalog::Service aService ) ; - // Create an InLine Node in a Graph + /*! Creates an InLine Node in a Graph. + */ SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ; - // Create a GOTO node and link to the corresponding InLine node + /*! Creates a GOTO Node and links it to the corresponding InLine node. + */ SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction , in string anINode ) ; - // Create a "for" or "while" node and the corresponding end of loop node + /*! Creates a Loop Node ("for" or "while" loop) and links it to the corresponding end of loop node. + */ SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction , in string MoreName , in ListOfStrings MoreFunction , in string NextName , in ListOfStrings NextFunction , out SUPERV::INode anEndOfLoop ) ; - // Create a "if/elseif/else" or "switch" node and the corresponding end node + /*! Creates a conditional "if/elseif/else" or "switch" node and the corresponding end node + */ SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction , out SUPERV::INode anEndOfSwitch ) ; - // Create a CORBA Component Object Reference + /*! 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. + */ + SUPERV::CNode Node( in string aNodeName ) ; + + /*! Creates a CORBA Component Object Reference + */ 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 -*/ + /*! + 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 -*/ + + /*! + 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
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
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 : + */ + /*@{*/ + + long EventQSize() ; long LevelMax() ; SUPERV::ListOfNodes LevelNodes( in long aLevel ) ; long ThreadsMax() ; -/*! -Returns the number of independent subgraphs -*/ - long GraphsNumber() ; -/*! -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 represents a working algorithm. -*/ - boolean IsDataFlow() ; - -/*! -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. + */ + boolean Start() ; + /*! + Allows to copy one graph into another. + */ + SUPERV::Graph Copy() ; + /*! + Convert a FlowGraph to a StreamGraph. + */ + SUPERV::StreamGraph ToStreamGraph() ; + /*! + Merges two graphs + */ + boolean Merge( in Graph aGraph ) ; + /*! + Returns a list of nodes of the graph. + */ + SUPERV::ListOfNodes Nodes() ; + /*! + Returns a list of links of the graph. + */ + SUPERV::ListOfLinks GLinks() ; + /*! + Gets IOR of the garph. + */ + string getIOR(); + + /*! + Returns the number of independent subgraphs + */ + long SubGraphsNumber() ; + /*! + 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(); + + } ; -/*! - 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. + + + + +/*! \brief Interface of a StreamGraph + +This interface includes a set of methods used for management of the graphs in %SUPERVISION module. */ - boolean Start() ; + + ///////////////////// + interface StreamGraph : Graph { + ///////////////////// + /*! Allows to copy one graph into another. */ - SUPERV::Graph Copy() ; + 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 ) ; + /*! -Merges two graphs + Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph */ - boolean Merge( in Graph aGraph ) ; + SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort , + in SUPERV::StreamPort InputPort ) ; + /*! -Returns a list of nodes of the graph. +Returns a list of links of the graph. */ - SUPERV::ListOfNodes Nodes() ; + SUPERV::ListOfStreamLinks GStreamLinks() ; + boolean SetStreamParams( in long Timeout , + in SUPERV::KindOfDataStreamTrace DataStreamTrace , + in double DeltaTime ) ; + void StreamParams( out long Timeout , + out SUPERV::KindOfDataStreamTrace DataStreamTrace , + out double DeltaTime ) ; + /*! -Returns a list of links of the graph. +Returns the number of independent subStreamgraphs */ - SUPERV::ListOfLinks GLinks() ; + long SubStreamGraphsNumber() ; /*! -Gets IOR of the garph. +Returns a list of Nodes of a SubStreamGraph. */ - string getIOR(); + SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ; /*! -Returns a list of graphs. -\note Not implemented +Convert a StreamGraph to a FlowGraph. */ - SUPERV::ListOfGraphs Graphs() ; + SUPERV::Graph ToFlowGraph() ; + +/*! +Merge a StreamGraph. +*/ + boolean StreamMerge( in StreamGraph aStreamGraph ) ; } ; @@ -714,46 +1058,47 @@ Returns a list of graphs. + /*! \brief Interface of the %link -This interface contains a set of methods used for representation and management of the links +This interface contains a set of methods used for representation and management of the links connecting nodes in a %graph. -*/ +*/ ////////////// interface Link : Engines::Component { ////////////// /*! -Associates an %Output %Port to the Link +Returns the %Output %Port of the Link */ SUPERV::Port OutPort() ; /*! -Associates an %Input %Port to the Link +Returns the %Input %Port of the Link */ SUPERV::Port InPort() ; // For GUI : /*! \name Methods used for representation of links in GUI of %SALOME application : */ -/*@{*/ +/*@{*/ /*! Returns the number of coordinate points which are included in the link. -\note
Every link can contain a set of coordinate points which constitute it. These points have -index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of +\note
Every link can contain a set of coordinate points which constitute it. These points have +index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of the points starts from input port to output port of the corresponding link. */ long CoordsSize() ; /*! Adds a coordinate point to the link. -\param index Index of the point. +\param index Index of the point. \param X Coordinates of the point. \param Y Coordinates of the point. */ boolean AddCoord( in long index , in long X , in long Y ) ; /*! Changes the location of a definite coordinate point of the link. -\param index Index of the point. +\param index Index of the point. \param X Coordinates of the point. \param Y Coordinates of the point. */ @@ -761,25 +1106,64 @@ Changes the location of a definite coordinate point of the link. boolean ChangeCoord( in long index , in long X , in long Y ) ; /*! Removes a coordinate point of the link. -\param index Index of the point. +\param index Index of the point. */ boolean RemoveCoord( in long index ) ; /*! Sets the location of a coordinate point of the link. -\param index Index of the point. +\param index Index of the point. \param X Coordinates of the point. \param Y Coordinates of the point. */ boolean Coords( in long index , out long X , out long Y ) ; -/*@}*/ +/*@}*/ // 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 ); + + } ; + + + + + + +/*! \brief Interface of the %link + +This interface contains a set of methods used for representation and management of the links +connecting nodes in a %graph. +*/ + + //////////////////// + interface StreamLink : Link { + //////////////////// +/*! +Returns the %Output %StreamPort of the StreamLink +*/ + SUPERV::StreamPort OutStreamPort() ; + +/*! +Returns the %Input %StreamPort of the StreamLink +*/ + SUPERV::StreamPort InStreamPort() ; + + } ; + + + + /*! \brief %Value interface This interface contains a set of methods used for setting initial parameters of the ports @@ -800,7 +1184,7 @@ Converts the given value into a value of independant data type. Returns True if the value represents an IOR. */ boolean IsIOR() ; -/*! +/*! Gets data type of the component. */ string ComponentDataType() ; @@ -818,24 +1202,28 @@ This interface contains a set of methods used for management of the ports. ////////////// /*! - Gives a value to an Input %Port + Gives a value to an Input %Port +\param aValue This parameter defines the input value */ boolean Input( in SUPERV::Value aValue ) ; -/*! +/*! Returns the node of the port */ SUPERV::CNode Node() ; -/*! +/*! Sets the name of the port. */ string Name() ; - // Type of a Port +/* Gets the type of a port. +\return A string defining the type of a port +*/ + string Type() ; // Link of an Input Port -/*! +/*! Returns the link of an %Input %Port */ SUPERV::Link Link() ; @@ -845,51 +1233,104 @@ Returns a list of links of an Input %Port of an EndSwitchNode */ SUPERV::ListOfLinks Links() ; -/*! +/*! Returns True if this port appears to be an %Input %Port of a Node */ boolean IsInput() ; -/*! +/*! Returns True if an %Input %Value exists for that %Input %Port (without link) */ boolean HasInput() ; -/*! +/*! Returns True if the %Port is linked (without value) */ // Port with link (without Value) boolean IsLinked() ; // Kind of a Port +/*! Returns the type of this port. +*/ SUPERV::KindOfPort Kind() ; // Port from the service of the node -/*! -Returns True if the %Port is a parameter of a service +/*! +Returns True if the %Port is a parameter of a service */ boolean IsParam() ; // Port is a Gate of the node -/*! -Returns True if the %Port appears to be a GatePort of the node +/*! +Returns True if the %Port appears to be a Gate Port of the Node */ boolean IsGate() ; // Port is a parameter of an InLineNode +/*! +Returns True if the %Port appears to be a parameter of an InLine Node. +*/ boolean IsInLine() ; + // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode +/*! +Returns True if the %Port appears to be a Loop Parameter (InitLoop or DoLoop) of a Loop Node +*/ boolean IsLoop() ; // Port is an output parameter of a SwitchNode connected to an InGate -/*! -Returns True if the %Port appears to be a parameter of a switch node +/*! +Returns True if the %Port appears to be a parameter of a switch node */ // Port is a parameter of a switch node boolean IsSwitch() ; // Port is an Input parameter of a EndSwitchNode connected to several output ports +/*! +Returns True if the %Port appears to be an EndSwitch Node connected to several output ports. +*/ boolean IsEndSwitch() ; + boolean IsDataStream() ; + +/*! Returns the current state of the port. +*/ SUPERV::GraphState State() ; +/*! Returns True if computation is finished. +*/ boolean IsDone() ; +/*! deactivate the objref of a Port when its node is destroyed +*/ + void Remove() ; + + } ; + + //////////////////// + interface StreamPort : Port { + //////////////////// + + // Link of a StreamPort +/*! +Returns the link of a %StreamPort +*/ + SUPERV::StreamLink StreamLink() ; + +/*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency +*/ + SALOME_ModuleCatalog::DataStreamDependency Dependency() ; + boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; + +/*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort +*/ + boolean SetParams( in KindOfSchema aKindOfSchema , + in KindOfInterpolation aKindOfInterpolation , + in KindOfExtrapolation aKindOfExtrapolation ) ; + boolean Params( out KindOfSchema aKindOfSchema , + out KindOfInterpolation aKindOfInterpolation , + out KindOfExtrapolation aKindOfExtrapolation ) ; + +/*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort +*/ + boolean SetNumberOfValues( in long aNumberOfValues ) ; + long NumberOfValues() ; + } ; };