Version: 8.3.0
DSC_Engines.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 
23 // File : DSC_Engines.idl
24 // Author : Andre RIBES, EDF
25 // $Header:
26 //
27 #ifndef _DSC_ENGINES_IDL_
28 #define _DSC_ENGINES_IDL_
29 
30 #include "SALOME_Component.idl"
31 #include "SALOME_Ports.idl"
32 
36 module Engines {
37 
62 
63 /*--------------------------------------------------------------------------------------------*/
64 /*-------------------------------------- Types Part ------------------------------------------*/
65 
67 
73  typedef sequence<Ports::Port> uses_port;
74 
76 
79  enum Message {AddingConnection,
81  ApplicationError};
82 
84  exception PortNotDefined {};
85 
87  exception PortAlreadyDefined {};
88 
90  exception PortNotConnected {};
91 
93 
97  exception BadPortType {
98  string expected;
99  string received;
100  };
101 
103  exception NilPort {};
104 
106  exception BadPortReference {};
107 
109  exception BadProperty {};
110 
111 
112 /*--------------------------------------------------------------------------------------------*/
113 /*-------------------------------------- Operation Part --------------------------------------*/
114 
116 
130  void add_provides_port(in Ports::Port ref,
131  in string provides_port_name,
132  in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
133  NilPort,
134  BadProperty);
135 
137 
151  void add_uses_port(in string repository_id,
152  in string uses_port_name,
153  in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
154  BadProperty);
155 
157 
176  Ports::Port get_provides_port(in string provides_port_name,
177  in boolean connection_error) raises(PortNotDefined,
179  BadPortType);
180 
182 
200  uses_port get_uses_port(in string uses_port_name) raises(PortNotDefined,
202  BadPortType);
203 
204 
206 
214  void connect_provides_port(in string provides_port_name) raises(PortNotDefined);
215 
217 
226  void connect_uses_port(in string uses_port_name,
227  in Ports::Port provides_port_ref) raises(PortNotDefined,
228  BadPortType,
229  NilPort);
230 
232 
240  boolean is_connected(in string port_name) raises(PortNotDefined);
241 
243 
251  void disconnect_provides_port(in string provides_port_name,
252  in Engines::DSC::Message message) raises(PortNotDefined,
254 
256 
266  void disconnect_uses_port(in string uses_port_name,
267  in Ports::Port provides_port_ref,
268  in Engines::DSC::Message message) raises(PortNotDefined,
272 
279  Ports::PortProperties get_port_properties(in string port_name) raises(PortNotDefined);
280 
281  };
282 
287  interface ConnectionManager {
288 
290  exception BadId {};
291 
293  typedef short connectionId;
294 
296 
311  connectionId connect(in Engines::DSC uses_component,
312  in string uses_port_name,
313  in Engines::DSC provides_component,
314  in string provides_port_name) raises(Engines::DSC::PortNotDefined,
317 
319 
327  void disconnect(in connectionId id,
332 
334  oneway void ShutdownWithExit();
335 
337  long getPID();
338  };
339 
340 /*--------------------------------------------------------------------------------------------*/
341 
349 
351 
358  boolean init_service(in string service_name);
359 
360  struct multiple_param {
361  string name;
362  long number;
363  };
364 
365  typedef sequence<multiple_param> seq_multiple_param;
366 
376  boolean init_service_with_multiple(in string service_name, in seq_multiple_param params);
377  };
378 };
379 
380 #endif