etherlab/EthercatMaster.py
changeset 2127 32255ca50fb0
parent 2124 1f2c3fdd70d0
child 2133 ba0b2ca7db26
equal deleted inserted replaced
2126:7b5e83c2c23d 2127:32255ca50fb0
   433                             CTNType = "EthercatSlave"
   433                             CTNType = "EthercatSlave"
   434                         self.CTNAddChild("slave%s" % slave["idx"], CTNType, slave["idx"])
   434                         self.CTNAddChild("slave%s" % slave["idx"], CTNType, slave["idx"])
   435                         self.SetSlaveAlias(slave["idx"], slave["alias"])
   435                         self.SetSlaveAlias(slave["idx"], slave["alias"])
   436                         type_infos["device_type"] = device.getType().getcontent()
   436                         type_infos["device_type"] = device.getType().getcontent()
   437                         self.SetSlaveType(slave["idx"], type_infos)
   437                         self.SetSlaveType(slave["idx"], type_infos)
   438 
   438             
       
   439                 if app_frame:
       
   440                     app_frame.RefreshProjectTree()
       
   441             
   439     def CTNAddChild(self, CTNName, CTNType, IEC_Channel=0):
   442     def CTNAddChild(self, CTNName, CTNType, IEC_Channel=0):
   440         """
   443         """
   441         Create the confnodes that may be added as child to this node self
   444         Create the confnodes that may be added as child to this node self
   442         @param CTNType: string desining the confnode class name (get name from CTNChildrenTypes)
   445         @param CTNType: string desining the confnode class name (get name from CTNChildrenTypes)
   443         @param CTNName: string for the name of the confnode instance
   446         @param CTNName: string for the name of the confnode instance