예제 #1
0
    def _create_action(self, name, args):
        """ Creates an action and sets it run function to ActionName() or
        soap_ActionName().

        @note soap_ActionName() is deprecated, use ActionName() instead.
        """
        action = Action(self.service, name, args)
        action.run_function = getattr(self.service, "%s" % name, None)

        if not action.run_function:
            # Try the old API (soap_ActionName())
            action.run_function = getattr(self.service, "soap_%s" % name, None)

        return action
예제 #2
0
파일: service.py 프로젝트: woogiee/sonospy
    def _create_action(self, name, args):
        """ Creates an action and sets it run function to ActionName() or
        soap_ActionName().

        @note soap_ActionName() is deprecated, use ActionName() instead.
        """
        action = Action(self.service, name, args)
        action.run_function = getattr(self.service, "%s" % name, None)

        if not action.run_function:
            # Try the old API (soap_ActionName())
            action.run_function = getattr(self.service, "soap_%s" % name, None)

        return action
예제 #3
0
파일: myservice.py 프로젝트: joaoAvno/Sonar
    def __init__(self):
        Service.__init__(self, service_name, service_type, "")

        varIn = StateVariable(self, "A_ARG_TYPE_Textin", True, False, "string")
        varIn.subscribe_for_update(self.varUpdateCallback)
        varOut = StateVariable(self, "A_ARG_TYPE_Textout", False, False, "string")
        varOut.subscribe_for_update(self.varUpdateCallback)
        self.add_state_variable(varIn)
        self.add_state_variable(varOut)

        argIn = Argument("TextIn", Argument.IN, varIn)
        argOut = Argument("TextOut", Argument.OUT, varOut)

        actionMyMethod = Action(self, "MyMethod", [argIn, argOut])
        actionMyMethod.run_function = MyMethod
        self.add_action(actionMyMethod)
예제 #4
0
    def __init__(self):
        Service.__init__(self, service_name, service_type, '')

        varIn = StateVariable(self, "A_ARG_TYPE_Textin",
                              True, False, "string")
        varIn.subscribe_for_update(self.varUpdateCallback)
        varOut = StateVariable(self, "A_ARG_TYPE_Textout",
                               False, False, "string")
        varOut.subscribe_for_update(self.varUpdateCallback)
        self.add_state_variable(varIn)
        self.add_state_variable(varOut)

        argIn = Argument("TextIn", Argument.IN, varIn)
        argOut = Argument("TextOut", Argument.OUT, varOut)

        actionMyMethod = Action(self, "MyMethod", [argIn, argOut])
        actionMyMethod.run_function = MyMethod
        self.add_action(actionMyMethod)
예제 #5
0
파일: service.py 프로젝트: jimmy2e/Sonar
 def _create_action(self, name, args):
     print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>ServiceBuilder.create_action"
     """ Creates an action and sets it run function to soap_ActionName(). """
     action = Action(self.service, name, args)
     action.run_function = getattr(self.service, "soap_%s" % name, None)
     return action