]> SALOME platform Git repositories - modules/kernel.git/blob - idl/SALOME_Ports.idl
Salome HOME
Calcium and Palm ok
[modules/kernel.git] / idl / SALOME_Ports.idl
1 //  Copyright (C) 2007  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/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : SALOME_Ports.idl
21 //  Author : André RIBES, EDF
22 //  $Header:
23
24 #ifndef _SALOME_PORTS_IDL_
25 #define _SALOME_PORTS_IDL_
26
27 /*! \file
28   This file contains the IDL declarations of the kind of ports provided by the 
29   SALOME component model.
30  */
31
32 module Ports {
33   
34   /*! \brief Interface of a DSC Port.
35     This interface defines a Port.
36     A port is a CORBA interface.
37   */
38   interface Port {};
39
40   /*! \brief Interface of a Control_Port.
41     This interface defines a Control Port. When a component uses a control port, 
42     it says that the service associated to the provides port can be started.
43
44     \note Currently Control_Port can not employed since it is not recognized 
45     by the supervisor. But this type can be used to classified the port.
46   */
47   interface Control_Port : Ports::Port {};
48   
49   /*! \brief Interface a Data_Port.
50     This interface defines a Data Port.
51     A Data Port is a port that transmit data between two components.
52
53     Each Data Port has a Put operation for the emitter and a Get operation 
54     for the receiver.
55
56     \note Data_Port is currently empty but it permits to identified 
57     the behaviour of a port.
58   */
59   interface Data_Port : Ports::Port {};
60
61   /*! \brief Data_And_Control_Port.
62     This interface defines a combination of a Control_Port and a Data_Port.
63
64     \note Like Control_Port, Data_And_Control_Port  can not employed since it is 
65     not recognized by the supervisor. But this type can be used to classified the port.
66   */
67   interface Data_And_Control_Port : Ports::Port {};
68
69   /*!
70     This exception indicates that the property doesn't not exist.
71   */
72   exception NotDefined {};
73
74   /*!
75     This exception indicates that the value gived to the property is not
76     of a good type.
77   */
78   exception BadType {};
79
80   /*! \brief Interface of a PortProperties.
81     This interface permits to set and get properties
82     associated to a port. Each uses or provides port have a 
83     PortProperties object. But this object could be empty.
84   */
85   interface PortProperties {
86     
87     /*!
88       This operation permits to set a value of a property.
89
90       \param name property's name.
91       \param value value of the property.
92
93       \exception Ports::BadType
94       \exception Ports::NotDefined
95     */
96     void set_property(in string name, in any value) raises (Ports::BadType, 
97                                                             Ports::NotDefined);
98
99     /*!
100       This operation permits to get property's value.
101
102       \param name property's name.
103       \return value of the property.
104
105       \exception Ports::NotDefined
106     */
107     any  get_property(in string name) raises (Ports::NotDefined);
108   };
109
110   /*! \brief Interface of a basic datastream short port
111     This interface defines a Data_Port that transmit a CORBA::Short.
112     This interface can be seen as an example of an integration of 
113     a port in the DSC_User programming model.
114   */
115   interface Data_Short_Port : Ports::Data_Port {
116     void put(in short data);
117   };
118 };
119
120 #endif