89 |
89 |
90 def get_object_init_state(obj): |
90 def get_object_init_state(obj): |
91 # Convert objects to a dictionary of their representation |
91 # Convert objects to a dictionary of their representation |
92 attrs = obj.attrs.copy() |
92 attrs = obj.attrs.copy() |
93 attrs.update(obj.inputs) |
93 attrs.update(obj.inputs) |
94 d = { '__class__': obj.classname, |
94 d = { |
95 'id': obj.id, |
95 '__class__': obj.classname, |
96 'kwargs': json.dumps(attrs), |
96 'id': obj.id, |
97 } |
97 'kwargs': json.dumps(attrs), |
|
98 } |
98 return d |
99 return d |
99 |
100 |
100 |
101 |
101 def get_object_current_state(obj): |
102 def get_object_current_state(obj): |
102 # Convert objects to a dictionary of their representation |
103 # Convert objects to a dictionary of their representation |
103 d = { '__class__': obj.classname, |
104 d = { |
104 'id': obj.id, |
105 '__class__': obj.classname, |
105 'kwargs': json.dumps(obj.outputs), |
106 'id': obj.id, |
106 } |
107 'kwargs': json.dumps(obj.outputs), |
|
108 } |
107 return d |
109 return d |
108 |
110 |
109 |
111 |
110 class SVGUI_HMI(website.PLCHMI): |
112 class SVGUI_HMI(website.PLCHMI): |
111 jsClass = u"LiveSVGPage.LiveSVGWidget" |
113 jsClass = u"LiveSVGPage.LiveSVGWidget" |