def _write_attribute(self, dev, att_name, att_val): """ _write_attribute(PyTango.DeviceProxy dev, string att_name, object attr_val) Writes the given attribute from the given device with the given value. """ val = PyTango.AttributeValue() val.name = att_name val.value = att_val dev.write_attribute(val)
def writeAttribute(self, attrname, val, dim_x=None, dim_y=None): av = PyTango.AttributeValue() av.name = attrname av.value = val if dim_x: av.dim_x = dim_x elif type(val) is list: av.dim_x = len(val) else: av.dim_x = 1 if dim_y: av.dim_y = dim_y else: av.dim_y = 0 self.dp.write_attribute(av)
def getNewOperation(self, value): attr_value = PyTango.AttributeValue() attr_value.name = self.getSimpleName() attr_value.value = self.encode(value) op = WriteAttrOperation(self, attr_value) return op