Salome HOME
[EDF29150] : log performance of python scripts run inside SALOME container + verbosit...
[modules/kernel.git] / idl / SALOME_Component.idl
index 8c02315aab0b892f1e7ca0278b363b4bc366404d..8c543d82bd5043bb907a8a2a57021ec57aa60f5d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SALOME_Component.idl
 //  Author : Paul RASCLE, EDF
 
 #include "SALOMEDS.idl"
 #include "SALOME_Exception.idl"
 #include "SALOME_PyNode.idl"
+#include "SALOME_Embedded_NamingService.idl"
+#include "SALOME_Comm.idl"
 
 /*! \file SALOME_Component.idl \brief interfaces for EngineComponent and Container
 */
 
 /*! \brief
 This is a package of interfaces used for connecting new components to %SALOME
-application. It also contains a set of interfaces used for management of %MED
+application. It also contains a set of interfaces used for management of %FIELDS
 component in %SALOME application.
 */
 module Engines
@@ -60,6 +63,8 @@ module Engines
   };
 
   typedef sequence<KeyValuePair> FieldsDict;
+  typedef sequence<double> vectorOfDouble;
+  typedef sequence<string> vectorOfString;
 
   interface EngineComponent ;
   interface fileRef ;
@@ -74,6 +79,14 @@ module Engines
   interface Container
   {
 
+    void override_environment( in FieldsDict env );
+
+    void override_environment_python( in FieldsDict env );
+
+    FieldsDict get_os_environment();
+
+    void execute_python_code( in string code ) raises(SALOME::SALOME_Exception);
+
     /*! \brief Loads a new component class (dynamic library).
 
       \param componentName like COMPONENT, (Python or C++ implementation)
@@ -146,6 +159,11 @@ module Engines
       \param component_i     Component to be removed
     */
     void remove_impl(in EngineComponent component_i);
+    
+    //! In case of SSL mode Returns entry to Embedded NS
+    EmbeddedNamingService get_embedded_NS_if_ssl();
+    
+    boolean is_SSL_mode();
 
     //!  Unload component libraries from the container.
     void finalize_removal() ;
@@ -161,6 +179,16 @@ module Engines
 
     //!  name of the %container log file (this has been set by the launcher)
     attribute string logfilename ;
+    
+    //!  name of the %container log file
+    attribute string locallogfilename ;
+
+    //! interval of time between two measures of CPU/time process container
+    attribute long monitoringtimeresms;
+    
+    void verbosity(out boolean activated, out string level);
+
+    void setVerbosity(in boolean activated, in string level);
 
     //!  Shutdown the Container process.
     void Shutdown();
@@ -232,8 +260,40 @@ module Engines
      */
     PyScriptNode createPyScriptNode(in string nodeName, in string code)  raises(SALOME::SALOME_Exception);
 
+    void removePyScriptNode(in string nodeName) raises(SALOME::SALOME_Exception);
+
     //! Retrieves the last created PyScriptNode instance with createPyScriptNode.
     PyScriptNode getDefaultPyScriptNode(in string nodeName);
+
+    //! This method remove all refs of PyScriptNode servant objects stored in server.
+    /*!
+     * Previous scripts created on container may have been stored in a map. This method removes them. It then clean all the contexts dict attached to them.
+     */
+    void cleanAllPyScripts();
+
+    //! Return number of CPU cores in the calculation node.
+    long getNumberOfCPUCores();
+
+    //! Return a load of each CPU core.
+    vectorOfDouble loadOfCPUCores() raises(SALOME::SALOME_Exception);
+
+    //! Set custom script to calculate a load of each CPU core.
+    /*!
+      \param script Python script to execute
+     */
+    void setPyScriptForCPULoad(in string script);
+
+    //! Nullify custom script to calculate each CPU core's load.
+    void resetScriptForCPULoad();
+
+    //! Get total physical memory of calculation node, in megabytes.
+    long getTotalPhysicalMemory();
+
+    //! Get used physical memory of calculation node, in megabytes.
+    long getTotalPhysicalMemoryInUse();
+
+    //! Obtain physical memory, used by the current process, in megabytes.
+    long getTotalPhysicalMemoryInUseByMe();
   };
 
   /*! \brief Interface of the %component.
@@ -251,6 +311,7 @@ module Engines
     //!  Determines whether the server has already been loaded or not.
     void ping();
 
+    boolean isSSLMode() raises(SALOME::SALOME_Exception);
     //! Remove component instance from container
     /*!
       Deactivates the %Component.