Пример #1
0
 def __init__(self):
     '''
     Just call superclass constructors here and get a member logger.
     '''
     ACSComponent.__init__(self)
     ContainerServices.__init__(self)
     self.logger = self.getLogger()
Пример #2
0
 def __init__(self):
     '''
     Just call superclass constructors here and get a member logger.
     '''
     ACSComponent.__init__(self)
     ContainerServices.__init__(self)
     self.logger = self.getLogger()
Пример #3
0
 def __init__(self):
     '''
     Just call superclass constructors here.
     '''
     ACSComponent.__init__(self)
     ContainerServices.__init__(self)
     return
Пример #4
0
 def __init__(self):
     '''
     Just call superclass constructors here.
     '''
     CharacteristicComponent.__init__(self)
     ContainerServices.__init__(self)
     self.timestampIO = timestampDevIO()
     return
Пример #5
0
    def __init__(self):
        """
        Call superclass constructors and define private variables
        """

        CharacteristicComponent.__init__(self)

        ContainerServices.__init__(self)
Пример #6
0
 def __init__(self):
     '''
     Just call superclass constructors here.
     '''
     CharacteristicComponent.__init__(self)
     ContainerServices.__init__(self)
     self.timestampIO = timestampDevIO()
     return
Пример #7
0
    def __init__(self):
        '''
        Just call superclass constructors here.
        '''
        ACSComponent.__init__(self)
        ContainerServices.__init__(self)

        self.LOGGER = getLogger("CounterSupplier")
        #LOGGER.logInfo('Passed through __init__')
        return
Пример #8
0
    def __init__(self):
        '''
        Just call superclass constructors here.
        '''
        ACSComponent.__init__(self)
        ContainerServices.__init__(self)

        self.LOGGER = getLogger("CounterSupplier")
        #LOGGER.logInfo('Passed through __init__')
        return
Пример #9
0
 def __init__(self,ir=None):
     '''
     Just call superclass constructors here.
     '''
     if ir != None:
         CharacteristicComponent.__init__(self)
         ContainerServices.__init__(self)
         self.ir = ir
         BaseSimulator.__init__(self,ir)
     return
Пример #10
0
 def __init__(self):
     '''
     Just call superclass constructors here and declare members.
     '''
     ACSComponent.__init__(self)
     ContainerServices.__init__(self)
     
     self.brightness = None
     self.cb = None
     self.monitor = None
     return
Пример #11
0
    def __init__(self, name="Python Client"):
        '''
        Initialize the client.

        Parameters:
        - name is what manager will refer to this client instance as
        - runAsSingleton True if the client is a singleton

        Returns: Nothing

        Raises: CORBAProblemExImpl
        '''
        loginName = "UNKNOWN_USER"
        try:
            loginName = pwd.getpwuid(os.getuid())[0]
        except:
            print_exc()
            print "Error getting the user name!"
            
        hostName = "UNKNOWN_HOST"
        try:
            hostName = socket.gethostname().split('.')[0]
        except:
            print_exc()
            print "Error getting the host name!"
        #just to be sure
        name = name + " initialized by " + loginName + "@" + hostName
        name = str(name)
        
        BaseClient.__init__(self, name)
        if _DEBUG: # pragma: NO COVER
            print "Got past BaseClient in SimpleClient"

        #call superclass constructors
        ContainerServices.__init__(self)
        if _DEBUG: # pragma: NO COVER
            print "Got past ContainerServices in SimpleClient"
            
        #set some things to make ContainerServices happy
        self.setAll(self.name,
                    self.token,
                    self.token.h,
                    self.__activateOffShoot)
        if _DEBUG: # pragma: NO COVER
            print "Got past Constructor in SimpleClient"
            
        # Ensure that disconnect is called when python exit
        register(self.disconnect)
        
        global _instance
        
        #If there is no singleton yet; create one
        if _instance == None:
            _instance = self
Пример #12
0
    def __init__(self):
        '''
        Just call superclass constructors here.
        '''
        CharacteristicComponent.__init__(self)
        ContainerServices.__init__(self)

        self.count = 0
        self.size = 0
        self.waitTime = 0L
        return
Пример #13
0
    def __init__(self, name="Python Client"):
        '''
        Initialize the client.

        Parameters:
        - name is what manager will refer to this client instance as
        - runAsSingleton True if the client is a singleton

        Returns: Nothing

        Raises: CORBAProblemExImpl
        '''
        loginName = "UNKNOWN_USER"
        try:
            loginName = pwd.getpwuid(os.getuid())[0]
        except:
            print_exc()
            print "Error getting the user name!"
            
        hostName = "UNKNOWN_HOST"
        try:
            hostName = socket.gethostname()
        except:
            print_exc()
            print "Error getting the host name!"
        #just to be sure
        name = name + ": initialized by " + loginName + "@" + hostName
        name = str(name)
        
        BaseClient.__init__(self, name)
        if _DEBUG: # pragma: NO COVER
            print "Got past BaseClient in SimpleClient"

        #call superclass constructors
        ContainerServices.__init__(self)
        if _DEBUG: # pragma: NO COVER
            print "Got past ContainerServices in SimpleClient"
            
        #set some things to make ContainerServices happy
        self.setAll(self.name,
                    self.token,
                    self.token.h,
                    self.__activateOffShoot)
        if _DEBUG: # pragma: NO COVER
            print "Got past Constructor in SimpleClient"
            
        # Ensure that disconnect is called when python exit
        register(self.disconnect)
        
        global _instance
        
        #If there is no singleton yet; create one
        if _instance == None:
            _instance = self
