Salome HOME
merge from branch BR_V5_DEV
[modules/yacs.git] / idl / SALOME_Ports.idl
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SALOME_Ports.idl
23 //  Author : Andre RIBES, EDF
24 //  $Header:
25 //
26 #ifndef _SALOME_PORTS_IDL_
27 #define _SALOME_PORTS_IDL_
28
29 /*! \file
30   This file contains the IDL declarations of the kind of ports provided by the 
31   SALOME component model.
32  */
33
34 module Ports {
35   
36   /*! \brief Interface of a DSC Port.
37     This interface defines a Port.
38     A port is a CORBA interface.
39   */
40   interface Port {};
41
42   /*! \brief Interface of a Control_Port.
43     This interface defines a Control Port. When a component uses a control port, 
44     it says that the service associated to the provides port can be started.
45
46     \note Currently Control_Port can not employed since it is not recognized 
47     by the supervisor. But this type can be used to classified the port.
48   */
49   interface Control_Port : Ports::Port {};
50   
51   /*! \brief Interface a Data_Port.
52     This interface defines a Data Port.
53     A Data Port is a port that transmit data between two components.
54
55     Each Data Port has a Put operation for the emitter and a Get operation 
56     for the receiver.
57
58     \note Data_Port is currently empty but it permits to identified 
59     the behaviour of a port.
60   */
61   interface Data_Port : Ports::Port {};
62
63   /*! \brief Data_And_Control_Port.
64     This interface defines a combination of a Control_Port and a Data_Port.
65
66     \note Like Control_Port, Data_And_Control_Port  can not employed since it is 
67     not recognized by the supervisor. But this type can be used to classified the port.
68   */
69   interface Data_And_Control_Port : Ports::Port {};
70
71   /*!
72     This exception indicates that the property doesn't not exist.
73   */
74   exception NotDefined {};
75
76   /*!
77     This exception indicates that the given value to the property is not
78     of a good type.
79   */
80   exception BadType {};
81
82   /*!
83     This exception indicates that the given value to the property is not
84     authorized.
85   */
86   exception BadValue {};
87
88   /*! \brief Interface of a PortProperties.
89     This interface permits to set and get properties
90     associated to a port. Each uses or provides port have a 
91     PortProperties object. But this object could be empty.
92   */
93   interface PortProperties {
94     
95     /*!
96       This operation permits to set a value of a property.
97
98       \param name property's name.
99       \param value value of the property.
100
101       \exception Ports::BadType
102       \exception Ports::NotDefined
103     */
104     void set_property(in string name, in any value) raises (Ports::BadType,
105                                                             Ports::BadValue,
106                                                             Ports::NotDefined);
107
108     /*!
109       This operation permits to get property's value.
110
111       \param name property's name.
112       \return value of the property.
113
114       \exception Ports::NotDefined
115     */
116     any  get_property(in string name) raises (Ports::NotDefined);
117   };
118
119   /*! \brief Interface of a basic datastream short port
120     This interface defines a Data_Port that transmit a CORBA::Short.
121     This interface can be seen as an example of an integration of 
122     a port in the DSC_User programming model.
123   */
124   interface Data_Short_Port : Ports::Data_Port {
125     void put(in short data);
126   };
127 };
128
129 #endif