This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC0000661, the State of Michigan.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

SNS Integrated Control System SNS RDB Requirements, wish list, status A little history l Oracle RDB used exclusively by accelerator physics group l JERI.
Session Variables Storing Session Variables on the Server.
1 1999/Ph 514: Working With an IOC EPICS Working with an IOC Marty Kraimer APS.
Java Script Session1 INTRODUCTION.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
Server-Side vs. Client-Side Scripting Languages
1 Chapter 12 Working With Access 2000 on the Internet.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
J4www/jea Week 3 Version Slide edits: nas1 Format of lecture: Assignment context: CRUD - “update details” JSP models.
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
Creating your website Using Plain HTML. What is HTML? ► Web pages are authored in HyperText Markup Language (HTML) ► Plain text is marked up with tags,
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
The Internet & The World Wide Web Notes
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Simple Web SQLite Manager/Form/Report
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
DØ Channel Archiver Tutorial V.Sirotenko, 4/4/2001.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Drupal Workshop Introduction to Drupal Part 1: Web Content Management, Advantages/Disadvantages of Drupal, Drupal terminology, Drupal technology, directories.
Label production Solution with Label Gallery programs Label Gallery is used for general label design and print GalleryData is used to create small database.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC Michigan State.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October
What’s new in agenTel 6.2 December 2009 The Voxtron Factory.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Jonathan Westlake, ed: Nic Shulver JSP, Structure and JavaBeans JSP models Assignment context “Register as a member of the site/show member details/update.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES LECTURE 5_1 George Koutsogiannakis/ Summer
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
What is Java Script? An extension to HTML. An extension to HTML. Allows authors to incorporate some functionality in their web pages. (without using CGI.
Dreamweaver An introduction to Dreamweaver by a beginner who can show you the rudiments of quickly and easily creating a web site. An attempt to offer.
Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb Material copied from the IOC Application Developer's.
ACNET to EPICS Meeting SNS Device DB Tools J. Patrick November 4, 2008.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
OOSSE Week 8 JSP models Format of lecture: Assignment context JSP models JSPs calling other JSPs i.e. breaking up work Parameter passing JSPs with Add.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC Michigan State.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC Michigan State.
SNS Integrated Control System EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
SNS Integrated Control System ORACLE –JERI DB Generation April 27, 2004 Coles Sibley Jeff Patton.
SciDAC SSS Quarterly Report Sandia Labs January 25, 2005 William McLendon Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
CSE 103 Day 20 Jo is out today; I’m Carl
PHP / MySQL Introduction
Introduction to JavaScript
MVC Framework, in general.
A second look at JavaScript
Web Browser server client 3-Tier Architecture Apache web server PHP
Chapter 27 WWW and HTTP.
Building Web Applications
Introduction to JavaScript
Presentation transcript:

This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan and Michigan State University. Michigan State University designs and establishes FRIB as a DOE Office of Science National User Facility in support of the mission of the Office of Nuclear Physics. John A. Priller Senior Engineer infoServ

An IOC task for providing IOC, PV and other information to scripting languages like Python and Java using HTTP URL requests. [ NOTE: HTTP GET only, PUT is never allowed! ] Data is returned in JSON-encoded text structures when appropriate, for easy parsing using the JSON decoders available in most high-level scripting languages. A number of different informational URLs are provided, more can be added by registering user URL handlers. Small and self-contained, no support libraries needed, should run on any EPICS platform. What is infoServ? J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 2

There is a LOT of useful information known to an EPICS IOC that cannot be retrieved using Channel Access (not in R3.x anyway): Listing of all the record names on the IOC Record aliases Record information items i.e. info(key,value) – VERY useful! EPICS version information Environment variable and macro values st.cmd, *.dbd, *.db, *.substitutions and other file content Why Would Anyone Need This? [1 of 2] J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 3

For some things that could be done via Channel Access (example: retrieve the RTYP and ADEL field values of every record) it's much simpler for a script to make a HTTP request and parse a JSON-encoded reply… … than it is to build tens or hundreds (or perhaps thousands) of Channel Access requests – and this method is only possible when all the record names are already known. Why Would Anyone Need This? [2 of 2] J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 4

record(ai, "DEMONSTRATION_AI_RECORD") { info("publish", "yes")# publish name in channel list info("archive", “yes")# archive record’s value alias("InternalAlias")# demo alias inside record field(DESC, "Demonstration ai record") field(DTYP, "Soft Channel") field(SCAN, "Passive") field(PREC, "2") field(ADEL, "0.1") } # demo alias outside the record alias("InternalAlias", "ExternalAlias") Example: What’s on the IOC? A Sample Database File J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 5

... iocInit() dbl > /home/cf-update/${HOSTNAME}.${IOC}.dbl Example: What’s on the IOC? Our Previous Method J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 6 DEMONSTRATION_AI_RECORD ExternalAlias InternalAlias Dump the output of an IOC shell “dbl” command to a file for processing by other software (ChannelFinder in our case): For our sample database, this gets us a file containing: I need a LOT more information than that!

{ "pvs": { "DEMONSTRATION_AI_RECORD": { "type": "ai", "fields": { "ADEL": "0.1", "DESC": "Demonstration ai record" }, "aliases": [ "ExternalAlias", "InternalAlias" ], "info": { "publish": "yes", "archive": “yes" } }, "ExternalAlias": { "type": "ai", "is_alias_to": "DEMONSTRATION_AI_RECORD", "fields": { "ADEL": "0.1", "DESC": "Demonstration ai record" } }, "InternalAlias": { "type": "ai", "is_alias_to": "DEMONSTRATION_AI_RECORD", "fields": { "ADEL": "0.1", "DESC": "Demonstration ai record" } } } Example: What’s on the IOC? infoServ Data J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 7 Requested URL = (spacing and line-breaks reformatted for greater human readability)

Provided URLs J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 8 /help?Help page, essentially what you're seeing here... /info?(JSON data) server information /pvs?[fields=FIELD[,FIELD2...]] (JSON data) get list of records on IOC, and optionally field values /env?VARNAME[,VARNAME2...](JSON data) get values of IOC environment variables /file?FILENAME (TEXT) get contents of a given file absolute directory paths ONLY MUST be subdir of $(TOP) or allowed by IOC call to infoServAllowFilePath() /fileexists?FILENAME (JSON) whether the given file exists same limitations as /file? /filepaths? (JSON data) get list of allowed file paths for /file? and /fileexists? /startup?(JSON data) get IOC startup script info

Building configuration files for ChannelArchiver and the Archiver Appliance Creating channel lists for the CSS channel browser Creating channel list web pages for humans to browse Creating “all-in-one” database files for IOCs by parsing their startup scripts and the *.dbd, *.db and *.substitutions files loaded, with macro and environment variable replacements all filled in. (With the above all-in-one databases) performing sanity-checks to look for duplicate record names, missing link targets, invalid fields, duplicate fields, invalid field menu choices, field value strings that are too long... and every other mistake I can remember making and spending hours trying to figure out! Things We’re Using infoServ For J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 9

One must know the name or IP-address and assigned infoServ port number of every IOC that scripts need to access. We use a SQLite database for this right now, a formal SQL database is being designed. The service can be abused out of ignorance or laziness: someone might write code to repeatedly fetch the.VAL fields for records because that's easier for them than the preferred method of setting up Channel Access monitors. Files in or under the IOC's “top” directory (the only directories infoServ allows access to unless configured otherwise) may contain sensitive or proprietary information. Issues J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 10

? Questions? J. Priller, May 2015 EPICS Collaboration Meeting - infoServ, Slide 11 infoServ is available for download at: