This class implements the interface Engines::DSC. More...
Public Member Functions | |
Engines_DSC_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId *contId, const char *instanceName, const char *interfaceName, bool notif=false) | |
Engines_DSC_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, Engines::Container_ptr container, const char *instanceName, const char *interfaceName, bool notif=false, bool regist=true) | |
virtual void | add_provides_port (Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::NilPort, Engines::DSC::BadProperty) |
virtual void | add_uses_port (const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::BadProperty) |
virtual Ports::Port_ptr | get_provides_port (const char *provides_port_name, const CORBA::Boolean connection_error) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) |
virtual Engines::DSC::uses_port * | get_uses_port (const char *uses_port_name) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) |
virtual void | connect_provides_port (const char *provides_port_name) throw (Engines::DSC::PortNotDefined) |
virtual void | connect_uses_port (const char *uses_port_name, Ports::Port_ptr provides_port_ref) throw (Engines::DSC::PortNotDefined, Engines::DSC::BadPortType, Engines::DSC::NilPort) |
virtual CORBA::Boolean | is_connected (const char *port_name) throw (Engines::DSC::PortNotDefined) |
virtual void | disconnect_provides_port (const char *provides_port_name, const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) |
virtual void | disconnect_uses_port (const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected, Engines::DSC::BadPortReference) |
virtual Ports::PortProperties_ptr | get_port_properties (const char *port_name) throw (Engines::DSC::PortNotDefined) |
char * | instanceName () |
char * | interfaceName () |
void | ping () |
void | destroy () |
CORBA::Long | getStudyId () |
Engines::Container_ptr | GetContainerRef () |
void | setProperties (const Engines::FieldsDict &dico) |
Engines::FieldsDict * | getProperties () |
void | Names (const char *graphName, const char *nodeName) |
bool | Kill_impl () |
bool | Stop_impl () |
bool | Suspend_impl () |
bool | Resume_impl () |
CORBA::Long | CpuUsed_impl () |
virtual Engines::TMPFile * | DumpPython (CORBA::Object_ptr theStudy, CORBA::Boolean isPublished, CORBA::Boolean &isValidScript) |
virtual Engines::Salome_file_ptr | getInputFileToService (const char *service_name, const char *Salome_file_name) |
virtual Engines::Salome_file_ptr | getOutputFileToService (const char *service_name, const char *Salome_file_name) |
virtual void | checkInputFilesToService (const char *service_name) |
virtual Engines::Salome_file_ptr | setInputFileToService (const char *service_name, const char *Salome_file_name) |
virtual void | checkOutputFilesToService (const char *service_name) |
virtual Engines::Salome_file_ptr | setOutputFileToService (const char *service_name, const char *Salome_file_name) |
virtual bool | hasObjectInfo () |
virtual char * | getObjectInfo (CORBA::Long studyId, const char *entry) |
PortableServer::ObjectId * | getId () |
Engines_Container_i * | GetContainerPtr () |
std::string | getContainerName () |
virtual bool | setStudyId (CORBA::Long studyId) |
void | beginService (const char *serviceName) |
void | endService (const char *serviceName) |
void | sendMessage (const char *event_type, const char *message) |
char * | graphName () |
char * | nodeName () |
bool | Killer (pthread_t ThreadId, int signum) |
void | SetCurCpu () |
long | CpuUsed () |
void | CancelThread () |
virtual void | configureSalome_file (std::string service_name, std::string file_port_name, Salome_file_i *file) |
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. | |
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. | |
Static Public Member Functions | |
static bool | isMultiStudy () |
static bool | isMultiInstance () |
static std::string | GetDynLibraryName (const char *componentName) |
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. | |
Protected Types | |
typedef std::map< std::string, Salome_file_i * > | _t_Salome_file_map |
typedef std::map< std::string, Engines_Component_i::_t_Salome_file_map * > | _t_Service_file_map |
enum | port_type { uses, provides, none } |
typedef std::map< std::string, port_t * > | ports |
Protected Attributes | |
int | _studyId |
std::string | _instanceName |
std::string | _interfaceName |
CORBA::ORB_var | _orb |
PortableServer::POA_var | _poa |
PortableServer::ObjectId * | _id |
PortableServer::ObjectId * | _contId |
Engines::Container_var | _container |
Engines_Component_i * | _thisObj |
RegistryConnexion * | _myConnexionToRegistry |
NOTIFICATION_Supplier * | _notifSupplier |
std::map< std::string, CORBA::Any > | _fieldsDict |
_t_Service_file_map | _Input_Service_file_map |
_t_Service_file_map | _Output_Service_file_map |
_t_Service_file_map::iterator | _Service_file_map_it |
_t_Salome_file_map::iterator | _Salome_file_map_it |
std::string | _serviceName |
std::string | _graphName |
std::string | _nodeName |
ports | my_ports |
ports::iterator | my_ports_it |
Static Protected Attributes | |
static bool | _isMultiStudy = true |
static bool | _isMultiInstance = false |
This class implements the interface Engines::DSC.
The implementation of methods are performed by the class Engines_DSC_interface.
virtual void Engines_DSC_i::add_provides_port | ( | Ports::Port_ptr | ref, | |
const char * | provides_port_name, | |||
Ports::PortProperties_ptr | port_prop | |||
) | throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::NilPort, Engines::DSC::BadProperty) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual void Engines_DSC_i::add_uses_port | ( | const char * | repository_id, | |
const char * | uses_port_name, | |||
Ports::PortProperties_ptr | port_prop | |||
) | throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::BadProperty) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual Ports::Port_ptr Engines_DSC_i::get_provides_port | ( | const char * | provides_port_name, | |
const CORBA::Boolean | connection_error | |||
) | throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual Engines::DSC::uses_port* Engines_DSC_i::get_uses_port | ( | const char * | uses_port_name | ) | throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual void Engines_DSC_i::connect_provides_port | ( | const char * | provides_port_name | ) | throw (Engines::DSC::PortNotDefined) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual void Engines_DSC_i::connect_uses_port | ( | const char * | uses_port_name, | |
Ports::Port_ptr | provides_port_ref | |||
) | throw (Engines::DSC::PortNotDefined, Engines::DSC::BadPortType, Engines::DSC::NilPort) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual CORBA::Boolean Engines_DSC_i::is_connected | ( | const char * | port_name | ) | throw (Engines::DSC::PortNotDefined) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual void Engines_DSC_i::disconnect_provides_port | ( | const char * | provides_port_name, | |
const Engines::DSC::Message | message | |||
) | throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual void Engines_DSC_i::disconnect_uses_port | ( | const char * | uses_port_name, | |
Ports::Port_ptr | provides_port_ref, | |||
const Engines::DSC::Message | message | |||
) | throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected, Engines::DSC::BadPortReference) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
virtual Ports::PortProperties_ptr Engines_DSC_i::get_port_properties | ( | const char * | port_name | ) | throw (Engines::DSC::PortNotDefined) [inline, virtual] |
Reimplemented from Engines_DSC_interface.
char * Engines_Component_i::instanceName | ( | ) | [inherited] |
CORBA method: return name of the instance, unique in this Container
char * Engines_Component_i::interfaceName | ( | ) | [inherited] |
CORBA method: return name of the component class
void Engines_Component_i::ping | ( | ) | [inherited] |
CORBA method: Test if instance is alive and responds
void Engines_Component_i::destroy | ( | ) | [inherited] |
CORBA method: Deactivate this instance. CORBA object is deactivated (do not respond any more to CORBA calls), the connection to Regsitry is removed (Registry informed of deactivation), internal server reference counter on the derived servant class is decremented, to allow destruction of the class (delete) by POA, when there are no more references. -- TO BE USED BY CONTAINER ONLY (Container housekeeping) --
CORBA::Long Engines_Component_i::getStudyId | ( | ) | [inherited] |
CORBA method: Get study Id
Engines::Container_ptr Engines_Component_i::GetContainerRef | ( | ) | [inherited] |
CORBA method: return CORBA reference of the Container
void Engines_Component_i::setProperties | ( | const Engines::FieldsDict & | dico | ) | [inherited] |
CORBA method: Gives a sequence of (key=string,value=any) to the component. Base class component stores the sequence in a map. The map is cleared before. This map is for use by derived classes.
dico | sequence of (key=string,value=any) |
Engines::FieldsDict * Engines_Component_i::getProperties | ( | ) | [inherited] |
CORBA method: returns a previously stored map (key=string,value=any) as a sequence. (see setProperties)
void Engines_Component_i::Names | ( | const char * | graphName, | |
const char * | nodeName | |||
) | [inherited] |
CORBA method: used by Supervision to give names to this instance
bool Engines_Component_i::Kill_impl | ( | ) | [inherited] |
CORBA method: used in Supervision
bool Engines_Component_i::Stop_impl | ( | ) | [inherited] |
CORBA method: used in Supervision
bool Engines_Component_i::Suspend_impl | ( | ) | [inherited] |
CORBA method: used in Supervision
bool Engines_Component_i::Resume_impl | ( | ) | [inherited] |
CORBA method: used in Supervision
CORBA::Long Engines_Component_i::CpuUsed_impl | ( | ) | [inherited] |
CORBA method:
Engines::TMPFile * Engines_Component_i::DumpPython | ( | CORBA::Object_ptr | theStudy, | |
CORBA::Boolean | isPublished, | |||
CORBA::Boolean & | isValidScript | |||
) | [virtual, inherited] |
C++ method: DumpPython default implementation
PortableServer::ObjectId * Engines_Component_i::getId | ( | ) | [inherited] |
C++ method: return CORBA instance id, the id is set in derived class constructor, when instance is activated.
Engines_Container_i * Engines_Component_i::GetContainerPtr | ( | ) | [inherited] |
C++ method: return Container Servant
std::string Engines_Component_i::getContainerName | ( | ) | [inherited] |
C++ method: return the name of the container associated with this component This name does not contains the "/Containers" string and all "/" are replaced by "_"
CORBA::Boolean Engines_Component_i::setStudyId | ( | CORBA::Long | studyId | ) | [virtual, inherited] |
C++ method: set study Id
studyId | 0 if instance is not associated to a study, >0 otherwise (== study id) |
string Engines_Component_i::GetDynLibraryName | ( | const char * | componentName | ) | [static, inherited] |
C++ method: return standard library name built on component name
void Engines_Component_i::beginService | ( | const char * | serviceName | ) | [inherited] |
C++ method: used by derived classes for supervision
Reimplemented in Superv_Component_i.
void Engines_Component_i::endService | ( | const char * | serviceName | ) | [inherited] |
C++ method: used by derived classes for supervision
void Engines_Component_i::sendMessage | ( | const char * | event_type, | |
const char * | message | |||
) | [inherited] |
C++ method: Send message to event channel
char * Engines_Component_i::graphName | ( | ) | [inherited] |
C++ method: -- CHECK IF USED --
char * Engines_Component_i::nodeName | ( | ) | [inherited] |
C++ method: -- CHECK IF USED --
bool Engines_Component_i::Killer | ( | pthread_t | ThreadId, | |
int | signum | |||
) | [inherited] |
C++ method: used in Supervision (see kill_impl)
void Engines_Component_i::SetCurCpu | ( | ) | [inherited] |
C++ method:
long Engines_Component_i::CpuUsed | ( | ) | [inherited] |
C++ method:
void Engines_Component_i::CancelThread | ( | ) | [inherited] |
C++ method:
void Engines_Component_i::configureSalome_file | ( | std::string | service_name, | |
std::string | file_port_name, | |||
Salome_file_i * | file | |||
) | [virtual, inherited] |
C++ method: used to configure the Salome_file into the runtime.
service_name | name of the service that use this Salome_file | |
file_port_name | name of the Salome_file | |
file | Salome_file C++ object |
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, inherited] |
Write a record in the trace file.
request | the name of the request executed | |
containerName | the name of the container where the request is executed | |
instance_name | the name of the component where the request is executed | |
port_name | the name of the port that is concerned | |
error | if an error has occured, a string that identifies the error | |
message | informations about error or about the request |
virtual void DSC_Callbacks::provides_port_changed | ( | const char * | provides_port_name, | |
int | connection_nbr, | |||
const Engines::DSC::Message | message | |||
) | [pure virtual, inherited] |
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.
provides_port_name | the name of the provides name that has changed. | |
connection_nbr | the new number of connection on the provides port. | |
message | contains informations about the modification of the port. |
Implemented in Superv_Component_i.
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 virtual, inherited] |
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.
uses_port_name | the name of the uses name that has changed. | |
new_uses_port | the new sequence representing the uses port. | |
message | contains informations about the modification of the port. |
Implemented in Superv_Component_i.