Пример #14
0
    def __init__(self):
        '''
        Just call superclass constructors here.
        '''
        ACSComponent.__init__(self)
        ContainerServices.__init__(self)

        self.eventCount = 0
        self.contFlag = True
        self.LOGGER = getLogger("CounterConsumer")

        return
Пример #15
0
    def __init__(self):
        '''
        Just call superclass constructors here.
        '''
        ACSComponent.__init__(self)
        ContainerServices.__init__(self)

        self.eventCount = 0
        self.contFlag = True
        self.LOGGER = getLogger("CounterConsumer")

        return
Пример #16
0
    def __init__(self):
        """Constructor.
        """
        ACSComponent.__init__(self)
        ContainerServices.__init__(self)

        self.logger = self.getLogger()

        # Stores method information for all components
        # self.methods is indexed by component name
        # self.methods[comp_name] is a map indexed by method name
        # self.methods[comp_name][method_name] is an instance of MethodInfo
        self.methods = {}

        # Stores method information for all interfaces
        # self.methods is indexed by interface ('IDL:bla/bla/bla:1.0') name
        # self.methods[if_name] is a map indexed by method name
        # self.methods[if_name][method_name] is an instance of MethodInfo
        self.if_methods = {}
Пример #17
0
    def __init__(self):
        '''Constructor.
        '''
        ACSComponent.__init__(self)
        ContainerServices.__init__(self)

        self.logger = self.getLogger()

        # Stores method information for all components
        # self.methods is indexed by component name
        # self.methods[comp_name] is a map indexed by method name
        # self.methods[comp_name][method_name] is an instance of MethodInfo
        self.methods = {}

        # Stores method information for all interfaces
        # self.methods is indexed by interface ('IDL:bla/bla/bla:1.0') name
        # self.methods[if_name] is a map indexed by method name
        # self.methods[if_name][method_name] is an instance of MethodInfo
        self.if_methods = {}
Пример #18
0
    def __init__(self, name="Python Client"):
        '''
        Initialize the client.

        Parameters:
        - name is what manager will refer to this client instance as

        Returns: Nothing

        Raises: CORBAProblemExImpl
        '''
        global _myInstanceCount
        #increment our own reference counter
        _myInstanceCount = _myInstanceCount + 1
        
        #just to be sure
        try:
            name = name + ": " + os.getlogin() + " at " + socket.gethostname()
        except:
            name = name
        name = str(name)
        
        #call superclass constructors
        ContainerServices.__init__(self)
        if _DEBUG: # pragma: NO COVER
            print "Got past ContainerServices in SimpleClient"
        BaseClient.__init__(self, name)
        if _DEBUG: # pragma: NO COVER
            print "Got past BaseClient in SimpleClient"

        #set some things to make ContainerServices happy
        self.setAll(self.name,
                    self.token,
                    self.token.h,
                    self.__activateOffShoot)
        if _DEBUG: # pragma: NO COVER
            print "Got past Constructor in SimpleClient"
        register(self.disconnect)
Пример #19
0
 def __init__(self):
     ACSComponent.__init__(self)
     ComponentLifecycle.__init__(self)
     ContainerServices.__init__(self)
Пример #20
0
 def __init__(self):
     ACSComponent.__init__(self)
     ContainerServices.__init__(self)
     return
Пример #21
0
# MA 02111-1307  USA
#
# @(#) $Id: acspyTestContainerServices.py,v 1.7 2006/04/06 21:44:58 dfugate Exp $
###############################################################################
'''
Tests the Container Services.
'''
from Acspy.Servants.ContainerServices import ContainerServices


###############################################################################
def dummie():
    pass


if __name__ == "__main__":
    g = ContainerServices()
    print g.__dict__
    print

    g.setAll(
        "blar",  #string-name of component
        None,  #handle...
        None,  #handle
        dummie  #Container's method
    )
    print g.__dict__
    print
    print "Thread: ", g.getThread(dummie, "dummie thread")
    print "Done..."
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA 02111-1307  USA
#
# @(#) $Id: acspyTestContainerServices.py,v 1.7 2006/04/06 21:44:58 dfugate Exp $
###############################################################################
'''
Tests the Container Services.
'''
from Acspy.Servants.ContainerServices import ContainerServices
###############################################################################
def dummie():
    pass

if __name__=="__main__":
    g = ContainerServices()
    print g.__dict__
    print
    
    g.setAll("blar",  #string-name of component
             None,  #handle...
             None,  #handle
             dummie  #Container's method
             )
    print g.__dict__
    print
    print "Thread: ", g.getThread(dummie, "dummie thread")
    print "Done..."
Пример #23
0
 def __init__(self):
     cc.__init__(self)
     services.__init__(self)
Пример #24
0
	def __init__(self):
		ACSComponent.__init__(self)
		ComponentLifecycle.__init__(self)
		ContainerServices.__init__(self)
Пример #25
0
 def __init__(self, *args, **kw):
     ACSComponent.__init__(self)
     ContainerServices.__init__(self, *args, **kw)
     self._a_number = 0
Пример #26
0
 def __init__(self):
     cc.__init__(self)
     services.__init__(self)
     self.position = 0
     self.sequence = (1.1, 2.2, 3.3)
Пример #27
0
 def __init__(self):
     ACSComponent.__init__(self)
     ContainerServices.__init__(self)
     return