Salome HOME
[EDF28648] : On container launch time from ContainerManager it s possible to execute...
[modules/kernel.git] / idl / SALOME_Component.idl
index ff1e97141383bbfc7b1dbe1e43107d5ad2c6af13..2e3b662f49efe032a164fd8ed4369463e88bfd7c 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"
 
 /*! \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 +62,8 @@ module Engines
   };
 
   typedef sequence<KeyValuePair> FieldsDict;
+  typedef sequence<double> vectorOfDouble;
+  typedef sequence<string> vectorOfString;
 
   interface EngineComponent ;
   interface fileRef ;
@@ -74,13 +78,21 @@ 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)
                            try to make a Python import of COMPONENT,
                            then a lib open of libCOMPONENTEngine.so
       \param reason      in case of error (return false) a string explaining the error
-      \return true if load successfull or already done, false otherwise
+      \return true if load successful or already done, false otherwise
     */
     boolean load_component_Library(in string componentName, out string reason);
 
@@ -99,7 +111,7 @@ module Engines
           This simply loads the service in the current container by importing the
           corresponding Python module.
           Warning: no internal registration is done, so it is up to the caller to
-          manage the various instanciation.
+          manage the various instantiation.
           \param serviceName Name of the service
           \param reason  in case of error (return void string) a string explaining the error
           \return the IOR of the loaded service.
@@ -146,6 +158,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() ;
@@ -232,8 +249,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 +300,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.
@@ -349,7 +399,7 @@ module Engines
 
       \return CORBA Ref of the requested file.
 
-      \exception contains informations of what if the component cannot
+      \exception contains information of what if the component cannot
       sends the file's reference.
     */
     Engines::Salome_file getInputFileToService(in string service_name,
@@ -369,7 +419,7 @@ module Engines
 
       \param service_name service's name.
 
-      \exception contains informations about files that are not in a good state.
+      \exception contains information about files that are not in a good state.
     */
     void checkInputFilesToService(in string service_name)           raises(SALOME::SALOME_Exception);
 
@@ -395,7 +445,7 @@ module Engines
 
       \return CORBA Ref of the requested file.
 
-      \exception contains informations of what if the component cannot
+      \exception contains information of what if the component cannot
       sends the file's reference.
     */
     Engines::Salome_file getOutputFileToService(in string service_name,
@@ -415,7 +465,7 @@ module Engines
 
       \param service_name service's name.
 
-      \exception contains informations about files that are not in a good state.
+      \exception contains information about files that are not in a good state.
     */
     void checkOutputFilesToService(in string service_name)        raises(SALOME::SALOME_Exception);
 
@@ -568,7 +618,7 @@ module Engines
 
       \param hdf5_file name (with path) of the hdf5_file.
 
-      \exception contains informations of errors if the loading doesn't succeed.
+      \exception contains information of errors if the loading doesn't succeed.
      */
     void load(in string hdf5_file)                            raises (SALOME::SALOME_Exception);
 
@@ -577,7 +627,7 @@ module Engines
 
       \param  hdf5_file name (with path) of the hdf5_file.
 
-      \exception contains informations of errors if the save doesn't succeed.
+      \exception contains information of errors if the save doesn't succeed.
 
     */
     void save(in string hdf5_file)                            raises (SALOME::SALOME_Exception);
@@ -588,7 +638,7 @@ module Engines
 
       \param  hdf5_file name (with path) of the hdf5_file.
 
-      \exception contains informations of errors if the save doesn't succeed.
+      \exception contains information of errors if the save doesn't succeed.
 
     */
     void save_all(in string hdf5_file)                            raises (SALOME::SALOME_Exception);
@@ -709,7 +759,7 @@ module Engines
      with createFileRef(in string origFileName) method.
      The fileRef object maintains a list of (machine,filename) for copies.
      If a copy exists on myMachine, getRef(myMachine) returns the file name
-     of the copy on myMachine, else returns empy string.
+     of the copy on myMachine, else returns empty string.
      If there is no copy on myMachine, method getFileTransfer() from container
      factoryServer on refMachine provides a fileTransfer object dedicated to
      CORBA file copy.