1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
20 #ifndef _SALOME_COMM_IDL_
21 #define _SALOME_COMM_IDL_
23 #include "SALOME_Exception.idl"
27 enum TypeOfDataTransmitted { _DOUBLE_,_INT_ };
29 enum TypeOfCommunication { CORBA_ , MPI_ , SOCKET_ };
31 typedef sequence<double> vectorOfDouble;
33 typedef sequence<long> vectorOfLong;
35 interface MultiCommClass {
36 void setProtocol(in TypeOfCommunication typ);
39 interface ServantLifeCycle {
44 TypeOfDataTransmitted getTypeOfDataTransmitted();
48 interface SenderDouble : Sender {
49 SenderDouble buildOtherWithProtocol(in TypeOfCommunication type);
52 interface SenderInt : Sender {
53 SenderInt buildOtherWithProtocol(in TypeOfCommunication type);
56 //No compulsory copy between double and CORBA::Double
57 interface CorbaDoubleNCSender : SenderDouble {
58 unsigned long getSize();
59 vectorOfDouble sendPart(in unsigned long n1,in unsigned long n2);
60 vectorOfDouble send();
63 //Compulsory copy between double and CORBA::Double
64 interface CorbaDoubleCSender : SenderDouble {
65 unsigned long getSize();
66 //unsigned long getSize2();
67 vectorOfDouble sendPart(in unsigned long n1,in unsigned long n2);
70 //No compulsory copy between int and CORBA::Long
71 interface CorbaLongNCSender : SenderInt {
72 unsigned long getSize();
73 vectorOfLong sendPart(in unsigned long n1,in unsigned long n2);
77 //Compulsory copy between int and CORBA::Long
78 interface CorbaLongCSender : SenderInt {
79 unsigned long getSize();
80 vectorOfLong sendPart(in unsigned long n1,in unsigned long n2);
83 interface MPISender : Sender {
84 typedef struct Parameter {
92 void close(in param p);
95 interface MPISenderDouble : SenderDouble,MPISender {
98 interface MPISenderInt : SenderInt,MPISender {
101 interface SocketSender : Sender {
102 typedef struct Parameter {
103 unsigned long lstart;
105 unsigned long myport;
106 string internet_address;
109 void initCom() raises(SALOME_Exception);
110 void acceptCom() raises(SALOME_Exception);
112 void endOfCom() raises(SALOME_Exception);
116 interface SocketSenderDouble : SenderDouble,SocketSender {
119 interface SocketSenderInt : SenderInt,SocketSender {
123 SenderDouble getData();
124 long getSizeOfColumn();