SALOME documentation central

Engines::Superv_Component Interface Reference

Interface of the Superv_Component. This interface is a DSC component that contains services for the SALOME module SUPERV. This interface contains methods that are only in local (so they are described and explained in the implementation class Superv_Component_i). These methods give access to data-oriented ports provided by default by SALOME's kernel. More...

Inheritance diagram for Engines::Superv_Component:
Inheritance graph

Public Types

enum  Message { AddingConnection, RemovingConnection, ApplicationError }
 

This enumeration is used when the connection of a port (uses or provides) is changed.

More...
typedef sequence< Ports::Portuses_port
 a uses port

Public Member Functions

boolean init_service (in string service_name)
 Operation to create the service ports before it is executed.
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 provides port to the component.
void add_uses_port (in string repository_id, in string uses_port_name, in Ports::PortProperties port_prop) raises (PortAlreadyDefined, BadProperty)
 This operation adds a uses port to the component.
Ports::Port get_provides_port (in string provides_port_name, in boolean connection_error) raises (PortNotDefined, PortNotConnected, BadPortType)
 Get a provides port of the component.
uses_port get_uses_port (in string uses_port_name) raises (PortNotDefined, PortNotConnected, BadPortType)
 Get a uses port of the component.
void connect_provides_port (in string provides_port_name) raises (PortNotDefined)
 Connect a provides port with a uses port.
void connect_uses_port (in string uses_port_name, in Ports::Port provides_port_ref) raises (PortNotDefined, BadPortType, NilPort)
 Connect a uses port with a provides port.
boolean is_connected (in string port_name) raises (PortNotDefined)
 Check if a port is connected.
void disconnect_provides_port (in string provides_port_name, in Engines::DSC::Message message) raises (PortNotDefined, PortNotConnected)
 Disconnect a uses port from a provides port.
void disconnect_uses_port (in string uses_port_name, in Ports::Port provides_port_ref, in Engines::DSC::Message message) raises (PortNotDefined, PortNotConnected, BadPortReference)
 Disconnect a provides port from a uses port.
Ports::PortProperties get_port_properties (in string port_name) raises (PortNotDefined)
 Get port's property object.
void ping ()
 Determines whether the server has already been loaded or not.
long getStudyId ()
 Get study associated to component instance.
void destroy ()
 Remove component instance from container.
Container GetContainerRef ()
 Returns the container that the Component refers to.
void setProperties (in FieldsDict dico)
 Set component instance properties.
FieldsDict getProperties ()
 Get component instance properties.
void Names (in string aGraphName, in string aNodeName)
 Set name of a node in a graph (for SUPERVISOR use).
boolean Kill_impl ()
 Kill the component (if you can).
boolean Stop_impl ()
 Stop the component (if you can).
boolean Suspend_impl ()
 Suspend the component.
boolean Resume_impl ()
 Resume the component.
long CpuUsed_impl ()
 Get the cpu used.
TMPFile DumpPython (in Object theStudy, in boolean isPublished, out boolean isValidScript)
 Get a python dump.
Engines::Salome_file getInputFileToService (in string service_name, in string Salome_file_name) raises (SALOME::SALOME_Exception)
 Returns a CORBA Ref of a input Salome_file managed by a service.
void checkInputFilesToService (in string service_name) raises (SALOME::SALOME_Exception)
 Check service input files (transfer them if needed).
Engines::Salome_file setInputFileToService (in string service_name, in string Salome_file_name) raises (SALOME::SALOME_Exception)
 This method adds a input Salome_file to a service of the component.
Engines::Salome_file getOutputFileToService (in string service_name, in string Salome_file_name) raises (SALOME::SALOME_Exception)
 Returns a CORBA Ref of a output Salome_file managed by a service.
void checkOutputFilesToService (in string service_name) raises (SALOME::SALOME_Exception)
 Check service output files (transfer them if needed).
Engines::Salome_file setOutputFileToService (in string service_name, in string Salome_file_name) raises (SALOME::SALOME_Exception)
 This method adds an output Salome_file to a service of the component.
boolean hasObjectInfo ()
 Indicate if the component instance provides custom information about its objects.
string getObjectInfo (in long studyId, in string entry)
 Get custom information about the given object.

Data Fields

readonly attribute string instanceName
 The name of the instance of the Component.
readonly attribute string interfaceName
 The name of the interface of the Component.

Detailed Description

Interface of the Superv_Component. This interface is a DSC component that contains services for the SALOME module SUPERV. This interface contains methods that are only in local (so they are described and explained in the implementation class Superv_Component_i). These methods give access to data-oriented ports provided by default by SALOME's kernel.


Member Typedef Documentation

typedef sequence<Ports::Port> Engines::DSC::uses_port [inherited]

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. At this programming level, the user has to deal with the sequence. In the DSC_user layer, the user only deals with one pointer.


Member Enumeration Documentation

enum Engines::DSC::Message [inherited]

This enumeration is used when the connection of a port (uses or provides) is changed.

This information is for the component's user code.


Member Function Documentation

boolean Engines::Superv_Component::init_service ( in string  service_name  ) 

Operation to create the service ports before it is executed.

