Back to index

salome-kernel  6.5.0
SALOME_Comm.idl
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00023 #ifndef _SALOME_COMM_IDL_
00024 #define _SALOME_COMM_IDL_
00025 
00026 #include "SALOME_Exception.idl"
00027 
00033 module SALOME {
00034   
00035   enum TypeOfDataTransmitted { _DOUBLE_,_INT_ };
00036 
00037   enum TypeOfCommunication { CORBA_ , MPI_ , SOCKET_ };
00038 
00039   typedef sequence<double> vectorOfDouble;
00040   
00041   typedef sequence<long> vectorOfLong;
00042   
00043   interface MultiCommClass {
00044     void setProtocol(in TypeOfCommunication typ);
00045   };
00046 
00047   interface ServantLifeCycle {
00048     void release();
00049   };
00050 
00051   interface Sender {
00052     TypeOfDataTransmitted getTypeOfDataTransmitted();
00053     void release();
00054   };
00055 
00056   interface SenderDouble : Sender {
00057     SenderDouble buildOtherWithProtocol(in TypeOfCommunication type);
00058   };
00059 
00060   interface SenderInt : Sender {
00061     SenderInt buildOtherWithProtocol(in TypeOfCommunication type);
00062   };
00063 
00064   //No compulsory copy between double and CORBA::Double
00065   interface CorbaDoubleNCSender : SenderDouble {
00066     unsigned long getSize();
00067     vectorOfDouble sendPart(in unsigned long n1,in unsigned long n2);
00068     vectorOfDouble send();
00069   };
00070 
00071   //Compulsory copy between double and CORBA::Double
00072   interface CorbaDoubleCSender : SenderDouble {
00073     unsigned long getSize();
00074     //unsigned long getSize2();
00075     vectorOfDouble sendPart(in unsigned long n1,in unsigned long n2);
00076   };
00077 
00078   //No compulsory copy between int and CORBA::Long
00079   interface CorbaLongNCSender : SenderInt {
00080     unsigned long getSize();
00081     vectorOfLong sendPart(in unsigned long n1,in unsigned long n2);
00082     vectorOfLong send();
00083   };
00084 
00085   //Compulsory copy between int and CORBA::Long
00086   interface CorbaLongCSender : SenderInt {
00087     unsigned long getSize();
00088     vectorOfLong sendPart(in unsigned long n1,in unsigned long n2);
00089   };
00090 
00091   interface MPISender : Sender {
00092     typedef struct Parameter {
00093       unsigned long myproc;
00094       unsigned long tag1;
00095       unsigned long tag2;
00096       string service;
00097     } param;
00098     param getParam();
00099     void send();
00100     void close(in param p);
00101   };
00102 
00103   interface MPISenderDouble : SenderDouble,MPISender {
00104   };
00105 
00106   interface MPISenderInt : SenderInt,MPISender {
00107   };
00108 
00109   interface SocketSender : Sender {
00110     typedef struct Parameter {
00111       unsigned long lstart;
00112       unsigned long lend;
00113       unsigned long myport;
00114      string internet_address;
00115     } param;
00116     param getParam();
00117     void initCom() raises(SALOME_Exception);
00118     void acceptCom() raises(SALOME_Exception);
00119     void closeCom();
00120     void endOfCom() raises(SALOME_Exception);
00121     void send();
00122   };
00123 
00124   interface SocketSenderDouble : SenderDouble,SocketSender {
00125   };
00126 
00127   interface SocketSenderInt : SenderInt,SocketSender {
00128   };
00129 
00130   interface Matrix {
00131     SenderDouble getData();
00132     long getSizeOfColumn();
00133     void release();
00134   };
00135 };
00136 
00137 #endif