Back to index

salome-kernel  6.5.0
Public Member Functions | Public Attributes | Private Attributes
dsccalcium.PyDSCComponent Class Reference

The SALOME base class for all DSC components implemented in python (interface Engines::Superv_Component). More...

Inheritance diagram for dsccalcium.PyDSCComponent:
Inheritance graph
[legend]
Collaboration diagram for dsccalcium.PyDSCComponent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def init_service
def get_provides_port
def connect_uses_port
def connect_provides_port
def disconnect_provides_port
def disconnect_uses_port
def get_port_properties
def setInputFileToService
def checkInputFilesToService
def getInputFileToService
def setOutputFileToService
def getOutputFileToService
def checkOutputFilesToService
def beginService
def ping
def setProperties
def getProperties
def destroy
def GetContainerRef
def endService
def sendMessage
def Names
def graphName
def nodeName
def Killer
def Kill_impl
def Stop_impl
def Suspend_impl
def Resume_impl
def CpuUsed_impl
def DumpPython
def getStudyId
def hasObjectInfo
def getObjectInfo
def IORToLocalPersistentID
def LocalPersistentIDToIOR
def ComponentDataType
def Save
def SaveASCII
def Load
def LoadASCII
def Close
def CanPublishInStudy
def PublishInStudy
def CanCopy

Public Attributes

 proxy

Private Attributes

 _naming_service

Detailed Description

The SALOME base class for all DSC components implemented in python (interface Engines::Superv_Component).

   A Python DSC component is implemented by a Python class that has
   the name of the component and is located in a python module that has the
   name of the component.

   You must derive it and implement init_service and those methods
   that are services of the component.

Definition at line 34 of file dsccalcium.py.


Constructor & Destructor Documentation

def dsccalcium.PyDSCComponent.__init__ (   self,
  orb,
  poa,
  contID,
  containerName,
  instanceName,
  interfaceName 
)

Definition at line 43 of file dsccalcium.py.

00043 
00044   def __init__ ( self, orb, poa, contID, containerName, instanceName, interfaceName ):
00045     SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(self, orb, poa,
00046                     contID, containerName, instanceName, interfaceName, 0)
00047     SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
00048     # create the DSC proxy
00049     self.proxy=calcium.PySupervCompo(orb,poa,contID,instanceName,interfaceName )
00050     # Store a reference on naming service in _naming_service attribute 
00051     self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )

Here is the call graph for this function:


Member Function Documentation

def dsccalcium.PyDSCComponent.beginService (   self,
  service_name 
)

Reimplemented from SALOME_ComponentPy.SALOME_ComponentPy_i.

Definition at line 97 of file dsccalcium.py.

00097 
00098   def beginService(self,service_name):
00099     SALOME_ComponentPy.SALOME_ComponentPy_i.beginService(self,service_name)
00100     self.proxy.setTimeOut()
00101 

Here is the call graph for this function:

def SALOME_DriverPy.SALOME_DriverPy_i.CanCopy (   self,
  theObject 
) [inherited]

Definition at line 70 of file SALOME_DriverPy.py.

00070 
00071     def CanCopy(self, theObject):
00072         return 0
00073 
def SALOME_DriverPy.SALOME_DriverPy_i.CanPublishInStudy (   self,
  theIOR 
) [inherited]

Definition at line 64 of file SALOME_DriverPy.py.

00064 
00065     def CanPublishInStudy(self, theIOR):
00066         return 1

def dsccalcium.PyDSCComponent.checkInputFilesToService (   self,
  service_name 
)

Definition at line 82 of file dsccalcium.py.

00082 
00083   def checkInputFilesToService(self,service_name):
00084     return self.proxy.checkInputFilesToService(service_name)

def dsccalcium.PyDSCComponent.checkOutputFilesToService (   self,
  service_name 
)

Definition at line 94 of file dsccalcium.py.

00094 
00095   def checkOutputFilesToService(self,service_name):
00096     return self.proxy.checkOutputFilesToService(service_name)

def SALOME_DriverPy.SALOME_DriverPy_i.Close (   self,
  theComponent 
) [inherited]

Definition at line 61 of file SALOME_DriverPy.py.

00061 
00062     def Close(self, theComponent):
00063         pass

Definition at line 46 of file SALOME_DriverPy.py.

00046 
00047     def ComponentDataType(self):
00048         return self._ComponentDataType

Definition at line 65 of file dsccalcium.py.

00065 
00066   def connect_provides_port(self,name):
00067     self.proxy.connect_provides_port(name)