The SUPERV module call this method before starting the service. Thus the service can add its dynamics ports before it is started.

Parameters:
service_name service's name.
Returns:
true if the service is correctly initialised.
void Engines::DSC::add_provides_port ( in Ports::Port  ref,
in string  provides_port_name,
in Ports::PortProperties  port_prop 
) raises (PortAlreadyDefined, NilPort, BadProperty) [inherited]

This operation adds a provides port to the component.

Parameters:
ref port's Corba reference.
provides_port_name port's name.
port_prop port's property object.
Exceptions:
PortAlreadyDefined 
NilPort 
BadProperty 
Note:
Notice that the name of the port is unique on a component. So if there is a uses port that has the same name, the PortAlreadyDefined exception will be throw. Also notice that each port as an object property that is associated with.
void Engines::DSC::add_uses_port ( in string  repository_id,
in string  uses_port_name,
in Ports::PortProperties  port_prop 
) raises (PortAlreadyDefined, BadProperty) [inherited]

This operation adds a uses port to the component.

Parameters:
repository_id port's Corba repository id. Eg : IDL:toto.tata/MODULE/INTERFACE_NAME:1.0
uses_port_name port's name.
port_prop port's property object.
Exceptions:
PortAlreadyDefined 
BadProperty 
Note:
Notice that the name of the port is unique on the component. So if there is a provides port that has the same name, the PortAlreadyDefined exception will be throw. Also notice that each port as an object property that is associated with.
Ports::Port Engines::DSC::get_provides_port ( in string  provides_port_name,
in boolean  connection_error 
) raises (PortNotDefined, PortNotConnected, BadPortType) [inherited]

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 in most of cases only if it is connected (boolean connection_error to true). Notice that you can choose the behaviour that you want.

Parameters:
provides_port_name port's name.
connection_error true if you want to wait that the port is connected with an another port.
Returns:
port's Corba reference.
Exceptions:
PortNotDefined 
PortNotConnected 
BadPortType 
uses_port Engines::DSC::get_uses_port ( in string  uses_port_name  )  raises (PortNotDefined, PortNotConnected, BadPortType) [inherited]

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 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) of a connection (see DSC_Callbacks class).

Parameters:
uses_port_name port's name.
Returns:
uses port's sequence.
Exceptions:
PortNotDefined 
PortNotConnected 
BadPortType 
See also:
DSC_Callbacks
void Engines::DSC::connect_provides_port ( in string  provides_port_name  )  raises (PortNotDefined) [inherited]

Connect a provides port with a uses port.

Parameters:
provides_port_name provides port's name.
Exceptions:
PortNotDefined 
Note:
Notice that the provides doesn't uses port names or component reference.
void Engines::DSC::connect_uses_port ( in string  uses_port_name,
in Ports::Port  provides_port_ref 
) raises (PortNotDefined, BadPortType, NilPort) [inherited]

Connect a uses port with a provides port.

Parameters:
uses_port_name uses port's name.
provides_port_ref provides port's Corba reference.
Exceptions:
PortNotDefined 
BadPortType 
NilPort 
boolean Engines::DSC::is_connected ( in string  port_name  )  raises (PortNotDefined) [inherited]

Check if a port is connected.

You can test a uses port or a provides port.

Parameters:
port_name port's name.
Returns:
true if the uses port is connected.
Exceptions:
PortNotDefined 
void Engines::DSC::disconnect_provides_port ( in string  provides_port_name,
in Engines::DSC::Message  message 
) raises (PortNotDefined, PortNotConnected) [inherited]

Disconnect a uses port from a provides port.

Parameters:
provides_port_name provides port's name.
message state associated with the disconnection.
Exceptions:
PortNotDefined 
PortNotConnected 
void Engines::DSC::disconnect_uses_port ( in string  uses_port_name,
in Ports::Port  provides_port_ref,
in Engines::DSC::Message  message 
) raises (PortNotDefined, PortNotConnected, BadPortReference) [inherited]

Disconnect a provides port from a uses port.

Parameters:
uses_port_name uses port's name.
provides_port_ref CORBA reference of the provides port.
message state associated with the disconnection.
Exceptions:
PortNotDefined 
PortNotConnected 
BadPortReference 
Ports::PortProperties Engines::DSC::get_port_properties ( in string  port_name  )  raises (PortNotDefined) [inherited]

Get port's property object.

Parameters:
port_name port's name.
Returns:
properties object's CORBA reference.
Exceptions:
PortNotDefined 
void Engines::Component::ping (  )  [inherited]

Determines whether the server has already been loaded or not.

long Engines::Component::getStudyId (  )  [inherited]

Get study associated to component instance.

get study associated to component instance

Returns:
-1: not initialised (Internal Error) 0: multistudy component instance >0: study id associated to this instance
void Engines::Component::destroy (  )  [inherited]

Remove component instance from container.

Deactivates the Component. -- TO BE USED BY CONTAINER ONLY (Container housekeeping) -- use remove_impl from Container instead !

Container Engines::Component::GetContainerRef (  )  [inherited]

Returns the container that the Component refers to.

void Engines::Component::setProperties ( in FieldsDict  dico  )  [inherited]

