SALOME documentation central

idl/SALOME_Comm.idl

Go to the documentation of this file.
00001 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 //  This library is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU Lesser General Public
00008 //  License as published by the Free Software Foundation; either
00009 //  version 2.1 of the License.
00010 //
00011 //  This library is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 //  Lesser General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU Lesser General Public
00017 //  License along with this library; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 #ifndef _SALOME_COMM_IDL_
00023 #define _SALOME_COMM_IDL_
00024 
00025 #include "SALOME_Exception.idl"
00026 
00032 module SALOME {
00033   
00034   enum TypeOfDataTransmitted { _DOUBLE_,_INT_ };
00035 
00036   enum TypeOfCommunication { CORBA_ , MPI_ , SOCKET_ };
00037 
00038   typedef sequence<double> vectorOfDouble;
00039   
00040   typedef sequence<long> vectorOfLong;
00041   
00042   interface MultiCommClass {
00043     void setProtocol(in TypeOfCommunication typ);
00044   };
00045 
00046   interface ServantLifeCycle {
00047     void release();
00048   };
00049 
00050   interface Sender {
00051     TypeOfDataTransmitted getTypeOfDataTransmitted();
00052     void release();
00053   };
00054 
00055   interface SenderDouble : Sender {
00056     SenderDouble buildOtherWithProtocol(in TypeOfCommunication type);
00057   };
00058 
00059   interface SenderInt : Sender {
00060     SenderInt buildOtherWithProtocol(in TypeOfCommunication type);
00061   };
00062 
00063   //No compulsory copy between double and CORBA::Double
00064   interface CorbaDoubleNCSender : SenderDouble {
00065     unsigned long getSize();
00066     vectorOfDouble sendPart(in unsigned long n1,in unsigned long n2);
00067     vectorOfDouble send();
00068   };
00069 
00070   //Compulsory copy between double and CORBA::Double
00071   interface CorbaDoubleCSender : SenderDouble {
00072     unsigned long getSize();
00073     //unsigned long getSize2();
00074     vectorOfDouble sendPart(in unsigned long n1,in unsigned long n2);
00075   };
00076 
00077   //No compulsory copy between int and CORBA::Long
00078   interface CorbaLongNCSender : SenderInt {
00079     unsigned long getSize();
00080     vectorOfLong sendPart(in unsigned long n1,in unsigned long n2);
00081     vectorOfLong send();
00082   };
00083 
00084   //Compulsory copy between int and CORBA::Long
00085   interface CorbaLongCSender : SenderInt {
00086     unsigned long getSize();
00087     vectorOfLong sendPart(in unsigned long n1,in unsigned long n2);
00088   };
00089 
00090   interface MPISender : Sender {
00091     typedef struct Parameter {
00092       unsigned long myproc;
00093       unsigned long tag1;
00094       unsigned long tag2;
00095       string service;
00096     } param;
00097     param getParam();
00098     void send();
00099     void close(in param p);
00100   };
00101 
00102   interface MPISenderDouble : SenderDouble,MPISender {
00103   };
00104 
00105   interface MPISenderInt : SenderInt,MPISender {
00106   };
00107 
00108   interface SocketSender : Sender {
00109     typedef struct Parameter {
00110       unsigned long lstart;
00111       unsigned long lend;
00112       unsigned long myport;
00113      string internet_address;
00114     } param;
00115     param getParam();
00116     void initCom() raises(SALOME_Exception);
00117     void acceptCom() raises(SALOME_Exception);
00118     void closeCom();
00119     void endOfCom() raises(SALOME_Exception);
00120     void send();
00121   };
00122 
00123   interface SocketSenderDouble : SenderDouble,SocketSender {
00124   };
00125 
00126   interface SocketSenderInt : SenderInt,SocketSender {
00127   };
00128 
00129   interface Matrix {
00130     SenderDouble getData();
00131     long getSizeOfColumn();
00132     void release();
00133   };
00134 };
00135 
00136 #endif