def __init__(self, parent, filepath, fullname): NodeManager.__init__(self) self.OpenFileInCurrent(filepath) self.Parent = parent self.Fullname = fullname
def __init__(self): # TODO change netname when name change NodeManager.__init__(self) odfilepath = self.GetSlaveODPath() if(os.path.isfile(odfilepath)): self.OpenFileInCurrent(odfilepath) else: self.FilePath = "" dialog = CreateNodeDialog(None, wx.OK) dialog.Type.Enable(False) dialog.GenSYNC.Enable(False) if dialog.ShowModal() == wx.ID_OK: name, id, nodetype, description = dialog.GetValues() profile, filepath = dialog.GetProfile() NMT = dialog.GetNMTManagement() options = dialog.GetOptions() self.CreateNewNode(name, # Name - will be changed at build time id, # NodeID - will be changed at build time "slave", # Type description,# description profile, # profile filepath, # prfile filepath NMT, # NMT options) # options else: self.CreateNewNode("SlaveNode", # Name - will be changed at build time 0x00, # NodeID - will be changed at build time "slave", # Type "", # description "None", # profile "", # prfile filepath "heartbeat", # NMT []) # options dialog.Destroy() self.OnCTNSave()
def __init__(self): # TODO change netname when name change NodeManager.__init__(self) odfilepath = self.GetSlaveODPath() if os.path.isfile(odfilepath): self.OpenFileInCurrent(odfilepath) else: self.FilePath = "" dialog = CreateNodeDialog(None, wx.OK) dialog.Type.Enable(False) dialog.GenSYNC.Enable(False) if dialog.ShowModal() == wx.ID_OK: name, id, _nodetype, description = dialog.GetValues() profile, filepath = dialog.GetProfile() NMT = dialog.GetNMTManagement() options = dialog.GetOptions() self.CreateNewNode(name, # Name - will be changed at build time id, # NodeID - will be changed at build time "slave", # Type description, # description profile, # profile filepath, # prfile filepath NMT, # NMT options) # options else: self.CreateNewNode("SlaveNode", # Name - will be changed at build time 0x00, # NodeID - will be changed at build time "slave", # Type "", # description "None", # profile "", # prfile filepath "heartbeat", # NMT []) # options dialog.Destroy() self.OnCTNSave()
def __init__(self, parent, *args, **kwargs): NodeManager.__init__(self, *args, **kwargs) self.Parent = parent