예제 #1
0
파일: client.py 프로젝트: srgblnch/PyTango
def _command(device, cmd_info, *args, **kwargs):
    name = cmd_info.cmd_name
    if cmd_info.in_type == CmdArgType.DevEncoded:
        result = device.command_inout(name, dumps((args, kwargs)))
    else:
        result = device.command_inout(name, *args, **kwargs)
    if cmd_info.out_type == CmdArgType.DevEncoded:
        result = loads(*result)
    return result
예제 #2
0
파일: client.py 프로젝트: cpascual/PyTango
def _command(device, cmd_info, *args, **kwargs):
    name = cmd_info.cmd_name
    if cmd_info.in_type == CmdArgType.DevEncoded:
        result = device.command_inout(name, dumps((args, kwargs)))
    else:
        result = device.command_inout(name, *args, **kwargs)
    if cmd_info.out_type == CmdArgType.DevEncoded:
        result = loads(*result)
    return result
예제 #3
0
파일: client.py 프로젝트: srgblnch/PyTango
 def get(self, name):
     dev = self.device
     result = self.get_attr_info(name)
     if result:
         result = dev.read_attribute(name)
         value = result.value
         if result.type == PyTango.DevEncoded:
             result = loads(*value)
         else:
             result = value
         return result
     result = self.get_cmd_info(name)
     if result is None:
         raise KeyError("Unknown %s" % name)
     return result
예제 #4
0
파일: client.py 프로젝트: cpascual/PyTango
 def get(self, name):
     dev = self.device
     result = self.get_attr_info(name)
     if result:
         result = dev.read_attribute(name)
         value = result.value
         if result.type == PyTango.DevEncoded:
             result = loads(*value)
         else:
             result = value
         return result
     result = self.get_cmd_info(name)
     if result is None:
         raise KeyError("Unknown %s" % name)
     return result