Skip to content

Commit e8cd4ee

Browse files
committed
updated daq and hmi, removed unused code
- removed separate handler files for daq - removed seperate HMIVariable model - added restart of daq when Variable or Device model are changed - added support for different byte order of aquired data - fixed support for U/INT64 and U/INT32 datatypes - removed chart_set from hmi - updated docs - removed unused code
1 parent b7e0a53 commit e8cd4ee

30 files changed

+634
-1497
lines changed

CHANGELOG.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,14 @@
55
- readded log notifications in HMI
66
- added loading animation for data prefetch in HMI
77
- changed id in Log model to timestame + id schema
8+
9+
0.7.0b3
10+
- removed separate handler files for daq
11+
- removed seperate HMIVariable model
12+
- added restart of daq when Variable or Device model are changed
13+
- added support for different byte order of aquired data
14+
- fixed support for U/INT64 and U/INT32 datatypes
15+
- removed chart_set from hmi
16+
- updated docs
17+
- removed unused code
18+

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Dependencies
2222

2323
- core/HMI
2424
* python 2.7
25-
* django>=1.6
25+
* django>=1.7
2626
* numpy>=1.6.0
2727
* pillow
2828
* python-daemon

docs/backend.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,6 @@ values to the server the coresponding function code will be selected automaticly
8787
.. image:: pic/backend_modbus_save_device.png
8888

8989

90-
To use the Variable in the HMI a *Hmi variable* entry has to be added, to do so open
91-
the *Hmi variable* table in the *PyScada HMI* section and click
92-
*add hmi variable* in the upper right corner.
93-
94-
*TODO* add picture
95-
96-
Select the Variable to assign by clicking on the magnifier symbol or writing the
97-
id of the Variable. Provide a *short_name* that will be used in the HMI or leave
98-
the field blank to use the *name* of the *Variable*. Select the *color* and
99-
*line thickness* for charts. (a default set of colors can be added by loading
100-
the color.json fixture, *TODO* link to the commandline example)
101-
102-
*TODO* add picture
10390

10491
Add a new View
10592
--------------

docs/nginx_setup.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ nginx configuration
99
::
1010
1111
# debian
12-
sudo wget https://raw.githubusercontent.com/trombastic/PyScada/dev/0.6.x/extras/nginx_sample.conf -O /etc/nginx/sites-available/pyscada.conf
12+
sudo wget https://raw.githubusercontent.com/trombastic/PyScada/dev/0.7.x/extras/nginx_sample.conf -O /etc/nginx/sites-available/pyscada.conf
1313
sudo nano /etc/nginx/sites-available/pyscada.conf
1414
# Fedora
15-
sudo wget https://raw.githubusercontent.com/trombastic/PyScada/dev/0.6.x/extras/nginx_sample.conf -O /etc/nginx/conf.d/pyscada.conf
15+
sudo wget https://raw.githubusercontent.com/trombastic/PyScada/dev/0.7.x/extras/nginx_sample.conf -O /etc/nginx/conf.d/pyscada.conf
1616
sudo nano /etc/nginx/conf.d/pyscada.conf
1717

1818

pyscada/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#__import__('pkg_resources').declare_namespace('pyscada')
33

4-
__version__ = '0.7.0b2'
4+
__version__ = '0.7.0b3'
55
__author__ = 'Martin Schröder'
66

77
default_app_config = 'pyscada.apps.PyScadaConfig'

pyscada/admin.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from pyscada.models import DeviceWriteTask
77
from pyscada.models import Log
88
from pyscada.models import BackgroundTask
9-
from pyscada.models import RecordedDataCache
109
from pyscada.models import Event
1110
from pyscada.models import RecordedEvent
1211
from pyscada.models import Mail
@@ -121,24 +120,6 @@ def has_add_permission(self, request):
121120
def has_delete_permission(self, request, obj=None):
122121
return False
123122

124-
class RecordedDataCacheAdmin(admin.ModelAdmin):
125-
list_display = ('id','last_change','name','value','unit','last_update',)
126-
list_display_links = ('name',)
127-
list_filter = ('variable__device','variable__unit')
128-
search_fields = ['variable__name',]
129-
readonly_fields = ('last_change','last_update','time',)
130-
def name(self,instance):
131-
return instance.variable.name
132-
def unit(self,instance):
133-
return instance.variable.unit.unit
134-
def last_change(self,instance):
135-
return datetime.datetime.fromtimestamp(int(instance.last_change.timestamp)).strftime('%Y-%m-%d %H:%M:%S')
136-
def last_update(self,instance):
137-
return datetime.datetime.fromtimestamp(int(instance.time.timestamp)).strftime('%Y-%m-%d %H:%M:%S')
138-
def has_add_permission(self, request):
139-
return False
140-
def has_delete_permission(self, request, obj=None):
141-
return False
142123

143124

144125
class BackgroundTaskAdmin(admin.ModelAdmin):
@@ -187,4 +168,3 @@ class EventAdmin(admin.ModelAdmin):
187168
admin.site.register(DeviceWriteTask,DeviceWriteTaskAdmin)
188169
admin.site.register(Log,LogAdmin)
189170
admin.site.register(BackgroundTask,BackgroundTaskAdmin)
190-
admin.site.register(RecordedDataCache,RecordedDataCacheAdmin)

0 commit comments

Comments
 (0)