Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 FCG TS62769-6-200 Edition 1.2.0 27 Jun 2019 RELEASED S P E C I F I C A T I O N Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200 , Ed. 1.2.0, 27 Jun 2019 Page 1 of 22 Document Distribution / Maintenance Control / Document Approval To obtain information concerning document distribution control, maintenance control, and document approval please contact FieldComm Group at the address shown below. Copyright © 2019 FieldComm Group, PROFIBUS Nutzerorganisation e. V., OPC Foundation, FDT Group FieldComm Group, PROFIBUS Nutzerorganisation e.V, OPC Foundation, and FDT Group are the joint publishers of this document. The information in this document is subject to change without notice and should not be construed as a commitment by the publishers. The publishers assume no responsibility for any errors that may appear in this document. In no event shall the publishers be liable for direct, indirect, special, incidental or consequential damages of any nature or kind arising from the use of this document. This document and parts thereof must not be reproduced or copied without written per-mission from the publishers, and the contents thereof must not be imparted to a third party nor used for any unauthorized purpose. All rights to copyrights, registered trademarks or applications, utility models and registered patents or applications reside with their respective owners. Trademark Information FieldComm Group ™ , F OUNDATION ™ Fieldbus and HART-IP ™ are trademarks, and HART ® , WirelessHART ® , ROM ® and SIF ® are registered trademarks of FieldComm Group, Austin, Texas, USA Any use of these terms hereafter in this document, or in any document referenced by this document, implies the trademark/registered trademark. All other trademarks used in this or referenced documents are trademarks of their respective companies. For more information, contact: FDT Group 5 Industrieweg 3001 Heverlee Belgium Phone: +32 (0)10 22 22 51 fdtgroup.org FieldComm Group 9430 Research Boulevard Suite 1-120 Austin, TX 78759, USA Phone: (512) 792-2300 Fax: (512) 792-2310 fieldcommgroup.org OPC Foundation Presidential Office 8455 Infirmary Rd., Ravenna, OH 44266 P.O. Box 808 (mailing address) Mantua, Ohio 44255 Phone: (330) 839-8718 opcfoundation.org PROFIBUS Nutzerorganisation e. V. (PNO) PROFIBUS & PROFINET International (PI) Haid-und-Neu-Str. 7 76131 Karlsruhe Germany Phone: +49 721 96 58 590 Fax: +49 721 96 58 589 profibus.com profinet.com Intellectual Property Rights The FieldComm Group (the Group) does not knowingly use or incorporate any information or data into the HART, F OUNDATION Fieldbus and FDI protocol standards, which the Group does not own or have lawful rights to use. Should the Group receive any notification regarding the existence of any conflicting private IPR, the Group will review the disclosure and either (A) determine there is no conflict; (B) resolve the conflict with the IPR owner; or (C) modify the standard to remove the conflicting requirement. In no case does the Group encourage implementers to infringe on any individual's or organization's IPR. Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200, Ed. 1.2.0, 27 Jun 2019 Page 2 of 22 Revision Log Version Date Change Note / History / Reason 1.2.0.18 06 April 2018 Initial version 1.2.0.19 31 July 2018 Sequence charts for asynchronous service execution added (figures 7 - 9) 1.2.0.20 11 Sep. 2018 New version of Figure 4 Compatibility strategy to host UIPs 4.3.4 UIP executable compatibility rules added. 1.2.0.21 17 Oct. 2018 Reference to FCG TS10099 added, editorial changes 1.2.0.22 10 Dec. 2019 Updated code sample (Figure 10) 1.2.0.23 27 Feb. 2019 Second update of Figure 10 (Balloting comment 902) 1.2.0.24 27 June 2019 Editorial changes (Balloting comments 894, 900, 912, 913, 976, 977, 978, 981 - 986, Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200 , Ed. 1.2.0, 27 Jun 2019 Page 3 of 22 TABLE OF CONTENTS 1 Scope ........................................................................................................................................................... 5 2 Normative references .................................................................................................................................. 5 3 Terms, definitions, abbreviated terms, acronyms and conventions ............................................................... 5 3.1 Terms and definitions .................................................................................................................... 5 3.2 Abbreviated terms and acronyms .................................................................................................. 6 3.3 Symbols ........................................................................................................................................ 6 4 Technical concepts ....................................................................................................................................... 6 4.1 General ......................................................................................................................................... 6 Overview .................................................................................................................... 6 FDI Type Library ......................................................................................................... 6 4.2 UIP representation ........................................................................................................................ 8 Self containment ........................................................................................................ 8 External libraries and supplementary files .................................................................. 9 4.3 UIP compatibility rules .................................................................................................................. 9 Overview .................................................................................................................... 9 FDI Type Library Compatibility Strategy ...................................................................... 9 Runtime compatibility strategy ................................................................................. 10 UIP executable compatibility rules ............................................................................ 10 4.4 UIP Deployment .......................................................................................................................... 10 4.5 UIP Life-cycle .............................................................................................................................. 11 General .................................................................................................................... 11 UIP activation steps .................................................................................................. 11 4.5.2.1 Load ..................................................................................................................... 11 4.5.2.2 Create .................................................................................................................. 11 4.5.2.3 Activate ................................................................................................................ 12 UIP deactivation ....................................................................................................... 12 General rules for UIP activation and deactivation ..................................................... 12 4.6 Interaction between an FDI Client and a UIP................................................................................ 13 Handling of standard UI elements ............................................................................. 13 Non-blocking service execution ................................................................................ 13 4.6.2.1 FDI Client internal functions ................................................................................. 13 4.6.2.2 UIP internal functions ........................................................................................... 15 Threading ................................................................................................................. 16 4.6.3.1 Implementation rules ........................................................................................... 16 Timeout .................................................................................................................... 16 Exception handling ................................................................................................... 16 Type safe interfaces ................................................................................................. 18 Globalization and localization ................................................................................... 18 4.7 Security ....................................................................................................................................... 18 Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200, Ed. 1.2.0, 27 Jun 2019 Page 4 of 22 General .................................................................................................................... 18 Access permissions ................................................................................................... 18 4.7.2.1 General ................................................................................................................ 18 4.7.2.2 Technology specific UIP permissions and restrictions ............................................ 19 4.7.2.3 Implementation rules ........................................................................................... 19 5 Interface definition .................................................................................................................................... 19 Figure 1 – FDI Type Library structure.................................................................................................................... 7 Figure 2 - Relationship between FDI Type Library, host specific and UIP specific implementation of the interfaces ............................................................................................................................................................ 8 Figure 3 - Examples of UIP supplementary data files include javascript files, css files, and images ........................ 9 Figure 4 – Compatibility strategy to host UIPs built for different Runtime Versions ............................................ 10 Figure 5 - UIP Life-cycle...................................................................................................................................... 11 Figure 6 - UIP activation process ........................................................................................................................ 12 Figure 7 –Asynchronous service execution example (FDI Client) ......................................................................... 14 Figure 8 - Cancelled asynchronous service execution example (FDI Client) ......................................................... 14 Figure 9 - Asynchronous service execution example (UIP) .................................................................................. 15 Figure 10 – Simplified code sample to illustrate the described function implementation .................................... 16 Figure 11 - Component interaction ..................................................................................................................... 17 Table 1 – Base Property Services ........................................................................................................................ 20 Table 2 – Device Model Services ........................................................................................................................ 20 Table 3 – Access Control Services ....................................................................................................................... 20 Table 4 – Direct Access Services ......................................................................................................................... 20 Table 5 – Hosting Services .................................................................................................................................. 21 Table 6 – UIP Services ........................................................................................................................................ 21 Table 7 – Base Data Types .................................................................................................................................. 22 Table 8 – Special Types ...................................................................................................................................... 22 Table 9 – Parameter Types ................................................................................................................................. 22 Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200 , Ed. 1.2.0, 27 Jun 2019 Page 5 of 22 1 Scope This part of FCG TS62769 specifies the technology mapping for the concepts described in the Field Device Integration (FDI) standard. The technology mapping focuses on implementation regarding the components FDI Client and User Interface Plug-in (UIP) for the Runtime HTML5. 2 Normative references The following documents, in whole or in part, are normatively referenced in this document and are indispensable for its application. For dated references, only the edition cited applies. For undated references, the edition of the referenced document (including any amendments), which applies for a specific FDI Technology Version is defined within the FDI Technology Management Document and on the support portals of FieldComm Group and PI International. FCG TS61804 (all parts), Function blocks (FB) for process control and Electronic Device Description Language (EDDL) FCG TS10099, Field Device Integration (FDI) – Technology Management FCG TS62769-1, Field Device Integration (FDI) – Part 1: Overview FCG TS62769-2, Field Device Integration (FDI) – Part 2: FDI Client FCG TS62769-4, Field Device Integration (FDI) – Part 4: FDI Packages FCG TS62769-5, Field Device Integration (FDI) – Part 5: FDI Information Model FCG TS62769-6, Field Device Integration (FDI) – Part 6: Technology Mappings IEC 62541 (all parts), OPC Unified Architecture ISO/IEC 19505-1, Information technology – Object Management Group Unified Modeling Language (OMG UML) – Part 1: Infrastructure ISO/IEC 29500, (all parts) Information technology - Document description and processing languages - Office Open XML File Formats W3C HTML5.0, W3C Recommendation HTML5 – A vocabulary and associated APIs for HTML and XHTML ECMA-262, ECMAScript® Language Specification W3C CSP2, W3C Recommendation Content Security Policy Level 2 3 Terms, definitions, abbreviated terms, acronyms and conventions 3.1 Terms and definitions For the purposes of this document, the terms and definitions given in FCG TS62769-1, FCG TS62769-6, as well as the following apply. HTML5 runtime Functional component of the FDI Client, which executes the HTML5-based UIP. In principle, it provides the functionality of a web browser (HTML rendering, JavaScript execution engine). FDI Host Type Library Host specific implementation of FDI Type Library which consists of host.js and fdi.js. FDI Host Type Library is provided by the host vendors and will be deployed together with the UIP on UIP startup. Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200, Ed. 1.2.0, 27 Jun 2019 Page 6 of 22 3.2 Abbreviated terms and acronyms For the purposes of this document, the abbreviated terms and acronyms given in FCG TS62769-1, FCG TS62769-6, as well as the following apply. URL Uniform Resource Locator 3.3 Symbols Figures in this document use the graphical symbols according to ISO/IEC 19505-1 (UML 2.0). 4 Technical concepts 4.1 General Overview In 4.1.2, this document describes the technology base for UIP implementation based on HTML5, the software environment including the related implementation rules. Clause 4 follows a lifecycle (use case) oriented approach. Subclause 4.3.4 describes the copy deployment procedures and related implementation rules for the UIP and the FDI Client. UIP instantiation and termination is described in 4.5. Subclause 4.6 defines the rules about interaction between the FDI Client and the UIP. Security related definitions are written in 4.7. The service interface definitions for the FDI Client and the UIP are found in Clause 5. FDI Type Library The Device Access Services, the Hosting Services, and the UIP Services are modelled as TypeScript interfaces passing TypeScript data type arguments. These interfaces and data types are used for the data exchange and interaction between the UIP and the FDI Client. For runtime error handling purposes during interface method calls TypeScript error objects are defined. The FDI TypeScript interfaces, data types, and exception classes are defined in a single FDI Type Library. The file name of the interface definition shall be ‘fdi.ts’. Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200 , Ed. 1.2.0, 27 Jun 2019 Page 7 of 22 Figure 1 shows the FDI Type Library structure. Figure 1 – FDI Type Library structure NOTE: The composite structure diagram shows only the core interfaces that implement the interfaces defined in FCG TS62769-2. The interfaces shall be implemented by the FDI Client respectively the UIP using TypeScript. The TypeScript implementation files are transpiled to JavaScript using the feature set specified in the edition of ECMA-262, which corresponds to the RuntimeId of the UIP variant. The edition of ECMA-262 is unambiquously specified in FCG TS10099 for the RuntimId of the UIP variant. The result of the transpilation of fdi.ts is fdi.js, which contains the function prototypes. The transpiled FDI Type Library, i.e. fdi.js, and the host specific implementation of the interfaces, i.e. host.js, is called FDI Host Type Library. The overall structure of FDI Type Library together with host and UIP specific implementations of the interfaces is shown in Figure 2. Composite structure of fdi.ts «Type Library» fdi.ts «Namespace» Fdi.Model «Namespace» Fdi BasePropertyServices DeviceModelServices DirectAccessServices LockingServices UIPServices HostingServices Definition of data types and structures Definition of interfaces DeviceAccessServices Device Services Interfaces DeviceAccessServices registerUIP() provides access to Field Device Integration (FDI) – Part 6-200: Technology Mapping – HTML5 RELEASED FCG TS62769-6-200, Ed. 1.2.0, 27 Jun 2019 Page 8 of 22 Figure 2 - Relationship between FDI Type Library, host specific and UIP specific implementation of the interfaces NOTE: The FDI Type Library is specified by this specification and can be obtained from the owner organizations (see www.fieldcommgroup.org). Host specific implementation will be provided by host vendors and the UIP specific implementation shall be part of the specific UIP variant. The FDI Type Library fdi.ts respectively the fdi.js shall be versioned as per FCG TS62769-1 – section 8.1. The FDI Type Library is part of the FDI Core Technology as per FCG TS62769-1 – section 8.3.2.1. and therefore directly influences the FDI Technology Version. All Compatible changes of the fdi.ts respectively fdi.js lead to an increase of the minor portion of the FDI Technology Version. Incompatible changes lead to an increase of the major portion of the FDI Technology Version (see FCG TS62769-1 – section 8.3.2.2). The FDI Type Library shall be installed as part of every FDI Client installation. User Interface Plug-Ins (UIP) and the FDI Client Application shall use this instance of the fdi.js. UIPs shall not carry or deploy the FDI Type Library. The FDI Client is responsible to provide means to allow updates of this type library over time. The transpiled host specific implementation of the FDI Type Library, i.e. host.js, and the FDI Type Library itself (fdi.js) shall be provided by the FDI Client during the load process of the UIP. Both files shall be located in the subfolder ‘./scripts’ of the UIP installation folder. The respective files of the FDI Host Type Library fdi.js and host.js shall be referenced by the UIP explicitly. For example, this can be done with the statements <script src=”./scripts/fdi.js” type=”module”/> and <script src=”./scripts/host.js” type=”module”/> within the <header>- statement of the HTML file named according to the <StartElementName>-Attribute of the HTML5 UIP Package. 4.2 UIP representation Self containment The UIP Variant can contain either a single or multiple HTML files and their related supplementary files (for example resource files). The main entry HTML file is located directly in the UIP installation directory. Its name is given by the <StartElementName>-Attribute of the HTML5 UIP Package. Besides the FDI Host Type Library, i.e. fdi.js and host.js, the UIP Variant shall be self-contained. All supplementary files required by the UIP are stored under (a) subfolder(s) of the installation directory. The FDI Host Type Library is provided by the FDI Client. Figure 3 shows an example of a UIP with subfolders for scripts, Cascading Style Sheets and images. Next >