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

Prepare the JS stuff


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2871 b32b6428-25c9-4566-ad07-03861ab6144f
parent bd584c94
No related branches found
No related tags found
No related merge requests found
......@@ -200,5 +200,5 @@ class DeviceBuilder:
db = DeviceBuilder()
#db.build_py()
db.build_js()
db.build_py()
#db.build_js()
class XAAL_${name} extends XAALDevice {
setup() {
this.devtype = '${devtype}';
% for attr in attributes:
this.${attr} = null;
% endfor
}
% for meth in methods:
<%
keys = list(methods[meth].get('in',{}).keys())
#tmp = map(lambda x: '_%s=None' % x,keys)
args = ','.join(keys)
%> ${meth}(${args}){
console.log("Calling ${meth} methods");
}
% endfor
}
\ No newline at end of file
class XAALDevice {
constructor(address) {
this.address = address;
this.devtype = null;
this.setup();
}
setup() {
console.log("Please override me");
}
}
\ No newline at end of file
"""
Autogenerated devices skeletons. This file is generated from the json schemas
at https://redmine.telecom-bretagne.eu/svn/xaal/schemas/branches/schemas-0.7
This python module is updated frequently according to schemas
"""
from xaal.lib import Device,tools
import logging
logger = logging.getLogger(__name__)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment