def tostring(self, type, indent=0): ret = ("Slave ('%s','%s', (0x%x,0x%x,0x%x) -> '%s') " % (YoUtil.str_strip( self.name_in_res), YoUtil.str_strip( self.device_name), self.vendor_id, self.productCode, self.revisionNo, YoUtil.str_strip(self.ProductName))) + '\n' ret += YoUtil.get_indent(indent + 1) + 'ProcessData ' if self.ProcessData_Send_BitStart != None: ret += ('Send BitStart=%d, BitLength=%d' % (self.ProcessData_Send_BitStart, self.ProcessData_Send_BitLength)) if self.ProcessData_Recv_BitStart != None: ret += (', Recv BitStart=%d, BitLength=%d' % (self.ProcessData_Recv_BitStart, self.ProcessData_Recv_BitLength)) ret += '\n' if self.DC != None: ret += self.DC.tostring(indent + 1) if self.Mailbox != None: ret += '\n' + self.Mailbox.tostring(indent + 1) if type >= 1: ret += ("%sInitCmds count= %d" % (YoUtil.get_indent(indent + 1), len(self.InitCmds))) + '\n' self.InitCmds = sorted(self.InitCmds, key=attrgetter('Ado')) for initCmd in self.InitCmds: str = initCmd.tostring(indent + 2) ret += (str) return ret
def tostring(self, indent=0): if self.Ado != None: ret = YoUtil.get_indent( indent ) + 'InitCmd Ado,Adp=(0x%4.4x,0x%4.4x) [%s] - "%s" - Data=[%s] Cnt=[%s] Cmd=[%s] CompleteAccess=[%s]' % ( self.Ado, self.Adp, self.get_transitions(), YoUtil.str_strip(self.Comment), self.Data, YoUtil.str_strip(self.Cnt), YoUtil.str_strip( self.Cmd), YoUtil.str_strip(self.CompleteAccess)) + '\n' elif self.Index != None: ret = YoUtil.get_indent( indent ) + 'InitCmd Index=(0x%4.4x.%d) [%s] - "%s" - Data=[%s] Cnt=[%s] Cmd=[%s] CompleteAccess=[%s]' % ( self.Index, self.SubIndex, self.get_transitions(), YoUtil.str_strip(self.Comment), self.Data, YoUtil.str_strip(self.Cnt), YoUtil.str_strip( self.Cmd), YoUtil.str_strip(self.CompleteAccess)) + '\n' return ret
def tostring(self, type, indent=0): ret = ("Master name='%s' " % (YoUtil.str_strip(self.name))) + '\n' ret += ("%sInitCmds count= %d" % (YoUtil.get_indent(indent + 1), len(self.InitCmds))) + '\n' self.InitCmds = sorted(self.InitCmds, key=attrgetter('Ado')) for initCmd in self.InitCmds: str = initCmd.tostring(indent + 2) ret += (str) return ret
def tostring(self, ident=0): ret = YoUtil.get_indent(ident) + 'Mailbox' ret += '\n' + YoUtil.get_indent(ident + 1) + 'Protocols: ' ret += YoUtil.list_to_comma_separated(self.Protocols) + ' ' ret += '\n' + YoUtil.get_indent(ident + 1) + ( "Send: Start=%d Length= %d, Recv: Start=%d, Length=%d" % (self.Send_Start, self.Send_Length, self.Recv_Start, self.Recv_Length)) if self.Recv_PollTime != None: ret += (", PollTime=%d") % (self.Recv_PollTime) if self.Recv_StatusBitAddr != None: ret += (", StatusBitAddr=%d") % (self.Recv_StatusBitAddr) if self.CoEInitCmds != None: self.CoEInitCmds = sorted(self.CoEInitCmds, key=attrgetter('Index')) ret += ( "\n%sCoE InitCmds count= %d" % (YoUtil.get_indent(ident + 1), len(self.CoEInitCmds))) + '\n' for initCmd in self.CoEInitCmds: str = initCmd.tostring(ident + 2) ret += (str) return ret
def tostring(self,indent=0): ret = YoUtil.get_indent(indent)+'DC -'+'ReferenceClock='+str(self.ReferenceClock)+' CycleTime0='+str(self.CycleTime0)+' CycleTime1='+str(self.CycleTime1)+' ShiftTime='+str(self.ShiftTime) return ret