General KERNEL Documentation     End User KERNEL Services  


idl/SALOME_Comm.idl

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