--- /dev/null
+// Copyright (C) 2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : Calcium_Ports.idl
+// Author : Eric FAYOLLE, EDF
+// $Header:
+
+#ifndef _CALCIUM_PORTS_IDL_
+#define _CALCIUM_PORTS_IDL_
+
+#include "SALOME_Ports.idl"
+
+module Ports {
+
+ module Calcium_Ports {
+
+ typedef sequence<long> seq_long;
+ typedef sequence<float> seq_float;
+ typedef sequence<double> seq_double;
+ typedef sequence<string> seq_string;
+ typedef sequence<boolean> seq_boolean;
+ typedef seq_float seq_complex;
+
+ interface Calcium_Integer_Port : Ports::Data_Port {
+ void put (in seq_long data, in double time, in long tag);
+ };
+
+ interface Calcium_Real_Port : Ports::Data_Port {
+ void put (in seq_float data, in double time, in long tag);
+ };
+
+ interface Calcium_Double_Port : Ports::Data_Port {
+ void put (in seq_double data, in double time, in long tag);
+ };
+
+ interface Calcium_String_Port : Ports::Data_Port {
+ void put (in seq_string data, in double time, in long tag);
+ };
+
+ interface Calcium_Logical_Port : Ports::Data_Port {
+ void put (in seq_boolean data, in double time, in long tag);
+ };
+
+ interface Calcium_Complex_Port : Ports::Data_Port {
+ void put (in seq_complex data, in double time, in long tag);
+ };
+
+ };
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : DSC_Engines.idl
+// Author : André RIBES, EDF
+// $Header:
+
+#ifndef _DSC_ENGINES_IDL_
+#define _DSC_ENGINES_IDL_
+
+#include "SALOME_Component.idl"
+#include "SALOME_Ports.idl"
+
+/*! \brief
+ This file contains the IDL interfaces that permits a component and port model to the
+ Corba object model. This extension is based on the same ideas
+ about dynamic port declaration followed by the CCA.
+ */
+module Engines {
+
+ /*! \interface DSC
+ This interface defines the operations needed to add the dynamic port declaration and
+ the component model.
+
+ A component is a black that interacts with other components only by its ports. A port
+ represent a point of connection for a component. In the CORBA case, a port represent
+ an interface. There is two ways for a component to interact with an interface :
+ - It implements the interface : it means "the component provides this interface". That's
+ why there is provides ports. A provides port provides an interface to other components.
+ - It uses the interface. That's why there is uses ports. A uses port can be connected with
+ a provides port. When the connection is done, a component can use the uses port to use the
+ interface provided by the provides port.
+
+ The interface DSC implements the components and the differents operations that are needed
+ to manage declarations and connections between components and ports.
+
+ These operations are logicaly divided in two parts :
+ - first part permits to add an get ports into a component
+ - second part permits to connect/disconnect ports.
+ */
+ interface DSC : Engines::Component {
+
+/*--------------------------------------------------------------------------------------------*/
+/*-------------------------------------- Types Part ------------------------------------------*/
+
+ /*!
+ This sequence is a uses port. It's a sequence since a uses port can be
+ connected with n provides port. Sometines this kind of uses port is called multiple port.
+ At this programming level, the user has to deal with the sequence. In the DSC user
+ interface, the user deals with only one pointer.
+ */
+ typedef sequence<Ports::Port> uses_port;
+
+ /*!
+ This enumeration is used when the connection of a port (uses or provides)
+ is changed. Actually, this information is for the user code that implements the
+ component.
+ */
+ enum Message {AddingConnection,
+ RemovingConnection,
+ ApplicationError};
+
+ /*!
+ This exception is raised when a port's name is gived before
+ is added to the component.
+ */
+ exception PortNotDefined {};
+
+ /*!
+ This exception is raised if you try to add a port with the same
+ name than a previous defined port.
+ */
+ exception PortAlreadyDefined {};
+
+ /*!
+ This exception is raised when you try to use a port that is not connected.
+ */
+ exception PortNotConnected {};
+
+ /*!
+ This exception is raised is the type of the provides port is bad.
+ This exception contains a string that gives what type is expected
+ and the type that the operation received.
+ */
+ exception BadPortType {
+ string expected;
+ string received;
+ };
+
+ /*!
+ Port's reference is Nil !
+ */
+ exception NilPort {};
+
+ /*!
+ Port's reference is not good for the operation
+ */
+ exception BadPortReference {};
+
+ /*!
+ Port is disconnected and someone is using it.
+ */
+ exception PortDisconnected {};
+
+ exception BadProperty {};
+
+
+/*--------------------------------------------------------------------------------------------*/
+/*-------------------------------------- Operation Part --------------------------------------*/
+
+ /*!
+ This operation adds a provides port to the component.
+
+ \param ref port's Corba reference.
+ \param provides_port_name port's name.
+
+ \exception PortAlreadyDefined
+ \exception NilPort
+
+ \note Notice that the name of the port is unique on the component. So if there is
+ a uses port that has the same the PorAlreadyDefined exception will be throw.
+ */
+ void add_provides_port(in Ports::Port ref,
+ in string provides_port_name,
+ in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
+ NilPort,
+ BadProperty);
+
+ /*!
+ This operation adds a uses port to the component.
+
+ \param repository_id port's Corba repository id.
+ Eg : IDL:toto.tata/MODULE/INTERFACE_NAME:1.0
+ \param uses_port_name port's name.
+
+ \exception PortAlreadyDefined
+
+ \note Notice that the name of the port is unique on the component. So if there is
+ a provides port that has the same the PorAlreadyDefined exception will be throw.
+ */
+ void add_uses_port(in string repository_id,
+ in string uses_port_name,
+ in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
+ BadProperty);
+
+ /*!
+ This operation is used to get a provides port of the component.
+ It can be used by the framework or the component himself.
+
+ If it's the framework that wants the port, the reference has to be gived
+ even if the port is not connected (boolean connection_error to false).
+ Contrary if it's the component that wants the port, the port is given
+ only if it is connected (boolean connection_error to true). Notice that you can
+ choose the behaviour that you want. In the DSC_User layer, the user code has no
+ choice.
+
+ \param provides_port_name port's name.
+ \param connection_error true if you want to wait that the port is connected with
+ an another port.
+ \return port's Corba reference.
+
+ \exception PortNotDefined
+ \exception PortNotConnected
+ \exception BadPortType
+
+ */
+ Ports::Port get_provides_port(in string provides_port_name,
+ in boolean connection_error) raises(PortNotDefined,
+ PortNotConnected,
+ BadPortType);
+
+ /*!
+ This operation is used to get a uses port of the component.
+ It can be used by the framework or the component himself.
+ Actually, only the user layer of the component will use this operation.
+ A uses port could be obtain if and only if the uses port is connected. The sequence
+ contains all the connections since a uses port can have multiple connections.
+
+ There is a system of callbacks to prevent the user code that there is a new
+ (or a deletion) connection (see DSC_Callbacks class).
+
+ \param uses_port_name port's name.
+ \return port's Corba reference.
+
+ \see DSC_Callbacks
+
+ \exception PortNotDefined
+ \exception PortNotConnected
+ \exception BadPortType
+ */
+ uses_port get_uses_port(in string uses_port_name) raises(PortNotDefined,
+ PortNotConnected,
+ BadPortType);
+
+
+ /*!
+ This operation connects a provides port with a uses port.
+
+ \param provides_port_name provides port's name.
+
+ \exception PortAlreadyConnected
+ \exception PortNotDefined
+ */
+
+ void connect_provides_port(in string provides_port_name) raises(PortNotDefined);
+ /*!
+ This operation connects a uses port with a provides port.
+
+ \param ref provides port's Corba reference.
+ \param uses_port_name uses port's name.
+
+ \exception PortNotDefined
+ \exception BadPortType
+ \exception NilPort
+ */
+ void connect_uses_port(in string uses_port_name,
+ in Ports::Port provides_port_ref) raises(PortNotDefined,
+ BadPortType,
+ NilPort);
+ /*!
+ This operation tests if a port is connected.
+
+ \param port_name uses port's name.
+ \return true if the uses port is connected.
+
+ \exception PortNotDefined
+ */
+ boolean is_connected(in string port_name) raises(PortNotDefined);
+
+ /*!
+ This operation disconnects a uses port to a provides port.
+
+ \param provides_port_name provides port's name.
+ \param message state associated with the deconnection.
+
+ \exception PortNotDefined
+ \exception PortNotConnected
+ */
+ void disconnect_provides_port(in string provides_port_name,
+ in Engines::DSC::Message message) raises(PortNotDefined,
+ PortNotConnected);
+
+ /*!
+ This operation disconnects a provides port to a uses port.
+
+ \param uses_port_name uses port's name.
+ \param provides_port_ref CORBA reference of the provides port.
+ \param message state associated with the deconnection.
+
+ \exception PortNotDefined
+ \exception PortNotConnected
+ \exception BadPortReference
+ */
+ void disconnect_uses_port(in string uses_port_name,
+ in Ports::Port provides_port_ref,
+ in Engines::DSC::Message message) raises(PortNotDefined,
+ PortNotConnected,
+ BadPortReference);
+
+ Ports::PortProperties get_port_properties(in string port_name) raises(PortNotDefined);
+
+ };
+
+ /*!
+ \interface ConnectionManager
+ This interface defines a helper object for connection operations.
+ The ConnectionManager is used like other services of Salomé.
+ */
+ interface ConnectionManager {
+
+ exception BadId {};
+
+ typedef short connectionId;
+
+ /*!
+ This operation connect a uses port with a provides port.
+
+ \param uses_component The component that have the uses port.
+ \param uses_port_name port's uses name.
+ \param provides_component The component that have the provides port.
+ \param provides_port_name port's provides name.
+
+ \exception Engines::DSC::PortNotDefined
+ \exception Engines::DSC::BadPortType
+ \exception Engines::DSC::NilPort
+
+ \return the id of the connection that the ConnectionManager will use
+ to release this connection when the framework will call disconnect.
+ */
+ connectionId connect(in Engines::DSC uses_component,
+ in string uses_port_name,
+ in Engines::DSC provides_component,
+ in string provides_port_name) raises(Engines::DSC::PortNotDefined,
+ Engines::DSC::BadPortType,
+ Engines::DSC::NilPort);
+
+ /*!
+ This operation release a connection that has been previously created by
+ the ConnectionManager.
+
+ \param id The id of the connection previously gived by the connect operation
+ of the ConnectionManager.
+ \param message state associated with the deconnection.
+ */
+ void disconnect(in connectionId id,
+ in Engines::DSC::Message message) raises(Engines::ConnectionManager::BadId);
+
+ };
+
+/*--------------------------------------------------------------------------------------------*/
+
+ /*! \interface Superv_Component
+ This interface is a component that contains services for the Salomé module SUPERV.
+ This interface contains methods that are only in local (so they are described
+ and explained in the implementation class). These methods give access to data-oriented
+ ports provided by default by Salomé.
+ */
+ interface Superv_Component : Engines::DSC {
+ /*!
+ The SUPERV module call this method before starting the service. Thus the service
+ can add is dynamics ports before is started.
+
+ \param service_name service's name.
+ \return true if the service is correctly initialised.
+ */
+ boolean init_service(in string service_name);
+ };
+
+/*--------------------------------------------------------------------------------------------*/
+
+ /*! \interface Parallel_DSC
+ This interface defines the operations needed to add a paco++ port
+ into a parallel component in Salomé.
+ */
+ interface Parallel_DSC : Engines::DSC {
+
+ /*!
+ This operation gives the proxy node of a paco++ port
+ to all the nodes.
+
+ L'idée ici est qu'un seul des noeuds du composant parallèle
+ enregistre le proxy, qui appelle ensuite set_paco_proxy sur tous les autres noeuds.
+
+ \param ref provides proxy port's reference.
+ \param name provides port's name.
+ */
+ void set_paco_proxy(in Object ref,
+ in string provides_port_name);
+ boolean init_service(in string service_name);
+
+ };
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOME_Ports.idl
+// Author : André RIBES, EDF
+// $Header:
+
+#ifndef _SALOME_PORTS_IDL_
+#define _SALOME_PORTS_IDL_
+
+/*! \brief
+ This file contains the IDL declarations of the ports provided by the
+ Salomé Runtime.
+ */
+
+module Ports {
+
+ /*!
+ \interface Port
+ This interface (currently empty) defines a Port.
+ A port is a Corba interface.
+ */
+ interface Port {};
+
+ exception NotDefined {};
+ exception BadType {};
+
+ /*! \interface PortProperties
+ This interface permits to set and get properties
+ associeted to a port. Each uses or provides port have a
+ PortProperties object. But this object could be empty
+ */
+ interface PortProperties {
+ void set_property(in string name, in any value) raises (Ports::BadType,
+ Ports::NotDefined);
+ any get_property(in string name) raises (Ports::NotDefined);
+ };
+
+ /*!
+ \interface Control_Port
+ This interface (currently empty) defines a Control Port.
+ When a component uses his control port, it says that the service associated
+ to the port can be started.
+ */
+ interface Control_Port : Ports::Port {};
+
+ /*!
+ \interface Data_Port
+ This interface (currently empty) defines a Data Port.
+ A Data Port is a port that transmit wihtout any informations
+ about control. So the service associated to the port could or could not
+ be started.
+
+ Each Data Port has a Put operation for the emitter and a Get operation
+ fot the receiver.
+ */
+ interface Data_Port : Ports::Port {};
+
+ /*!
+ \interface Data_And_Control_Port
+ This interface (currently empty) defines a combination of
+ a Control_Port and a Data_Port.
+ */
+ interface Data_And_Control_Port : Ports::Port {};
+};
+
+#endif