def module_enum(self): i = [] for module in self.modules: i.append(module) return Value.build_enum(i)
def address_enum(self): i = [] for address in self.addresses: i.append(address) return Value.build_enum(i)
def __init__(self, device, node): Actuator.__init__(self, device, node) self.channel = self.node.get_attribute("@Channel") self.mappings = ast.literal_eval(self.node.get_attribute("@Mappings")) self.node.set_type(Value.build_enum(self.mappings.keys()))