Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
SALOME_Component.idl
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, 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 // File : SALOME_Component.idl
23 // Author : Paul RASCLE, EDF
24 
25 #ifndef _SALOME_COMPONENT_IDL_
26 #define _SALOME_COMPONENT_IDL_
27 
28 #include "SALOME_GenericObj.idl"
29 #include "SALOMEDS.idl"
30 #include "SALOME_Exception.idl"
31 #include "SALOME_PyNode.idl"
32 
41 module Engines
42 {
47  typedef sequence<octet> TMPFile;
48 
50  struct KeyValuePair
51  {
52  string key;
53  any value;
54  };
55 
57  struct dataref
58  {
59  string ref;
60  };
61 
62  typedef sequence<KeyValuePair> FieldsDict;
63 
64  interface EngineComponent ;
65  interface fileRef ;
66  interface fileTransfer ;
67  interface Salome_file;
68 
74  interface Container
75  {
76 
85  boolean load_component_Library(in string componentName, out string reason);
86 
88 
97  Engines::EngineComponent create_component_instance(in string componentName,
98  in long studyId);
99 
101 
112  string create_python_service_instance(in string serviceName,
113  out string reason);
114 
116 
127  Engines::EngineComponent create_component_instance_env(in string componentName,
128  in long studyId, in FieldsDict env,
129  out string reason);
131 
138  EngineComponent find_component_instance(in string registeredName,
139  in long studyId);
140 
142 
151  EngineComponent load_impl(in string nameToRegister,
152  in string componentName);
153 
155 
158  void remove_impl(in EngineComponent component_i);
159 
161  void finalize_removal() ;
162 
164  void ping();
165 
167  readonly attribute string name ;
168 
170  readonly attribute string workingdir ;
171 
173  attribute string logfilename ;
174 
176  void Shutdown();
177 
179  string getHostName();
180 
182  long getPID();
183 
185 
190  boolean Kill_impl() ;
191 
193 
199  fileRef createFileRef(in string origFileName);
200 
202 
210  Salome_file createSalome_file(in string origFileName);
211 
213 
218  fileTransfer getFileTransfer();
219 
221 
226  void copyFile(in Container contai, in string remoteFile, in string localFile);
227 
229 
233  PyNode createPyNode(in string nodeName, in string code) raises(SALOME::SALOME_Exception);
234 
236  PyNode getDefaultPyNode(in string nodeName);
237 
239 
243  PyScriptNode createPyScriptNode(in string nodeName, in string code) raises(SALOME::SALOME_Exception);
244 
246  PyScriptNode getDefaultPyScriptNode(in string nodeName);
247  };
248 
253  interface EngineComponent
254  {
256  readonly attribute string instanceName ;
257 
259  readonly attribute string interfaceName ;
260 
262  void ping();
263 
265 
271  long getStudyId();
272 
274 
279  void destroy() ;
280 
282  Container GetContainerRef() ;
283 
285 
291  void setProperties(in FieldsDict dico);
292 
294 
298  FieldsDict getProperties();
299 
301 
304  void SetOption(in string optionName, in string value);
305 
307 
310  string GetOption(in string optionName);
311 
313 
319  void Names( in string aGraphName , in string aNodeName ) ;
320 
322 
325  boolean Kill_impl() ;
326 
328 
332  boolean Stop_impl() ;
333 
335 
339  boolean Suspend_impl() ;
340 
342 
345  boolean Resume_impl() ;
346 
348 
351  long CpuUsed_impl() ;
352 
354 
358  TMPFile DumpPython(in Object theStudy,
359  in boolean isPublished,
360  in boolean isMultiFile,
361  out boolean isValidScript);
362 
363 
365 
375  Engines::Salome_file getInputFileToService(in string service_name,
376  in string Salome_file_name) raises(SALOME::SALOME_Exception);
377 
379 
394  void checkInputFilesToService(in string service_name) raises(SALOME::SALOME_Exception);
395 
397 
407  Engines::Salome_file setInputFileToService(in string service_name,
408  in string Salome_file_name) raises(SALOME::SALOME_Exception);
409 
411 
421  Engines::Salome_file getOutputFileToService(in string service_name,
422  in string Salome_file_name) raises(SALOME::SALOME_Exception);
423 
425 
440  void checkOutputFilesToService(in string service_name) raises(SALOME::SALOME_Exception);
441 
443 
453  Engines::Salome_file setOutputFileToService(in string service_name,
454  in string Salome_file_name) raises(SALOME::SALOME_Exception);
455 
457 
462  boolean hasObjectInfo();
463 
465 
476  string getObjectInfo(in long studyId, in string entry);
477 
479 
487  string getVersion();
488  };
489 
494  {
496  SALOME::StringSeq GetImportableFormats();
497  boolean ImportDataAs(in string format, in SALOME::GenericObj exporter);
498  };
499 
501  typedef sequence<octet> fileBlock;
502 
508  {
510 
518  long open(in string fileName);
520 
524  long openW(in string fileName);
525 
527 
531  void close(in long fileId);
532 
534 
538  fileBlock getBlock(in long fileId);
539 
541 
545  void putBlock(in long fileId, in fileBlock block);
546 
547  };
548 
550  struct file {
552  string file_name;
554  string path;
555  string type;
556  string source_file_name;
558  string status;
559  long node;
560  Engines::Container container;
561  };
562 
564  typedef sequence<Engines::file> files;
565 
566 
568  struct SfState {
570  string name;
576  boolean files_ok;
577 
578  };
579 
586  {
588 
594  void load(in string hdf5_file) raises (SALOME::SALOME_Exception);
595 
597 
604  void save(in string hdf5_file) raises (SALOME::SALOME_Exception);
605 
607 
615  void save_all(in string hdf5_file) raises (SALOME::SALOME_Exception);
616 
617 /**************/
618 
620 
626  void setLocalFile(in string comp_file_name) raises (SALOME::SALOME_Exception);
627 
629 
635  void setDistributedFile(in string comp_file_name) raises (SALOME::SALOME_Exception);
636 
638 
645  void connect(in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception);
646 
648 
655  void connectDistributedFile(in string file_name,
656  in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception);
657 
659 
666  void setDistributedSourceFile(in string file_name,
667  in string source_file_name) raises (SALOME::SALOME_Exception);
668 
669 /**************/
670 
672 
676  void recvFiles() raises (SALOME::SALOME_Exception) ;
677 
678 /**************/
679 
681 
687  void removeFile(in string file_name) raises (SALOME::SALOME_Exception);
688 
690  void removeFiles();
691 
692 /**************/
693 
695 
698  Engines::files getFilesInfos();
699 
701 
709  Engines::file getFileInfos(in string file_name) raises (SALOME::SALOME_Exception);
710 
712  Engines::SfState getSalome_fileState();
713 
714 
716 
720  void setContainer(in Engines::Container container);
721  };
722 
740  interface fileRef
741  {
743  readonly attribute string origFileName;
745  readonly attribute string refMachine;
746 
747  Container getContainer();
748 
749  boolean addRef(in string machine,
750  in string fileName);
751 
752  string getRef(in string machine);
753  };
754 };
755 
756 #endif