Salome HOME
Join modifications from branch BR_PR_V320b1
[modules/kernel.git] / idl / SALOME_Comm.idl
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
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.
8 // 
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.
13 //
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
17 //
18 // See http://www.salome-platform.org/
19 //
20 #ifndef _SALOME_COMM_IDL_
21 #define _SALOME_COMM_IDL_
22
23 #include "SALOME_Exception.idl"
24
25 module SALOME {
26   
27   enum TypeOfDataTransmitted { _DOUBLE_,_INT_ };
28
29   enum TypeOfCommunication { CORBA_ , MPI_ , SOCKET_ };
30
31   typedef sequence<double> vectorOfDouble;
32   
33   typedef sequence<long> vectorOfLong;
34   
35   interface MultiCommClass {
36     void setProtocol(in TypeOfCommunication typ);
37   };
38
39   interface ServantLifeCycle {
40     void release();
41   };
42
43   interface Sender {
44     TypeOfDataTransmitted getTypeOfDataTransmitted();
45     void release();
46   };
47
48   interface SenderDouble : Sender {
49     SenderDouble buildOtherWithProtocol(in TypeOfCommunication type);
50   };
51
52   interface SenderInt : Sender {
53     SenderInt buildOtherWithProtocol(in TypeOfCommunication type);
54   };
55
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();
61   };
62
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);
68   };
69
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);
74     vectorOfLong send();
75   };
76
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);
81   };
82
83   interface MPISender : Sender {
84     typedef struct Parameter {
85       unsigned long myproc;
86       unsigned long tag1;
87       unsigned long tag2;
88       string service;
89     } param;
90     param getParam();
91     void send();
92     void close(in param p);
93   };
94
95   interface MPISenderDouble : SenderDouble,MPISender {
96   };
97
98   interface MPISenderInt : SenderInt,MPISender {
99   };
100
101   interface SocketSender : Sender {
102     typedef struct Parameter {
103       unsigned long lstart;
104       unsigned long lend;
105       unsigned long myport;
106      string internet_address;
107     } param;
108     param getParam();
109     void initCom() raises(SALOME_Exception);
110     void acceptCom() raises(SALOME_Exception);
111     void closeCom();
112     void endOfCom() raises(SALOME_Exception);
113     void send();
114   };
115
116   interface SocketSenderDouble : SenderDouble,SocketSender {
117   };
118
119   interface SocketSenderInt : SenderInt,SocketSender {
120   };
121
122   interface Matrix {
123     SenderDouble getData();
124     long getSizeOfColumn();
125     void release();
126   };
127 };
128
129 #endif