Set component instance properties.

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.

FieldsDict Engines::Component::getProperties (  )  [inherited]

Get component instance properties.

returns a previously stored map (key=string,value=any) as a sequence. See setProperties(in FieldsDict dico).

void Engines::Component::Names ( in string  aGraphName,
in string  aNodeName 
) [inherited]

Set name of a node in a graph (for SUPERVISOR use).

This method is used by the SUPERVISOR component. It sets the names of the graph and of the node.

Parameters:
aGraphName Name of graph
aNodeName Name of node
boolean Engines::Component::Kill_impl (  )  [inherited]

Kill the component (if you can).

Returns True if the Component has been killed.

boolean Engines::Component::Stop_impl (  )  [inherited]

Stop the component (if you can).

Returns True if the activity of the Component has been stopped. (It's action can't be resumed)

boolean Engines::Component::Suspend_impl (  )  [inherited]

Suspend the component.

Returns True if the activity of the Component has been suspended. (It's action can be resumed)

boolean Engines::Component::Resume_impl (  )  [inherited]

Resume the component.

Returns True if the activity of the Component has been resumed.

long Engines::Component::CpuUsed_impl (  )  [inherited]

Get the cpu used.

Returns the Cpu used

TMPFile Engines::Component::DumpPython ( in Object  theStudy,
in boolean  isPublished,
out boolean  isValidScript 
) [inherited]

Get a python dump.

Returns a python script, which is being played back reproduces the data model of component

Engines::Salome_file Engines::Component::getInputFileToService ( in string  service_name,
in string  Salome_file_name 
) raises (SALOME::SALOME_Exception) [inherited]

Returns a CORBA Ref of a input Salome_file managed by a service.

Parameters:
service_name service's name.
file_name name of the requested file.
Returns:
CORBA Ref of the requested file.
Exceptions:
contains informations of what if the component cannot sends the file's reference.
void Engines::Component::checkInputFilesToService ( in string  service_name  )  raises (SALOME::SALOME_Exception) [inherited]

Check service input files (transfer them if needed).

This method is used before the activation of the service. It calls recvFiles() on all the input Salome_file files of the service.

Before each recvFiles(), it uses the callback method named configureSalome_file. This method allows the user to configure the files managed by the Salome_file.

By default, there is no files managed when a Salome_file is created, but the supervisor set some files managed by the Salome_file from the information contained into the schema file.

Parameters:
service_name service's name.
Exceptions:
contains informations about files that are not in a good state.
Engines::Salome_file Engines::Component::setInputFileToService ( in string  service_name,
in string  Salome_file_name 
) raises (SALOME::SALOME_Exception) [inherited]

This method adds a input Salome_file to a service of the component.

Parameters:
service_name service's name.
Salome_file_name name of the Salome_file
Returns:
a reference of the Salome_file
Exceptions:
raises an exception if there is already a Salome_file with this name for the service.
Engines::Salome_file Engines::Component::getOutputFileToService ( in string  service_name,
in string  Salome_file_name 
) raises (SALOME::SALOME_Exception) [inherited]

Returns a CORBA Ref of a output Salome_file managed by a service.

Parameters:
service_name service's name.
file_name name of the requested file.
Returns:
CORBA Ref of the requested file.
Exceptions:
contains informations of what if the component cannot sends the file's reference.
void Engines::Component::checkOutputFilesToService ( in string  service_name  )  raises (SALOME::SALOME_Exception) [inherited]

Check service output files (transfer them if needed).

This method is used at the end of the service. It calls recvFiles() on all the output Salome_file files of the service.

Before each recvFiles(), it uses the callback method named configureSalome_file. This method allows the user to configure the files managed by the Salome_file.

By default, there is no files managed when a Salome_file is created, but the supervisor set some files managed by the Salome_file from the information contained into the schema file.

Parameters:
service_name service's name.
Exceptions:
contains informations about files that are not in a good state.
Engines::Salome_file Engines::Component::setOutputFileToService ( in string  service_name,
in string  Salome_file_name 
) raises (SALOME::SALOME_Exception) [inherited]

This method adds an output Salome_file to a service of the component.

Parameters:
service_name service's name.
Salome_file_name name of the Salome_file
Returns:
a reference of the Salome_file
Exceptions:
raises an exception if there is already a Salome_file with this name for the service.
boolean Engines::Component::hasObjectInfo (  )  [inherited]

Indicate if the component instance provides custom information about its objects.

Returns true if the component provides custom information about its objects, false otherwise. Should be redefined in the certain component to return true in case of this component provides such information.

string Engines::Component::getObjectInfo ( in long  studyId,
in string  entry 
) [inherited]

Get custom information about the given object.

This method is used to get the custom information about the given object. Should be redefined in the certain component in case of this component provides such information. It is worth using this method only if hasObjectInfo() method returns true.

Parameters:
entry object's entry.
studyId study id
Returns:
an information about the given object.

Field Documentation

readonly attribute string Engines::Component::instanceName [inherited]

The name of the instance of the Component.

readonly attribute string Engines::Component::interfaceName [inherited]

The name of the interface of the Component.


Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS