diff --git a/epics/css/ArchiveConfigTool/xml/isttokcontrol.xml b/epics/css/ArchiveConfigTool/xml/isttokcontrol.xml new file mode 100644 index 0000000..2202bab --- /dev/null +++ b/epics/css/ArchiveConfigTool/xml/isttokcontrol.xml @@ -0,0 +1,84 @@ + + + + + ISTTOKcontrol + ISTTOK:central:VVessel-Pressure + 00:01:00 + + ISTTOK:central:TMPump1-PressureAdmission + 00:01:00 + + ISTTOK:central:RPump1-Pressure + 00:01:00 + + ISTTOK:central:RPump2-Pressure + 00:01:00 + + ISTTOK:central:PULSE-NUMBER + 00:10:00 + + ISTTOK:central:OPSTATE + 00:10:00 + + + + + + diff --git a/epics/html/wsgi/wsgi_isttok_status.py b/epics/html/wsgi/wsgi_isttok_status.py new file mode 100644 index 0000000..0f3ce00 --- /dev/null +++ b/epics/html/wsgi/wsgi_isttok_status.py @@ -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 = '\n' \ + '\n' \ + '

ISTTOK Present Condition

\n' + html += '

RPump1-Pressure: ' + str(RPump1press) + ' mBar

' + html += '

RPump2-Pressure: ' + str(RPump2press) + ' mBar

' + html += '

TMPump1-PressureAdmission: ' + str(TMPump1press) + ' mBar

' + html += '

VVessel-Pressure: ' + str(VVesselpress) + ' mBar

' + html += '

OPSTATE: ' + str(opState) + '

' + html += '

PULSE-NUMBER: ' + str(pulseNum) + '

' + html += '

Rpi CurrentTime: ' + str(rpiCurrentTime) + '

' + html += '\n' \ + '\n' + response_header = [('Content-type','text/html')] + start_response(status,response_header) + html = bytes(html, encoding= 'utf-8') + return [html] diff --git a/epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/sendmail.db b/epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/sendmail.db index bc1ebad..1ec8abf 100644 --- a/epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/sendmail.db +++ b/epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/sendmail.db @@ -1,7 +1,7 @@ record(stringout, $(P)$(R)sendmail){ field(DESC, "Send email") 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") }