Beispiel #1
0
    def __init__(self,
                 name,
                 macroName,
                 tangoname=None,
                 username=None,
                 **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = "RunMacro"
        self.deviceName = tangoname
        self.macroName = macroName

        try:
            self.device = PyTango.DeviceProxy(self.deviceName)
        except PyTango.DevFailed as traceback:
            last_error = traceback[-1]
            logging.getLogger("HWR").error("%s: %s", str(self.name()),
                                           last_error["desc"])
            self.device = None
        else:
            try:
                self.device.ping()
            except PyTango.ConnectionFailed:
                self.device = None
                raise ConnectionError
    def __init__(self, name, pv_name, username=None, args=None, **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.pv_name = pv_name
        self.read_as_str = kwargs.get("read_as_str", False)
        self.pollers = {}
        self.__valueChangedCallbackRef = None
        self.__timeoutCallbackRef = None

        if args is None:
            self.arglist = ()
        else:
            # not very nice...
            args = str(args)
            if not args.endswith(","):
                args += ","
            self.arglist = eval("(" + args + ")")

        if len(self.arglist) > 1:
            logging.getLogger("HWR").error(
                "EpicsCommand: ftm only scalar arguments are supported."
            )
            return

        self.pv = epics.PV(pv_name, auto_monitor=True)
        self.pv_connected = self.pv.connect()
        self.valueChanged(self.pv.get(as_string=self.read_as_str))
        logging.getLogger("HWR").debug(
            "EpicsCommand: creating pv %s: read_as_str = %s",
            self.pv_name,
            self.read_as_str,
        )
    def __init__(self, name, pv_name, username=None, args=None, **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.pv_name = pv_name
        self.read_as_str = kwargs.get("read_as_str", False)
        self.pollers = {}
        self.__valueChangedCallbackRef = None
        self.__timeoutCallbackRef = None

        if args is None:
            self.arglist = ()
        else:
            # not very nice...
            args = str(args)
            if not args.endswith(","):
                args += ","
            self.arglist = eval("(" + args + ")")

        if len(self.arglist) > 1:
            logging.getLogger("HWR").error(
                "EpicsCommand: ftm only scalar arguments are supported.")
            return

        self.pv = epics.PV(pv_name, auto_monitor=True)
        self.pv_connected = self.pv.connect()
        self.valueChanged(self.pv.get(as_string=self.read_as_str))
        logging.getLogger("HWR").debug(
            "EpicsCommand: creating pv %s: read_as_str = %s",
            self.pv_name,
            self.read_as_str,
        )
Beispiel #4
0
    def __init__(self,
                 name,
                 command,
                 taconame=None,
                 username=None,
                 args=None,
                 dc=False,
                 **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = command
        self.deviceName = taconame
        self.dataCollector = dc
        self.pollers = {}
        self.__valueChangedCallbackRef = None
        self.__timeoutCallbackRef = None

        if args is None:
            self.arglist = ()
        else:
            # not very nice...
            args = str(args)
            if not args.endswith(","):
                args += ","
            self.arglist = eval("(" + args + ")")

        self.connectDevice()
    def __init__(self, name, cmd, username=None, klass=SimulatedAction):
        CommandObject.__init__(self, name, username)
        self._cmd = klass()
	self._cmd_execution = None

        if self.name() == 'Anneal':
            self.addArgument("Time [s]", "float")
        if self.name() == 'Test':
            self.addArgument("combo test", "combo", [ {"value1": 0, "value2": 1 } ])
Beispiel #6
0
    def __init__(self,
                 name,
                 command_name,
                 list_args=None,
                 timeout=1000,
                 **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command_name = command_name
        self.result = None
Beispiel #7
0
    def __init__(self,
                 name,
                 command,
                 taurusname=None,
                 username=None,
                 **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = command
        self.taurusname = taurusname
        self.device = None
Beispiel #8
0
 def __init__(self,
              name,
              command,
              username=None,
              address=None,
              port=None,
              timeout=3,
              **kwargs):
     CommandObject.__init__(self, name, username, **kwargs)
     self.command = command
     self.__exporter = start_exporter(address, port, timeout)
Beispiel #9
0
 def __init__(self,
              name,
              command_name,
              tinename=None,
              username=None,
              list_args=None,
              timeout=1000,
              **kwargs):
     CommandObject.__init__(self, name, username, **kwargs)
     self.command_name = command_name
     self.tine_name = tinename
     self.timeout = int(timeout)
    def __init__(self, name, cmd, username=None, klass=SimulatedAction):
        CommandObject.__init__(self, name, username)
        self._cmd = klass()
        self._cmd_execution = None

        if self.name() == 'Anneal':
            self.addArgument("Time [s]", "float")
        if self.name() == 'Test':
            self.addArgument("combo test", "combo", [{
                "value1": 0,
                "value2": 1
            }])
    def __init__(
        self,
        name,
        command_name,
        ListArgs=None,
        timeout=1000,
        **kwargs
    ):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command_name = command_name
        self.result = None
    def __init__(self, name, cmd, username=None, klass=SimulatedAction):
        CommandObject.__init__(self, name, username)
        self._cmd = klass()
        self._cmd_execution = None
        self.type = "CONTROLLER"

        if self.name() == "Anneal":
            self.add_argument("Time [s]", "float")
        if self.name() == "Test":
            self.add_argument("combo test", "combo", [{
                "value1": 0,
                "value2": 1
            }])
Beispiel #13
0
 def __init__(self, name, macroName, tangoname = None, username = None, **kwargs):
     CommandObject.__init__(self, name, username, **kwargs)
     
     self.command = "RunMacro"
     self.deviceName = tangoname
     self.macroName = macroName
     
     try:
         self.device = PyTango.DeviceProxy(self.deviceName)
     except PyTango.DevFailed, traceback:
         last_error = traceback[-1]
         logging.getLogger('HWR').error("%s: %s", str(self.name()), last_error['desc'])
         self.device = None
Beispiel #14
0
 def __init__(self,
              name,
              command,
              username=None,
              address=None,
              port=None,
              timeout=3,
              **kwargs):
     CommandObject.__init__(self, name, username, **kwargs)
     self.command = command
     self.__exporter = start_exporter(address, port, timeout)
     msg = "Attaching Exporter command: {} {}".format(address, name)
     logging.getLogger("HWR").debug(msg)
Beispiel #15
0
 def __init__(
     self,
     name,
     command_name,
     tinename=None,
     username=None,
     ListArgs=None,
     timeout=1000,
     **kwargs
 ):
     CommandObject.__init__(self, name, username, **kwargs)
     self.commandName = command_name
     self.tineName = tinename
     self.timeout = int(timeout)
Beispiel #16
0
    def __init__(self,
                 name,
                 macroName,
                 tangoname=None,
                 username=None,
                 **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = "RunMacro"
        self.deviceName = tangoname
        self.macroName = macroName

        try:
            self.device = PyTango.DeviceProxy(self.deviceName)
        except PyTango.DevFailed, traceback:
            last_error = traceback[-1]
            logging.getLogger('HWR').error("%s: %s", str(self.name()),
                                           last_error['desc'])
            self.device = None
Beispiel #17
0
    def __init__(self, name, macroName, tangoname=None, username=None, **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = "RunMacro"
        self.deviceName = tangoname
        self.macroName = macroName

        try:
            self.device = PyTango.DeviceProxy(self.deviceName)
        except PyTango.DevFailed as traceback:
            last_error = traceback[-1]
            logging.getLogger("HWR").error(
                "%s: %s", str(self.name()), last_error["desc"]
            )
            self.device = None
        else:
            try:
                self.device.ping()
            except PyTango.ConnectionFailed:
                self.device = None
                raise ConnectionError
Beispiel #18
0
    def __init__(
        self, name, command, taconame=None, username=None, args=None, dc=False, **kwargs
    ):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = command
        self.deviceName = taconame
        self.dataCollector = dc
        self.pollers = {}
        self.__valueChangedCallbackRef = None
        self.__timeoutCallbackRef = None

        if args is None:
            self.arglist = ()
        else:
            # not very nice...
            args = str(args)
            if not args.endswith(","):
                args += ","
            self.arglist = eval("(" + args + ")")

        self.connectDevice()
Beispiel #19
0
    def getArguments(self):
        """Get the command object arguments"""
        if self.name() == "Anneal":
            self._arguments.append(("Time [s]", "float"))

        return CommandObject.getArguments(self)
 def __init__(self, name, cmd):
     CommandObject.__init__(self, name)
     self._cmd = cmd
     self._cmd_execution = None
     self.type = "CONTROLLER"
    def get_arguments(self):
        if self.name() == "Anneal":
            self.add_argument("Time [s]", "float")

        return CommandObject.get_arguments(self)
 def __init__(self, name, cmd):
     CommandObject.__init__(self, name)
     self._cmd = cmd
     self._cmd_execution = None
     self.type = "CONTROLLER"
Beispiel #23
0
    def getArguments(self):
        if self.name() == 'Anneal':
            self.addArgument("Time [s]", "float")

        return CommandObject.getArguments(self)
    def __init__(self, name, command, taurusname=None, username=None, **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = command
        self.taurusname = taurusname
        self.device = None
Beispiel #25
0
 def get_arguments(self):
     """Get the command object arguments"""
     if self.name() == "Anneal":
         self.add_argument("Time [s]", "float")
     return CommandObject.get_arguments(self)
Beispiel #26
0
 def __init__(self, name, hwobj):
     CommandObject.__init__(self, name)
     self._hwobj = hwobj
     self.type = TWO_STATE_COMMAND_T
Beispiel #27
0
 def get_arguments(self):
     """Get the command object arguments"""
     return CommandObject.get_arguments(self)
 def __init__(self, name, cmd):
     CommandObject.__init__(self, name)
     self._cmd = cmd
     self._cmd_execution = None
     self.type = PROCEDURE_COMMAND_T
    def getArguments(self):
        if self.name() == "Anneal":
            self.addArgument("Time [s]", "float")

        return CommandObject.getArguments(self)
 def __init__(self, name, hwobj):
     CommandObject.__init__(self, name)
     self._hwobj = hwobj
     self.type = TWO_STATE_COMMAND_T
 def __init__(self, name, cmd):
     CommandObject.__init__(self, name)
     self._cmd = cmd
     self._cmd_execution = None
    def __init__(self, name, cmd):
        CommandObject.__init__(self, name)
        self._cmd = cmd
	self._cmd_execution = None
Beispiel #33
0
 def __init__(self, name, command, version=None, username=None, **kwargs):
     CommandObject.__init__(self, name, username, **kwargs)
     SpecCommandA.__init__(self, command, version)
     self.__cmdExecution = False
Beispiel #34
0
 def __init__(self, name, cmd):
     CommandObject.__init__(self, name)
     self._cmd = cmd
     self._cmd_execution = None
     self.type = PROCEDURE_COMMAND_T
    def __init__(self, name, command, username = None, address = None, port = None, timeout=3,  **kwargs):
        CommandObject.__init__(self, name, username, **kwargs)

        self.command = command

        self.__exporter = start_exporter(address, port, timeout)
Beispiel #36
0
 def __init__(self, name, command, version = None, username = None, **kwargs):
     CommandObject.__init__(self, name, username, **kwargs)
     SpecCommandA.__init__(self, command, version)
     self.__cmdExecution = False