def dsccalcium.PyDSCComponent.connect_uses_port (   self,
  name,
  port 
)

Definition at line 62 of file dsccalcium.py.

00062 
00063   def connect_uses_port(self,name,port):
00064     self.proxy.connect_uses_port(name,port)

Definition at line 282 of file SALOME_ComponentPy.py.

00282 
00283     def CpuUsed_impl(self):
00284         if ( self._ThreadId | self._Executed ) :
00285             if self._ThreadId == get_ident() :
00286                 cpu = time.clock()
00287                 self._ThreadCpuUsed = cpu - self._StartUsed
00288                 MESSAGE( "SALOME_ComponentPy_i::CpuUsed_impl " + self._serviceName + " " + str( int(cpu) ) + " - " + str( self._StartUsed ) + " = " + str( self._ThreadCpuUsed ) )
00289                 return self._ThreadCpuUsed
00290             MESSAGE( "SALOME_ComponentPy_i::CpuUsed_impl " + self._serviceName + " " + str( self._ThreadCpuUsed ) )
00291             return self._ThreadCpuUsed
00292         MESSAGE( "SALOME_ComponentPy_i::CpuUsed_impl self._StartUsed " + self._serviceName + " " + str(self._StartUsed) )
00293         return 0

Here is the caller graph for this function:

Definition at line 153 of file SALOME_ComponentPy.py.

00153 
00154     def destroy(self):
00155         MESSAGE(  "SALOME_ComponentPy_i::destroy" )
00156         id = self._poa.servant_to_id(self)
00157         self._poa.deactivate_object(id)
00158         return
        
def dsccalcium.PyDSCComponent.disconnect_provides_port (   self,
  name,
  message 
)

Definition at line 68 of file dsccalcium.py.

00068 
00069   def disconnect_provides_port(self,name,message):
00070     self.proxy.disconnect_provides_port(name,message._v)
00071     #self.proxy.disconnect_provides_port(name,self.enums[message])

def dsccalcium.PyDSCComponent.disconnect_uses_port (   self,
  name,
  port,
  message 
)

Definition at line 72 of file dsccalcium.py.

00072 
00073   def disconnect_uses_port(self,name,port,message):
00074     self.proxy.disconnect_uses_port(name,port,message._v)
00075     #self.proxy.disconnect_uses_port(name,port,self.enums[message])

def SALOME_ComponentPy.SALOME_ComponentPy_i.DumpPython (   self,
  theStudy,
  isPublished,
  isMultiFile 
) [inherited]

Definition at line 296 of file SALOME_ComponentPy.py.

00296 
00297     def DumpPython(self, theStudy, isPublished, isMultiFile):
00298         aBuffer = "\0"
00299         if isMultiFile :
00300             aBuffer = "def RebuildData(theStudy): pass\n\0"
00301         return (aBuffer, 1)

def SALOME_ComponentPy.SALOME_ComponentPy_i.endService (   self,
  serviceName 
) [inherited]

Definition at line 187 of file SALOME_ComponentPy.py.

00187 
00188     def endService(self , serviceName ):
00189         MESSAGE(  "Send EndService notification for " + str( self._ThreadId ) + " " + str(serviceName) + " for graph/node " + str(self._graphName) + " " + str(self._nodeName) + " CpuUsed " + str( self.CpuUsed_impl() ) )
00190         MESSAGE(  "Component instance : " + str(self._instanceName) )
00191         print "endService for",serviceName,"Component instance :",self._instanceName,"Cpu Used:",self.CpuUsed_impl()," (s) "
00192 

Here is the call graph for this function:

Definition at line 76 of file dsccalcium.py.

00076 
00077   def get_port_properties(self,name):
00078     return self.proxy.get_port_properties(name)

def dsccalcium.PyDSCComponent.get_provides_port (   self,
  name,
  error 
)

Definition at line 59 of file dsccalcium.py.

00059 
00060   def get_provides_port(self,name,error):
00061     return self.proxy.get_provides_port(name,error)

Definition at line 161 of file SALOME_ComponentPy.py.

00161 
00162     def GetContainerRef(self):
00163         MESSAGE(  "SALOME_ComponentPy_i::GetContainerRef" )
00164         return self._contId._narrow(Engines.Container)
                
def dsccalcium.PyDSCComponent.getInputFileToService (   self,
  service_name,
  Salome_file_name 
)

Definition at line 85 of file dsccalcium.py.

00085 
00086   def getInputFileToService(self,service_name,Salome_file_name):
00087     return self.proxy.getInputFileToService(service_name,Salome_file_name)

