Back to index

salome-kernel  6.5.0
Public Member Functions
SALOME_TestComponentPy.SALOME_TestComponentPy Class Reference
Inheritance diagram for SALOME_TestComponentPy.SALOME_TestComponentPy:
Inheritance graph
[legend]
Collaboration diagram for SALOME_TestComponentPy.SALOME_TestComponentPy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def Coucou
def __init__
def ping
def setProperties
def getProperties
def destroy
def GetContainerRef
def beginService
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

Detailed Description

Definition at line 37 of file SALOME_TestComponentPy.py.


Constructor & Destructor Documentation

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

Definition at line 44 of file SALOME_TestComponentPy.py.

00044 
00045     def __init__(self, orb, poa, contID, containerName, instanceName, interfaceName):
00046         notif = 0
00047         SALOME_ComponentPy_i.__init__(self, orb, poa, contID, containerName,
00048                                       instanceName, interfaceName, notif)
00049         print "SALOME_TestComponentPy::__init__"
00050 

Member Function Documentation

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

Reimplemented in dsccalcium.PyDSCComponent.

Definition at line 167 of file SALOME_ComponentPy.py.

00167 
00168     def beginService(self , serviceName ):
00169         MESSAGE(  "Send BeginService notification for " + str(serviceName) + " for graph/node " + str(self._graphName) + " " + str(self._nodeName) )
00170         MESSAGE(  "Component instance : " + str ( self._instanceName ) )
00171         self._serviceName = str(serviceName)
00172         self._ThreadId = get_ident()
00173         self._StartUsed = 0
00174         self._StartUsed = self.CpuUsed_impl()
00175         self._ThreadCpuUsed = 0
00176         self._Executed = 1
00177         print "beginService for ",serviceName," Component instance : ",self._instanceName
00178         MESSAGE( "SALOME_ComponentPy_i::beginService _StartUsed " + str( self._ThreadId ) + " " + str( self._StartUsed ) )
00179         for e in self._fieldsDict:
00180           key=e.key
00181           value=any.from_any(e.value)
00182           if isinstance(value,str):
00183             os.environ[key]=value
00184         

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 39 of file SALOME_TestComponentPy.py.

00039 
00040     def Coucou(self, val):
00041         print "SALOME_TestComponentPy Coucou ", val
00042         result = "result from SALOME_TestComponentPy Coucou " + `val`
00043         return result
    

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 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 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 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 

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

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_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()) )
        

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_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 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:


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