Back to index

salome-kernel  6.5.0
Public Member Functions | Private Attributes
Param_Double_Port_uses_i Class Reference

#include <Param_Double_Port_uses_i.hxx>

Collaboration diagram for Param_Double_Port_uses_i:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Param_Double_Port_uses_i (Engines_ParallelDSC_i *par_compo, std::string port_name, CORBA::ORB_ptr orb)
virtual ~Param_Double_Port_uses_i ()
virtual void add_port_to_component ()
virtual void start_port ()
void configure_port_method_put (int totalNbElt)
void put (const Ports::Param_Double_Port::seq_double &param_data)
void get_results (Ports::Param_Double_Port::seq_double_out param_results)

Private Attributes

CORBA::ORB_var _orb
std::string _port_name
Engines_ParallelDSC_i_par_compo
Ports::Param_Double_Port_var _proxy_port
PortProperties_i_fake_properties
Ports::PortProperties_var _fake_prop_ref
Ports::PaCO_Param_Double_Port * _provides_port

Detailed Description

Definition at line 36 of file Param_Double_Port_uses_i.hxx.


Constructor & Destructor Documentation

Param_Double_Port_uses_i::Param_Double_Port_uses_i ( Engines_ParallelDSC_i par_compo,
std::string  port_name,
CORBA::ORB_ptr  orb 
)

Definition at line 26 of file Param_Double_Port_uses_i.cxx.

{
  _orb = CORBA::ORB::_duplicate(orb);
  _fake_properties = new PortProperties_i();
  _fake_prop_ref = _fake_properties->_this();
  _fake_properties->_remove_ref();

  _par_compo = par_compo;
  _port_name = port_name;
  _provides_port = NULL;

  paco_fabrique_manager * pfm = paco_getFabriqueManager();
  pfm->register_comScheduling("Param_Double_Port_uses_i_direct", new paco_direct_fabrique());
  pfm->register_distribution("Param_Double_Port_uses_i_GaBro", new GaBro_fab());
  pfm->register_distribution("Param_Double_Port_uses_i_BasicBC", new BasicBC_fab());
}

Definition at line 45 of file Param_Double_Port_uses_i.cxx.

{
  if (_provides_port)
  {
    _provides_port->stop();
    delete _provides_port;
  }
}

Member Function Documentation

Definition at line 55 of file Param_Double_Port_uses_i.cxx.

{
    _par_compo->add_uses_port("IDL:Ports/Param_Double_Port:1.0", 
                              _port_name.c_str(),
                              _fake_prop_ref);
}

Here is the call graph for this function:

Definition at line 95 of file Param_Double_Port_uses_i.cxx.

{
  ParallelMethodContext * method_ptr;
  method_ptr = _provides_port->getParallelMethodContext("put");
  BasicBC * dislib = (BasicBC *) method_ptr->getDistLibArg("param_data", "in");
  dislib->setTotalNbElt(totalNbElt);
}
void Param_Double_Port_uses_i::get_results ( Ports::Param_Double_Port::seq_double_out  param_results)

Definition at line 110 of file Param_Double_Port_uses_i.cxx.

{
  _provides_port->get_results(param_results);
}

Definition at line 104 of file Param_Double_Port_uses_i.cxx.

{
  _provides_port->put(param_data);
}

Definition at line 63 of file Param_Double_Port_uses_i.cxx.

{
  Engines::DSC::uses_port * uport = _par_compo->get_uses_port(_port_name.c_str());  
  _proxy_port =  Ports::Param_Double_Port::_narrow((*uport)[0]);
  _provides_port = Ports::PaCO_Param_Double_Port::PaCO_narrow(_proxy_port, _orb);
  _provides_port->copyClientGlobalContext(_par_compo);
  _provides_port->init(_par_compo->getMyRank(), _par_compo->getTotalNode());
  
  // Il faut maintenant configurer les bibliothèques
  // de redistributions de la fonction put
  ParallelMethodContext * method_ptr;
  method_ptr = _provides_port->getParallelMethodContext("put");
  method_ptr->setLibComScheduling("Param_Double_Port_uses_i_direct"); 
  method_ptr->setDistLibArg("param_data", "Param_Double_Port_uses_i_BasicBC", "in");
  BasicBC * dislib = (BasicBC *) method_ptr->getDistLibArg("param_data", "in");
  dislib->setEltSize(sizeof(CORBA::Double));
  dislib->setBlocSize(0); // BLOC
  dislib->setNodeRank(_par_compo->getMyRank());

  // Il faut maintenant configurer les bibliothèques
  // de redistributions de la fonction get_results
  method_ptr = _provides_port->getParallelMethodContext("get_results");
  method_ptr->setLibComScheduling("Param_Double_Port_uses_i_direct"); 
  method_ptr->setDistLibArg("param_results", "Param_Double_Port_uses_i_GaBro", "out");
  GaBro * dislib_gabro = (GaBro *) method_ptr->getDistLibArg("param_results", "out");
  dislib_gabro->setEltSize(sizeof(CORBA::Double));

  _provides_port->start();
  delete uport;
}

Here is the call graph for this function:


Member Data Documentation

Ports::PortProperties_var Param_Double_Port_uses_i::_fake_prop_ref [private]

Definition at line 59 of file Param_Double_Port_uses_i.hxx.

Definition at line 58 of file Param_Double_Port_uses_i.hxx.

CORBA::ORB_var Param_Double_Port_uses_i::_orb [private]

Definition at line 54 of file Param_Double_Port_uses_i.hxx.

Definition at line 56 of file Param_Double_Port_uses_i.hxx.

std::string Param_Double_Port_uses_i::_port_name [private]

Definition at line 55 of file Param_Double_Port_uses_i.hxx.

Ports::PaCO_Param_Double_Port* Param_Double_Port_uses_i::_provides_port [private]

Definition at line 60 of file Param_Double_Port_uses_i.hxx.

Ports::Param_Double_Port_var Param_Double_Port_uses_i::_proxy_port [private]

Definition at line 57 of file Param_Double_Port_uses_i.hxx.


The documentation for this class was generated from the following files: