Version: 9.15.0
Engines_DSC_interface Class Referenceabstract

This class implements the interface Engines::DSC. More...

#include <DSC_interface.hxx>

Inheritance diagram for Engines_DSC_interface:

Data Structures

struct  port_t
 

Public Member Functions

 Engines_DSC_interface ()
 
virtual ~Engines_DSC_interface ()
 
virtual void add_provides_port (Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
 
virtual void add_uses_port (const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop)
 
virtual Ports::Port_ptr get_provides_port (const char *provides_port_name, const CORBA::Boolean connection_error)
 
virtual Engines::DSC::uses_portget_uses_port (const char *uses_port_name)
 
virtual void connect_provides_port (const char *provides_port_name)
 
virtual void connect_uses_port (const char *uses_port_name, Ports::Port_ptr provides_port_ref)
 
virtual CORBA::Boolean is_connected (const char *port_name)
 
virtual void disconnect_provides_port (const char *provides_port_name, const Engines::DSC::Message message)
 
virtual void disconnect_uses_port (const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message)
 
virtual Ports::PortProperties_ptr get_port_properties (const char *port_name)
 
virtual void provides_port_changed (const char *provides_port_name, int connection_nbr, const Engines::DSC::Message message)=0
 This method is used by the component when the number of connection on a provides port changes. More...
 
virtual void uses_port_changed (const char *uses_port_name, Engines::DSC::uses_port *new_uses_port, const Engines::DSC::Message message)=0
 This method is used by the component when the number of connection on a uses port changes. More...
 

Static Public Member Functions

static void writeEvent (const char *request, const std::string &containerName, const char *instance_name, const char *port_name, const char *error, const char *message)
 Write a record in the trace file. More...
 

Protected Types

enum  port_type { uses , provides , none }
 
typedef std::map< std::string, port_t * > ports
 

Protected Attributes

ports my_ports
 
ports::iterator my_ports_it
 

Detailed Description

This class implements the interface Engines::DSC.

This class is used by the sequential DSC implementation and the parallel DSC implementation.

Member Typedef Documentation

◆ ports

typedef std::map<std::string, port_t *> Engines_DSC_interface::ports
protected

Member Enumeration Documentation

◆ port_type

Enumerator
uses 
provides 
none 

Constructor & Destructor Documentation

◆ Engines_DSC_interface()

Engines_DSC_interface::Engines_DSC_interface ( )

◆ ~Engines_DSC_interface()

Engines_DSC_interface::~Engines_DSC_interface ( )
virtual

References my_ports, and my_ports_it.

Member Function Documentation

◆ add_provides_port()

◆ add_uses_port()

◆ connect_provides_port()

void Engines_DSC_interface::connect_provides_port ( const char *  provides_port_name)
virtual
See also
Engines::DSC::connect_provides_port
Note
This method uses Callbacks mechanism to inform the provides port how much uses ports are connected with. Currently, the provides port doesn't know its uses ports references. It's framework or application role to manage connections between ports.

Reimplemented in Engines_ParallelDSC_i, and Engines_DSC_i.

References Engines::DSC::AddingConnection, my_ports, my_ports_it, provides, and DSC_Callbacks::provides_port_changed().

Referenced by Engines_DSC_i::connect_provides_port(), and Engines_ParallelDSC_i::connect_provides_port().

◆ connect_uses_port()

void Engines_DSC_interface::connect_uses_port ( const char *  uses_port_name,
Ports::Port_ptr  provides_port_ref 
)
virtual

◆ disconnect_provides_port()

void Engines_DSC_interface::disconnect_provides_port ( const char *  provides_port_name,
const Engines::DSC::Message  message 
)
virtual
See also
Engines::DSC::disconnect_provides_port
Note
This method uses Callbacks mechanism to inform the provides port how much uses ports are connected with. Currently, the provides port doesn't know its uses ports references. It's framework or application role to manage connections between ports.

Reimplemented in Engines_ParallelDSC_i, and Engines_DSC_i.

References my_ports, my_ports_it, provides, and DSC_Callbacks::provides_port_changed().

Referenced by Engines_DSC_i::disconnect_provides_port(), and Engines_ParallelDSC_i::disconnect_provides_port().

◆ disconnect_uses_port()

void Engines_DSC_interface::disconnect_uses_port ( const char *  uses_port_name,
Ports::Port_ptr  provides_port_ref,
const Engines::DSC::Message  message 
)
virtual
See also
Engines::DSC::disconnect_uses_port
Note
This method uses Callbacks mechanism to inform the uses port how much provides ports are connected with.
Warning
The new sequence of the uses port is sended by the callback. The old sequence is not destoyed. Is uses port user's role to destroy the sequence.

Reimplemented in Engines_ParallelDSC_i, and Engines_DSC_i.

References my_ports, my_ports_it, uses, and DSC_Callbacks::uses_port_changed().

Referenced by Engines_DSC_i::disconnect_uses_port(), and Engines_ParallelDSC_i::disconnect_uses_port().

◆ get_port_properties()

Ports::PortProperties_ptr Engines_DSC_interface::get_port_properties ( const char *  port_name)
virtual

◆ get_provides_port()

Ports::Port_ptr Engines_DSC_interface::get_provides_port ( const char *  provides_port_name,
const CORBA::Boolean  connection_error 
)
virtual

◆ get_uses_port()

◆ is_connected()

CORBA::Boolean Engines_DSC_interface::is_connected ( const char *  port_name)
virtual

◆ provides_port_changed()

virtual void DSC_Callbacks::provides_port_changed ( const char *  provides_port_name,
int  connection_nbr,
const Engines::DSC::Message  message 
)
pure virtualinherited

This method is used by the component when the number of connection on a provides port changes.

This information helps the user code to detect operation on its ports.

Parameters
provides_port_namethe name of the provides name that has changed.
connection_nbrthe new number of connection on the provides port.
messagecontains informations about the modification of the port.

Implemented in Superv_Component_i.

Referenced by connect_provides_port(), and disconnect_provides_port().

◆ uses_port_changed()

virtual void DSC_Callbacks::uses_port_changed ( const char *  uses_port_name,
Engines::DSC::uses_port new_uses_port,
const Engines::DSC::Message  message 
)
pure virtualinherited

This method is used by the component when the number of connection on a uses port changes.

This information helps the user code to detect operation on its ports.

Parameters
uses_port_namethe name of the uses name that has changed.
new_uses_portthe new sequence representing the uses port.
messagecontains informations about the modification of the port.

Implemented in Superv_Component_i.

Referenced by connect_uses_port(), and disconnect_uses_port().

◆ writeEvent()

void Engines_DSC_interface::writeEvent ( const char *  request,
const std::string &  containerName,
const char *  instance_name,
const char *  port_name,
const char *  error,
const char *  message 
)
static

Write a record in the trace file.

Parameters
requestthe name of the request executed
containerNamethe name of the container where the request is executed
instance_namethe name of the component where the request is executed
port_namethe name of the port that is concerned
errorif an error has occured, a string that identifies the error
messageinformations about error or about the request

References SALOME_ContainerPy::containerName, IDLparser::error(), initTrace(), TestMinimalExample::msg, out, traceLevel, and traceType.

Referenced by create_calcium_port(), CalciumInterface::ecp_cd(), CalciumInterface::ecp_ecriture(), CalciumInterface::ecp_effi(), CalciumInterface::ecp_efft(), CalciumInterface::ecp_fin(), CalciumInterface::ecp_fini(), CalciumInterface::ecp_fint(), CalciumInterface::ecp_lecture(), GenericPort< DataManipulator, COUPLING_POLICY >::get(), and GenericPort< DataManipulator, COUPLING_POLICY >::next().

Field Documentation

◆ my_ports

◆ my_ports_it