--- a/tests/svghmi/py_ext_0@py_ext/pyfile.xml Mon Jul 13 13:56:42 2020 +0200
+++ b/tests/svghmi/py_ext_0@py_ext/pyfile.xml Tue Jul 14 22:05:47 2020 +0200
@@ -5,6 +5,18 @@
</variables>
<globals>
<xhtml:p><![CDATA[
+from twisted.web.resource import Resource
+
+class AlarmJsonResource(Resource):
+ def render_GET(self, request):
+ return ''
+
+ def render_POST(self, request):
+ print(request.__dict__)
+ newdata = request.content.getvalue()
+ print newdata
+ return ''
+
def MyOnChangeFunc(changed_var_name):
print changed_var_name + ": " + getattr(PLCGlobals, changed_var_name)
@@ -21,6 +33,10 @@
</cleanup>
<start>
<xhtml:p><![CDATA[
+
+svghmi_root.putChild("alarms", AlarmJsonResource())
+
+
]]></xhtml:p>
</start>
<stop>