def SALOME_ComponentPy.SALOME_ComponentPy_i.getObjectInfo (   self,
  studyId,
  entry 
) [inherited]

Definition at line 314 of file SALOME_ComponentPy.py.

00314 
00315     def getObjectInfo(self, studyId, entry):
00316         return ""
00317 
def dsccalcium.PyDSCComponent.getOutputFileToService (   self,
  service_name,
  Salome_file_name 
)

Definition at line 91 of file dsccalcium.py.

00091 
00092   def getOutputFileToService(self,service_name,Salome_file_name):
00093     return self.proxy.getOutputFileToService(service_name,Salome_file_name)

Definition at line 148 of file SALOME_ComponentPy.py.

00148 
00149     def getProperties(self):
00150         return self._fieldsDict

Definition at line 304 of file SALOME_ComponentPy.py.

00304 
00305     def getStudyId(self):
00306         return self._studyId

Definition at line 207 of file SALOME_ComponentPy.py.

00207 
00208     def graphName(self):
00209         return self._graphName

Here is the caller graph for this function:

Definition at line 309 of file SALOME_ComponentPy.py.

00309 
00310     def hasObjectInfo(self):
00311         return 0

def dsccalcium.PyDSCComponent.init_service (   self,
  service 
)

Definition at line 52 of file dsccalcium.py.

00052 
00053   def init_service(self,service):
00054     return True

def SALOME_DriverPy.SALOME_DriverPy_i.IORToLocalPersistentID (   self,
  theSObject,
  IORString,
  isMultiFile,
  isASCII 
) [inherited]

Definition at line 40 of file SALOME_DriverPy.py.

00040 
00041     def IORToLocalPersistentID(self, theSObject, IORString, isMultiFile, isASCII):
00042         return theSObject.GetID()

Definition at line 233 of file SALOME_ComponentPy.py.

00233 
00234     def Kill_impl(self):
00235         MESSAGE(  "SALOME_ComponentPy_i::Kill_impl" )
00236         RetVal = 0
00237         if self._ThreadId > 0 & self._ThreadId != get_ident():
00238             RetVal = Killer(self._ThreadId,0)
00239             self._ThreadId = 0
00240         return RetVal

Here is the call graph for this function:

def SALOME_ComponentPy.SALOME_ComponentPy_i.Killer (   self,
  ThreadId,
  signum 
) [inherited]

Definition at line 217 of file SALOME_ComponentPy.py.

00217 
00218     def Killer(self, ThreadId, signum):
00219         #if ThreadId > 0:
00220             #if signum == 0:
00221                 #if pthread_cancel(ThreadId): <- from C++
00222                 #   return 0
00223                 #else:
00224                 #   MESSAGE()
00225             #else:
00226                 #if pthread_kill(ThreadId): <- from C++
00227                 #   return 0
00228                 #else:
00229                 #   MESSAGE()
00230         return 1                 
    

Here is the caller graph for this function:

def SALOME_DriverPy.SALOME_DriverPy_i.Load (   self,
  theComponent,
  theStream,
  theURL,
  isMultiFile 
) [inherited]

Definition at line 55 of file SALOME_DriverPy.py.

00055 
00056     def Load(self, theComponent, theStream, theURL, isMultiFile):
00057         return 1

Here is the caller graph for this function:

def SALOME_DriverPy.SALOME_DriverPy_i.LoadASCII (   self,
  theComponent,
  theStream,
  theURL,
  isMultiFile 
) [inherited]

Definition at line 58 of file SALOME_DriverPy.py.

00058 
00059     def LoadASCII(self, theComponent, theStream, theURL, isMultiFile):
00060         return self.Load(theComponent, theStream, theURL, isMultiFile)

Here is the call graph for this function:

def SALOME_DriverPy.SALOME_DriverPy_i.LocalPersistentIDToIOR (   self,
  theSObject,
  PersistentID,
  isMultiFile,
  isASCII 
) [inherited]

Definition at line 43 of file SALOME_DriverPy.py.

00043 
00044     def LocalPersistentIDToIOR(self, theSObject, PersistentID, isMultiFile, isASCII):
00045         return ""

def SALOME_ComponentPy.SALOME_ComponentPy_i.Names (   self,
  GraphName,
  NodeName 
) [inherited]

Definition at line 200 of file SALOME_ComponentPy.py.

00200 
00201     def Names(self , GraphName , NodeName ):
00202         MESSAGE(  "SALOME_ComponentPy_i::Names" + str(GraphName) + str(NodeName) )
00203         self._graphName = GraphName
00204         self._nodeName = NodeName
        

Definition at line 212 of file SALOME_ComponentPy.py.

00212 
00213     def nodeName(self):
00214         return self._nodeName

Here is the caller graph for this function:

Definition at line 138 of file SALOME_ComponentPy.py.

00138 
00139     def ping(self):
00140         MESSAGE(  "SALOME_ComponentPy_i::ping() pid " + str(os.getpid()) )
        
def SALOME_DriverPy.SALOME_DriverPy_i.PublishInStudy (   self,
  theStudy,
  theSObject,
  theObject,
  theName 
) [inherited]

Definition at line 67 of file SALOME_DriverPy.py.

00067 
00068     def PublishInStudy(self, theStudy, theSObject, theObject, theName):
00069         return None

Definition at line 268 of file SALOME_ComponentPy.py.

00268 
00269     def Resume_impl(self):
00270         MESSAGE(  "SALOME_ComponentPy_i::Resume_impl" )
00271         global _Sleeping
00272         RetVal = 0
00273         if self._ThreadId > 0 & self._ThreadId != get_ident():
00274             if _Sleeping > 0:
00275                 _Sleeping = 0
00276                 RetVal = 1
00277             else:
00278                 RetVal = 0
00279         return RetVal

def SALOME_DriverPy.SALOME_DriverPy_i.Save (   self,
  theComponent,
  theURL,
  isMultiFile 
) [inherited]

Definition at line 49 of file SALOME_DriverPy.py.

00049 
00050     def Save(self, theComponent, theURL, isMultiFile):
00051         return ""

Here is the caller graph for this function:

def SALOME_DriverPy.SALOME_DriverPy_i.SaveASCII (   self,
  theComponent,
  theURL,
  isMultiFile 
) [inherited]

Definition at line 52 of file SALOME_DriverPy.py.

00052 
00053     def SaveASCII(self, theComponent, theURL, isMultiFile):
00054         return self.Save(theComponent, theURL, isMultiFile)

Here is the call graph for this function:

def SALOME_ComponentPy.SALOME_ComponentPy_i.sendMessage (   self,
  event_type,
  message 
) [inherited]

Definition at line 195 of file SALOME_ComponentPy.py.

00195 
00196     def sendMessage(self , event_type , message ):
00197         self._notifSupplier.Send(self.graphName(), self.nodeName(), event_type, message)

Here is the call graph for this function:

def dsccalcium.PyDSCComponent.setInputFileToService (   self,
  service_name,
  Salome_file_name 
)

Definition at line 79 of file dsccalcium.py.

00079 
00080   def setInputFileToService(self,service_name,Salome_file_name):
00081     return self.proxy.setInputFileToService(service_name,Salome_file_name)

def dsccalcium.PyDSCComponent.setOutputFileToService (   self,
  service_name,
  Salome_file_name 
)

Definition at line 88 of file dsccalcium.py.

00088 
00089   def setOutputFileToService(self,service_name,Salome_file_name):
00090     return self.proxy.setOutputFileToService(service_name,Salome_file_name)

def SALOME_ComponentPy.SALOME_ComponentPy_i.setProperties (   self,
  dico 
) [inherited]

Definition at line 143 of file SALOME_ComponentPy.py.

00143 
00144     def setProperties(self, dico):
00145         self._fieldsDict = dico
    

Definition at line 243 of file SALOME_ComponentPy.py.

00243 
00244     def Stop_impl(self):
00245         MESSAGE(  "SALOME_ComponentPy_i::Stop_impl" )
00246         RetVal = 0
00247         if self._ThreadId > 0 & self._ThreadId != get_ident():
00248             RetVal = Killer(self._ThreadId,0)
00249             self._ThreadId = 0
00250         return RetVal

Here is the call graph for this function:

Definition at line 253 of file SALOME_ComponentPy.py.

00253 
00254     def Suspend_impl(self):
00255         MESSAGE(  "SALOME_ComponentPy_i::Suspend_impl" )
00256         global _Sleeping
00257         RetVal = 0
00258         if self._ThreadId > 0 & self._ThreadId != get_ident():
00259             if _Sleeping > 0:
00260                 return 0
00261             else:
00262                 RetVal = Killer(self._ThreadId, signal.SIGINT)
00263                 if RetVal > 0:
00264                     _Sleeping = 1
00265         return RetVal

Here is the call graph for this function:


Member Data Documentation

Definition at line 50 of file dsccalcium.py.

Definition at line 48 of file dsccalcium.py.


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