소스 검색

a messy try of implementing a plugin system for code generator
Manual:
*run a build
*look into tool/generate_builtin.py
*seach opcua.c for "Hello"

Stasik0 11 년 전
부모
커밋
909a03eeaf
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      tool/plugin_Node.py

+ 11 - 0
tool/plugin_Node.py

@@ -0,0 +1,11 @@
+from __future__ import print_function
+
+def setup():
+	config = dict()
+	config["pluginType"] = "structuredObjectCreation";
+	config["tagName"] = "Node";
+	return config
+
+def createElement(element, fc, fh):
+	print("/* Hello from plugin */", end='\n', file=fc)
+	return "continue"