Skip to content
Snippets Groups Projects
Commit eaab72dd authored by jkerdreu's avatar jkerdreu
Browse files

New API



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@1407 b32b6428-25c9-4566-ad07-03861ab6144f
parent 500d0533
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@ class Wol(xAAL.devices.Device):
def __init__(self,address,computers):
xAAL.devices.Device.__init__(self,"wol.basic",address)
self.setVendorID("IHSEV")
self.setProductID("Wol")
self.set_vendor_id("IHSEV")
self.set_product_id("Wol")
self.__computers = computers
def wol(self,computer):
......@@ -38,10 +38,10 @@ class Wol(xAAL.devices.Device):
def main():
configFile = xAAL.tools.getConfigFile(Wol.__name__)
cfg = xAAL.tools.loadConfigFile(configFile)
config_file = xAAL.tools.get_cfg_file(Wol.__name__)
cfg = xAAL.tools.load_cfg_file(config_file)
if cfg == None:
cfg = xAAL.tools.newDefaultConfigFile(configFile,'Wol')
cfg = xAAL.tools.new_cfg(config_file,'Wol')
addr = cfg.get('Wol','xaaladdr')
......@@ -52,7 +52,7 @@ def main():
wol = Wol(addr,computers)
eng=xAAL.core.Engine()
eng.registerDevices([wol,])
eng.register_devices([wol,])
eng.run()
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment