-// 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
-//
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-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, or (at your option) any later version.
+//
+// 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 : Andre RIBES, EDF
// $Header:
-
+//
#ifndef _DSC_ENGINES_IDL_
#define _DSC_ENGINES_IDL_
#include "SALOME_Component.idl"
#include "SALOME_Ports.idl"
-/*! \file
- This is a package that contains IDL interfaces that permits to add
- a dynamic port model to the SALOME object model.
+/*! \file DSC_Engines.idl
+ \brief interfaces that permits to add a dynamic port model to the SALOME object model.
*/
module Engines {
of the same interface type. 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 component interface that containes the operations that are needed
+ The interface DSC implements the component interface that contains the operations that are needed
to manage declarations into a component and connections between ports.
These operations are logicaly divided in two parts :
- First part permits to add an get ports of a component.
- Second part permits to connect/disconnect ports.
*/
- interface DSC : Engines::Component {
+ interface DSC : Engines::EngineComponent {
/*--------------------------------------------------------------------------------------------*/
/*-------------------------------------- Types Part ------------------------------------------*/
+ //! a uses port
/*!
This sequence is a uses port. It's a sequence since a uses port can be
connected with x provides port. Sometimes this kind of uses port is called multiple port.
*/
typedef sequence<Ports::Port> uses_port;
+ //! This enumeration is used when the connection of a port (uses or provides) is changed.
/*!
- This enumeration is used when the connection of a port (uses or provides)
- is changed. This information is for the component's user code.
+ This information is for the component's user code.
*/
enum Message {AddingConnection,
RemovingConnection,
ApplicationError};
- /*!
- This exception is raised when a port's name is gived before
- it is added to the component.
- */
+ //! This exception is raised when a port is used before it 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.
- */
+ //! 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.
- */
+ //! This exception is raised when you try to use a port that is not connected.
exception PortNotConnected {};
+ //! This exception is raised if the type of the provides port is bad.
/*!
- This exception is raised if 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.
*/
string received;
};
- /*!
- Port's reference is Nil !
- */
+ //! Port's reference is Nil !
exception NilPort {};
- /*!
- Port's reference is not the right reference.
- */
+ //! Port's reference is not the right reference.
exception BadPortReference {};
- /*!
- Object porperty is not good for the port
- */
+ //! Object property is not good for the port
exception BadProperty {};
/*--------------------------------------------------------------------------------------------*/
/*-------------------------------------- Operation Part --------------------------------------*/
+ //! This operation adds a provides port to the component.
/*!
- This operation adds a provides port to the component.
\param ref port's Corba reference.
\param provides_port_name port's name.
NilPort,
BadProperty);
+ //! This operation adds a uses port to the component.
/*!
- 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
in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
BadProperty);
+ //! Get a provides port of the component.
/*!
- 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
+ If it's the framework that wants the port, the reference has to be given
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
in most of cases only if it is connected (boolean connection_error to true).
PortNotConnected,
BadPortType);
+ //! Get a uses port of the component.
/*!
- 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 obtained if and only if the uses port is connected. The sequence
BadPortType);
+ //! Connect a provides port with a uses port.
/*!
- This operation connects a provides port with a uses port.
\param provides_port_name provides port's name.
*/
void connect_provides_port(in string provides_port_name) raises(PortNotDefined);
+ //! Connect a uses port with a provides port.
/*!
- This operation connects a uses port with a provides port.
\param uses_port_name uses port's name.
\param provides_port_ref provides port's Corba reference.
in Ports::Port provides_port_ref) raises(PortNotDefined,
BadPortType,
NilPort);
+
+ //! Check if a port is connected.
/*!
- This operation tests if a port is connected. You can test
- a uses port or a provides port.
+ You can test a uses port or a provides port.
\param port_name port's name.
\return true if the uses port is connected.
*/
boolean is_connected(in string port_name) raises(PortNotDefined);
+ //! Disconnect a uses port from a provides port.
/*!
- This operation disconnects a uses port to a provides port.
\param provides_port_name provides port's name.
\param message state associated with the disconnection.
in Engines::DSC::Message message) raises(PortNotDefined,
PortNotConnected);
+ //! Disconnect a provides port from a uses port.
/*!
- 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.
in Engines::DSC::Message message) raises(PortNotDefined,
PortNotConnected,
BadPortReference);
+ //! Get port's property object.
/*!
- This operation permits to get port's property object.
\param port_name port's name.
\return properties object's CORBA reference.
*/
interface ConnectionManager {
- /*!
- The Id gived to the disconnect method is bad.
- */
+ //! The Id given to the disconnect method is bad.
exception BadId {};
- /*!
- A connection Id. It's unique.
- */
+ //! A connection Id. It's unique.
typedef short connectionId;
+ //! Connect a uses port with a provides port.
/*!
- This operation connects a uses port with a provides port.
\param uses_component The component that have the uses port.
\param uses_port_name uses port's name.
Engines::DSC::BadPortType,
Engines::DSC::NilPort);
+ //! Release a connection that has been previously created by the ConnectionManager.
/*!
- This operation releases a connection that has been previously created by
- the ConnectionManager.
- \param id The id of the connection previously gived by the connect operation
+ \param id The id of the connection previously given by the connect operation
of the ConnectionManager.
\param message state associated with the disconnection.
*/
void disconnect(in connectionId id,
in Engines::DSC::Message message) raises(Engines::ConnectionManager::BadId,
- Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortReference);
+ Engines::DSC::PortNotDefined,
+ Engines::DSC::PortNotConnected,
+ Engines::DSC::BadPortReference);
- /*!
- Shutdown the ConnectionManager process.
- */
+ //! Shutdown the ConnectionManager process.
oneway void ShutdownWithExit();
- /*!
- Returns the PID of the connection manager
- */
+ //! Return the PID of the connection manager
long getPID();
};
*/
interface Superv_Component : Engines::DSC {
- /*!
- The SUPERV module call this method before starting the service. Thus the service
- can add is dynamics ports before it is started.
+ //! Operation to create the service ports before it is executed
+ /*!
+ YACS module call this method before starting the service. Thus the service
+ can add its dynamics ports before it is started.
\param service_name service's name.
\return true if the service is correctly initialised.
*/
boolean init_service(in string service_name);
- };
-/*--------------------------------------------------------------------------------------------*/
+ struct multiple_param {
+ string name;
+ long number;
+ };
- /*! \brief Interface of a Parallel_DSC component.
- This interface defines the operations needed to add a paco++ port
- into a parallel DSC component.
- */
- interface Parallel_DSC : Engines::Superv_Component, Engines::Parallel_Component {
+ typedef sequence<multiple_param> seq_multiple_param;
/*!
- This operation gives the proxy node of a paco++ port to all the nodes.
- Only a node of the parallel component is going to add a proxy object
- with an internal method.
+ YACS module call this method before starting the service. Thus the service
+ can add its dynamics ports before it is started.
+ This method is also used by YACS to specify for each datastream port (name in multiple_param)
+ how many the service should create a datastream port.
- \param ref provides proxy port's reference.
- \param provides_port_name provides port's name.
-
- \see Engines_ParallelDSC_i::add_parallel_provides_proxy_port
- */
- void set_paco_proxy(in Object ref,
- in string provides_port_name,
- in Ports::PortProperties port_prop);
-
- };
+ For a defined port named: in_data_port, the service should create ports with the names:
+ in_data_port_0, in_data_port_1, ...
+ */
+ boolean init_service_with_multiple(in string service_name, in seq_multiple_param params);
+ };
};
#endif