Added html and ArchiveEngine Config files
This commit is contained in:
84
epics/css/ArchiveConfigTool/xml/isttokcontrol.xml
Normal file
84
epics/css/ArchiveConfigTool/xml/isttokcontrol.xml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- XML configuration for ISTTOK COntrol
|
||||||
|
2018/01/25 14:28:06.826000000
|
||||||
|
Usage:
|
||||||
|
../../bin/ArchiveConfigTool/ArchiveConfigTool -export -engine ISTTOKcontrol -config t.xml
|
||||||
|
../../bin/ArchiveConfigTool/ArchiveConfigTool -engine ISTTOKcontrol -config isttokcontrol.xml -import -host localhost -port 4812
|
||||||
|
|
||||||
|
../../bin/ArchiveConfigTool/ArchiveConfigTool -engine ISTTOKcontrol -config isttokcontrol.xml -delete_config
|
||||||
|
-->
|
||||||
|
<engineconfig>
|
||||||
|
<group>
|
||||||
|
<name>ISTTOKcontrol</name>
|
||||||
|
<channel><name>ISTTOK:central:VVessel-Pressure</name>
|
||||||
|
<period>00:01:00</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:central:TMPump1-PressureAdmission</name>
|
||||||
|
<period>00:01:00</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:central:RPump1-Pressure</name>
|
||||||
|
<period>00:01:00</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:central:RPump2-Pressure</name>
|
||||||
|
<period>00:01:00</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:central:PULSE-NUMBER</name>
|
||||||
|
<period>00:10:00</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:central:OPSTATE</name>
|
||||||
|
<period>00:10:00</period><monitor/>
|
||||||
|
<enable/>
|
||||||
|
</channel>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<channel><name>ISTTOK:temperature:RawTemperature_0</name>
|
||||||
|
<period>00:00:30</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:temperature:Temperature_0</name>
|
||||||
|
<period>00:00:30</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:temperature:Capbank_Voltage</name>
|
||||||
|
<period>00:00:30</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:vacuum:Pressure_Chamber1</name>
|
||||||
|
<period>10.0</period>
|
||||||
|
<monitor>0.002e-6</monitor>
|
||||||
|
<scan/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:vacuum:Pressure_Chamber1calc</name>
|
||||||
|
<period>30.0</period>
|
||||||
|
<monitor>0.002e-6</monitor>
|
||||||
|
<monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name>ISTTOK:temperature:Uptime</name><period>00:00:30</period><scan/></channel>
|
||||||
|
<channel><name> ISTTOK:galium:Temperature_0</name>
|
||||||
|
<period>30.0</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name> ISTTOK:galium:Temperature_1</name>
|
||||||
|
<period>30.0</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name> ISTTOK:galium:Temperature_2</name>
|
||||||
|
<period>30.0</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name> ISTTOK:galium:Temperature_3</name>
|
||||||
|
<period>30.0</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name> ISTTOK:galium:Temperature_4</name>
|
||||||
|
<period>30.0</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
<channel><name> ISTTOK:galium:Temperature_5</name>
|
||||||
|
<period>30.0</period><monitor/>
|
||||||
|
</channel>
|
||||||
|
|
||||||
|
|
||||||
|
<channel><name>sim://noiseWaveform(0,10,100,10)</name>
|
||||||
|
<period>00:00:00.100</period><scan/>
|
||||||
|
</channel>
|
||||||
|
<channel>
|
||||||
|
<name>sim://sine(0, 10, 50, 0.1)</name>
|
||||||
|
<period>00:00:00.100</period>
|
||||||
|
<scan/>
|
||||||
|
</channel>
|
||||||
|
-->
|
||||||
|
</group>
|
||||||
|
</engineconfig>
|
||||||
38
epics/html/wsgi/wsgi_isttok_status.py
Normal file
38
epics/html/wsgi/wsgi_isttok_status.py
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# https://tecadmin.net/install-apache-mod-wsgi-on-ubuntu-16-04-xenial
|
||||||
|
# Include in /etc/apache2/conf-available/mod-wsgi.conf :
|
||||||
|
# WSGIScriptAlias /isttok /var/www/html/wsgi_isttok_status.py
|
||||||
|
# and
|
||||||
|
# systemctl restart apache2
|
||||||
|
#
|
||||||
|
#import epics
|
||||||
|
from epics import caget, caput, cainfo
|
||||||
|
import os
|
||||||
|
|
||||||
|
os.environ['EPICS_CA_ADDR_LIST'] = 'localhost 192.168.1.110'
|
||||||
|
os.environ['EPICS_CA_AUTO_ADDR_LIST'] = 'NO'
|
||||||
|
|
||||||
|
def application(environ,start_response):
|
||||||
|
status = '200 OK'
|
||||||
|
RPump1press = caget('ISTTOK:central:RPump1-Pressure')
|
||||||
|
RPump2press = caget('ISTTOK:central:RPump2-Pressure')
|
||||||
|
TMPump1press = caget('ISTTOK:central:TMPump1-PressureAdmission')
|
||||||
|
VVesselpress = caget('ISTTOK:central:VVessel-Pressure')
|
||||||
|
rpiCurrentTime = caget('ISTTOK:central:CurrentTime')
|
||||||
|
opState = caget('ISTTOK:central:OPSTATE.VAL')
|
||||||
|
pulseNum = caget('ISTTOK:central:PULSE-NUMBER')
|
||||||
|
html = '<html>\n' \
|
||||||
|
'<body>\n' \
|
||||||
|
' <h1> ISTTOK Present Condition </h1> \n'
|
||||||
|
html += '<p>RPump1-Pressure: ' + str(RPump1press) + ' mBar </p>'
|
||||||
|
html += '<p>RPump2-Pressure: ' + str(RPump2press) + ' mBar </p>'
|
||||||
|
html += '<p>TMPump1-PressureAdmission: ' + str(TMPump1press) + ' mBar </p>'
|
||||||
|
html += '<p>VVessel-Pressure: ' + str(VVesselpress) + ' mBar </p>'
|
||||||
|
html += '<p>OPSTATE: ' + str(opState) + ' </p>'
|
||||||
|
html += '<p>PULSE-NUMBER: ' + str(pulseNum) + ' </p>'
|
||||||
|
html += '<p>Rpi CurrentTime: ' + str(rpiCurrentTime) + ' </p>'
|
||||||
|
html += '</body>\n' \
|
||||||
|
'</html>\n'
|
||||||
|
response_header = [('Content-type','text/html')]
|
||||||
|
start_response(status,response_header)
|
||||||
|
html = bytes(html, encoding= 'utf-8')
|
||||||
|
return [html]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
record(stringout, $(P)$(R)sendmail){
|
record(stringout, $(P)$(R)sendmail){
|
||||||
field(DESC, "Send email")
|
field(DESC, "Send email")
|
||||||
field(DTYP, "stream")
|
field(DTYP, "stream")
|
||||||
field(OUT, "@sendmail.proto send(isttok@ipfn.tecnico.ulisboa.pt,bernardo.brotas@gmail.com) $(PORT) $(A)")
|
field(OUT, "@sendmail.proto send(isttok@ipfn.tecnico.ulisboa.pt,fernando@ipfn.tecnico.ulisboa.pt) $(PORT) $(A)")
|
||||||
# field(PINI, "YES")
|
# field(PINI, "YES")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user