Version: 9.16.0
SALOME_Component.idl
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// File : SALOME_Component.idl
24// Author : Paul RASCLE, EDF
25
26#ifndef _SALOME_COMPONENT_IDL_
27#define _SALOME_COMPONENT_IDL_
28
29#include "SALOME_GenericObj.idl"
30#include "SALOMEDS.idl"
31#include "SALOME_Exception.idl"
32#include "SALOME_PyNode.idl"
34#include "SALOME_Comm.idl"
35
44module Engines
45{
50 typedef sequence<octet> TMPFile;
51
54 {
55 string key;
56 any value;
57 };
58
60 struct dataref
61 {
62 string ref;
63 };
64
65 typedef sequence<KeyValuePair> FieldsDict;
66 typedef sequence<double> vectorOfDouble;
67 typedef sequence<string> vectorOfString;
68 typedef sequence<vectorOfString> vectorOfVectorOfString;
69
70 interface EngineComponent ;
71 interface fileRef ;
72 interface fileTransfer ;
73 interface Salome_file;
74
80 interface Container
81 {
82
84
86
88
89 void set_big_obj_on_disk_threshold(in long thresholdInByte);
90
91 void set_big_obj_on_disk_directory(in string directory);
92
93 void set_directory_for_replay_files(in string directory);
94
95 void set_number_of_retry(in long nbRetry);
96
97 void set_timeout_before_retrying(in long timeInSecond);
98
99 void set_current_directory(in string cwd);
100
101 void set_startup_code(in string codeAtStartUp);
102
104
105 void addLogFileNameGroup(in vectorOfString groupOfLogFileNames);
106
108
109 void execute_python_code( in string code ) raises(SALOME::SALOME_Exception);
110
119 boolean load_component_Library(in string componentName, out string reason);
120
122
130
132
141 string create_python_service_instance(in string serviceName,
142 out string reason);
143
145
155 in FieldsDict env,
156 out string reason);
158
163 EngineComponent find_component_instance(in string registeredName);
164
166
175 EngineComponent load_impl(in string nameToRegister,
176 in string componentName);
177
179
182 void remove_impl(in EngineComponent component_i);
183
186
187 boolean is_SSL_mode();
188
191
193 void ping();
194
196 readonly attribute string name ;
197
199 readonly attribute string workingdir ;
200
202 attribute string logfilename ;
203
205 attribute string locallogfilename ;
206
208 attribute long monitoringtimeresms;
209
210 void verbosity(out boolean activated, out string level);
211
212 void setVerbosity(in boolean activated, in string level);
213
215 void Shutdown();
216
219
221 string getHostName();
222
224 long getPID();
225
227
232 boolean Kill_impl() ;
233
235
241 fileRef createFileRef(in string origFileName);
242
244
252 Salome_file createSalome_file(in string origFileName);
253
255
261
263
268 void copyFile(in Container contai, in string remoteFile, in string localFile);
269
271
275 PyNode createPyNode(in string nodeName, in string code) raises(SALOME::SALOME_Exception);
276
278 PyNode getDefaultPyNode(in string nodeName);
279
281
285 PyScriptNode createPyScriptNode(in string nodeName, in string code) raises(SALOME::SALOME_Exception);
286
287 void removePyScriptNode(in string nodeName) raises(SALOME::SALOME_Exception);
288
291
293
297
300
303
305
308 void setPyScriptForCPULoad(in string script);
309
311 void resetScriptForCPULoad();
312
315
318
321 };
322
328 {
330 readonly attribute string instanceName ;
331
333 readonly attribute string interfaceName ;
334
336 void ping();
337
340
345 void destroy() ;
346
348 Container GetContainerRef() ;
349
351
357 void setProperties(in FieldsDict dico);
358
360
364 FieldsDict getProperties();
365
367
370 void SetOption(in string optionName, in string value);
371
373
376 string GetOption(in string optionName);
377
379
385 void Names( in string aGraphName , in string aNodeName ) ;
386
388
391 boolean Kill_impl() ;
392
394
398 boolean Stop_impl() ;
399
401
405 boolean Suspend_impl() ;
406
408
411 boolean Resume_impl() ;
412
414
417 long CpuUsed_impl() ;
418
420
424 TMPFile DumpPython(in boolean isPublished,
425 in boolean isMultiFile,
426 out boolean isValidScript);
427
428
430
440 Engines::Salome_file getInputFileToService(in string service_name,
441 in string Salome_file_name) raises(SALOME::SALOME_Exception);
442
444
459 void checkInputFilesToService(in string service_name) raises(SALOME::SALOME_Exception);
460
462
472 Engines::Salome_file setInputFileToService(in string service_name,
473 in string Salome_file_name) raises(SALOME::SALOME_Exception);
474
476
486 Engines::Salome_file getOutputFileToService(in string service_name,
487 in string Salome_file_name) raises(SALOME::SALOME_Exception);
488
490
505 void checkOutputFilesToService(in string service_name) raises(SALOME::SALOME_Exception);
506
508
518 Engines::Salome_file setOutputFileToService(in string service_name,
519 in string Salome_file_name) raises(SALOME::SALOME_Exception);
520
522
527 boolean hasObjectInfo();
528
530
540 string getObjectInfo(in string entry);
541
543
551 string getVersion();
552 };
553
558 {
561 boolean ImportDataAs(in string format, in SALOME::GenericObj exporter);
562 };
563
565 typedef sequence<octet> fileBlock;
566
572 {
574
582 long open(in string fileName);
584
588 long openW(in string fileName);
589
591
595 void close(in long fileId);
596
598
602 fileBlock getBlock(in long fileId);
603
605
609 void putBlock(in long fileId, in fileBlock block);
610
611 };
612
614 struct file {
616 string file_name;
618 string path;
619 string type;
622 string status;
623 long node;
625 };
626
628 typedef sequence<Engines::file> files;
629
630
632 struct SfState {
634 string name;
640 boolean files_ok;
641
642 };
643
650 {
652
658 void load(in string hdf5_file) raises (SALOME::SALOME_Exception);
659
661
668 void save(in string hdf5_file) raises (SALOME::SALOME_Exception);
669
671
679 void save_all(in string hdf5_file) raises (SALOME::SALOME_Exception);
680
681/**************/
682
684
690 void setLocalFile(in string comp_file_name) raises (SALOME::SALOME_Exception);
691
693
699 void setDistributedFile(in string comp_file_name) raises (SALOME::SALOME_Exception);
700
702
709 void connect(in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception);
710
712
719 void connectDistributedFile(in string file_name,
720 in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception);
721
723
730 void setDistributedSourceFile(in string file_name,
731 in string source_file_name) raises (SALOME::SALOME_Exception);
732
733/**************/
734
736
741
742/**************/
743
745
751 void removeFile(in string file_name) raises (SALOME::SALOME_Exception);
752
754 void removeFiles();
755
756/**************/
757
759
762 Engines::files getFilesInfos();
763
765
773 Engines::file getFileInfos(in string file_name) raises (SALOME::SALOME_Exception);
774
776 Engines::SfState getSalome_fileState();
777
778
780
784 void setContainer(in Engines::Container container);
785 };
786
804 interface fileRef
805 {
807 readonly attribute string origFileName;
809 readonly attribute string refMachine;
810
812
813 boolean addRef(in string machine,
814 in string fileName);
815
816 string getRef(in string machine);
817 };
818};
819
820#endif
static std::ostream * out
Definition: DSC_interface.cxx:381
This file contains a set of interfaces used for creation, management and modification of the Study.
This file contains a set of interfaces used for communication between components.
This file contains the objects defining the main exception used in SALOME application.
interface for common behavior of SALOME transient CORBA objects
interface for remote python execution
The main exception in SALOME application.
Definition: SALOME_Exception.idl:71
Interface of the Container.
Definition: SALOME_Component.idl:81
vectorOfDouble loadOfCPUCores()
Return a load of each CPU core.
fileTransfer getFileTransfer()
Create a fileTransfer.
boolean is_SSL_mode()
string getHostName()
Returns the hostname of the container.
boolean Kill_impl()
Kill the container.
void set_big_obj_on_disk_directory(in string directory)
Salome_file createSalome_file(in string origFileName)
Create a Salome_file.
void setVerbosity(in boolean activated, in string level)
void cleanAllPyScripts()
This method remove all refs of PyScriptNode servant objects stored in server.
void verbosity(out boolean activated, out string level)
fileRef createFileRef(in string origFileName)
Create a fileRef.
Engines::EngineComponent create_component_instance_env(in string componentName, in FieldsDict env, out string reason)
Create a new servant instance of a component with environment variables specified.
void set_current_directory(in string cwd)
void set_timeout_before_retrying(in long timeInSecond)
void set_big_obj_on_disk_threshold(in long thresholdInByte)
void removePyScriptNode(in string nodeName)
void finalize_removal()
Unload component libraries from the container.
attribute long monitoringtimeresms
interval of time between two measures of CPU/time process container
Definition: SALOME_Component.idl:208
FieldsDict get_os_environment()
EngineComponent find_component_instance(in string registeredName)
Find a servant instance of a component.
long getNumberOfCPUCores()
Return number of CPU cores in the calculation node.
void set_directory_for_replay_files(in string directory)
EngineComponent load_impl(in string nameToRegister, in string componentName)
Find a servant instance of a component, or create a new one.
EmbeddedNamingService get_embedded_NS_if_ssl()
In case of SSL mode Returns entry to Embedded NS.
PyNode getDefaultPyNode(in string nodeName)
Retrieves the last created PyNode instance with createPyNode.
attribute string locallogfilename
name of the container log file
Definition: SALOME_Component.idl:205
void ping()
Determines whether the server has been loaded or not.
boolean load_component_Library(in string componentName, out string reason)
Loads a new component class (dynamic library).
vectorOfVectorOfString getAllLogFileNameGroups()
void set_startup_code(in string codeAtStartUp)
void ShutdownNow()
Shutdown the Container process. Shutdown is immediate for this method.
string get_startup_code()
void execute_python_code(in string code)
void set_number_of_retry(in long nbRetry)
void remove_impl(in EngineComponent component_i)
Remove the component servant, and deletes all related objects.
string create_python_service_instance(in string serviceName, out string reason)
Create a new Python servant instance of a generic service.
attribute string logfilename
name of the container log file (this has been set by the launcher)
Definition: SALOME_Component.idl:202
void copyFile(in Container contai, in string remoteFile, in string localFile)
Copy a file from a remote host (container) to a local file.
void override_environment(in FieldsDict env)
void addLogFileNameGroup(in vectorOfString groupOfLogFileNames)
PyScriptNode getDefaultPyScriptNode(in string nodeName)
Retrieves the last created PyScriptNode instance with createPyScriptNode.
void override_environment_python(in FieldsDict env)
long getPID()
Returns the PID of the container.
PyNode createPyNode(in string nodeName, in string code)
Create a PyNode in the container.
readonly attribute string name
Name of the container.
Definition: SALOME_Component.idl:196
Engines::EngineComponent create_component_instance(in string componentName)
Create a new servant instance of a component.
void Shutdown()
Shutdown the Container process. Shutdown is not immediate. It waits for all remaining invokation comp...
PyScriptNode createPyScriptNode(in string nodeName, in string code)
Create a PyScriptNode in the container.
readonly attribute string workingdir
working directory of the container
Definition: SALOME_Component.idl:199
Definition: SALOME_Embedded_NamingService.idl:29
Interface of the component.
Definition: SALOME_Component.idl:328
void ping()
Determines whether the server has already been loaded or not.
readonly attribute string interfaceName
The name of the interface of the Component.
Definition: SALOME_Component.idl:333
readonly attribute string instanceName
The name of the instance of the Component.
Definition: SALOME_Component.idl:330
Base interface of the component that supports exporting data.
Definition: SALOME_Component.idl:558
boolean ImportDataAs(in string format, in SALOME::GenericObj exporter)
SALOME::StringSeq GetImportableFormats()
Get a list of supported formats.
Definition: SALOME_PyNode.idl:65
Definition: SALOME_PyNode.idl:77
Interface of a Salome_file managed This file is independent of a Salome module.
Definition: SALOME_Component.idl:650
void save_all(in string hdf5_file)
Save a Salome_file into a hdf5_file.
void connect(in Engines::Salome_file source_Salome_file)
Connect a Salome_file with another Salome_file.
void recvFiles()
Get all the distributed files managed by the Salome_file and check all the local files.
void setDistributedFile(in string comp_file_name)
Add a Distributed file to the Salome_file.
void setLocalFile(in string comp_file_name)
Add a Local file to the Salome_file.
void connectDistributedFile(in string file_name, in Engines::Salome_file source_Salome_file)
Connect the managed file file_name to a Salome_file.
void save(in string hdf5_file)
Save a Salome_file into a hdf5_file.
void load(in string hdf5_file)
Load a Salome_file from a hdf5 file.
void setDistributedSourceFile(in string file_name, in string source_file_name)
Connect the file_name with a Distributed file_name.
Interface of fileRef.
Definition: SALOME_Component.idl:805
boolean addRef(in string machine, in string fileName)
readonly attribute string refMachine
the machine of the original file
Definition: SALOME_Component.idl:809
readonly attribute string origFileName
the original file
Definition: SALOME_Component.idl:807
string getRef(in string machine)
Container getContainer()
Interface of fileTransfer.
Definition: SALOME_Component.idl:572
void putBlock(in long fileId, in fileBlock block)
Put a file data block.
fileBlock getBlock(in long fileId)
Get a file data block.
long openW(in string fileName)
Open the file transfer in write mode for file fileName.
long open(in string fileName)
Open the file transfer.
void close(in long fileId)
Close the file transfer.
interface for common behavior of SALOME transient CORBA objects
Definition: SALOME_GenericObj.idl:40
This is a package of interfaces used for connecting new components to SALOME application.
Definition: DSC_Engines.idl:36
sequence< octet > fileBlock
A block of binary data used for file transfer. The maximum size of the block is defined on server sid...
Definition: SALOME_Component.idl:565
sequence< vectorOfString > vectorOfVectorOfString
Definition: SALOME_Component.idl:68
sequence< KeyValuePair > FieldsDict
Definition: SALOME_Component.idl:65
sequence< double > vectorOfDouble
Definition: SALOME_Component.idl:66
sequence< Engines::file > files
A sequence of Engines::file.
Definition: SALOME_Component.idl:628
sequence< string > vectorOfString
Definition: SALOME_Component.idl:67
sequence< octet > TMPFile
A byte stream which is used for binary data transfer between different components.
Definition: SALOME_Component.idl:50
def getTotalPhysicalMemory()
Definition: salome_psutil.py:71
def getTotalPhysicalMemoryInUseByMe()
Definition: salome_psutil.py:87
def getTotalPhysicalMemoryInUse()
Definition: salome_psutil.py:79
def getVersion(mod="KERNEL", full=False)
Definition: salome_version.py:50
Module SALOME contains all base interfaces of SALOME Kernel.
Definition: SALOME_LockMasterImpl.hxx:29
sequence< string > StringSeq
Definition: SALOME_GenericObj.idl:35
format
Definition: extension_utilities.py:48
container
Definition: TestComponentPy.py:63
level
Definition: TestLauncherSessionArgs.py:29
cwd
Definition: launcher_use_case.py:40
General Key Value Structure to set or get properties, for component.
Definition: SALOME_Component.idl:54
any value
Definition: SALOME_Component.idl:56
string key
Definition: SALOME_Component.idl:55
The state of a Salome_file.
Definition: SALOME_Component.idl:632
string hdf5_file_name
hdf5 file where the file can be saved
Definition: SALOME_Component.idl:636
boolean files_ok
information if all the files are received
Definition: SALOME_Component.idl:640
string name
file name
Definition: SALOME_Component.idl:634
long number_of_files
number of files managed
Definition: SALOME_Component.idl:638
Structure data type to hold reference on data.
Definition: SALOME_Component.idl:61
string ref
Definition: SALOME_Component.idl:62
A file managed by a Salome_file.
Definition: SALOME_Component.idl:614
string source_file_name
Definition: SALOME_Component.idl:620
string type
Definition: SALOME_Component.idl:619
string status
status ("present" or "notpresent")
Definition: SALOME_Component.idl:622
string file_name
file name
Definition: SALOME_Component.idl:616
string path
path name
Definition: SALOME_Component.idl:618
Engines::Container container
Definition: SALOME_Component.idl:624
long node
Definition: SALOME_Component.idl:623