class StringChannel(RegisterBase): def doRead(self): return self.val if hasattr(self, 'val') else "" def doWrite(self, val): self.val = val reg=StringChannel() reg.initialize() cas3 = CAS("TESTCAS:CH", reg, 'string')