plug : presentation layer universal generator

34
PLUG PLUG Presentation Layer Universal Generator Presentation Layer Universal Generator P&D/SSD/TCE/TFP/AST P&D/SSD/TCE/TFP/AST - - 28/09/98 28/09/98 A joint company of Thomson-CSF Airsys and Siemens

Upload: emmanuel-fuchs

Post on 09-Apr-2017

279 views

Category:

Software


3 download

TRANSCRIPT

Page 1: PLUG : Presentation Layer Universal Generator

PLUG PLUG Presentation Layer Universal GeneratorPresentation Layer Universal Generator

P&D/SSD/TCE/TFP/ASTP&D/SSD/TCE/TFP/AST-- 28/09/9828/09/98

A joint company of Thomson-CSF Airsys and Siemens

Page 2: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20042

OVERVIEW

� ATC requirements : Plug & Play (flexibility)� Object Oriented Design to automatic code generation� Compiler & Parser� PLUG (Presentation Layer Universal Generator) through

applications :� Stub generation : PATIO API� Coder generation : Object Message Passing

� Future

* PATIO : Platform for ATM Tools Integration to Pre-operation

Page 3: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20043

ATC processus

AdjacentAir Traffic ControlCenter

AdjacentAir Traffic ControlCenter

AirportsAirports Flight Data ProcessingFlight Data Processing

METEO DataMETEO DataRadar Data ProcessingRadar Data Processing

transmetterReceiverHF/VHF

transmetterReceiverHF/VHF

Flight Plan

Radar Data

Radar Data

Tracks

Primaryand secondary RADAR

WAN

LAN

+

-

Page 4: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20044

ATC centre Architecture

Radar Data ProcessingRadar Data

Processing

Flight PlanProcessingFlight Plan

Processing

SupervisoryControlSupervisory

ControlSimulator

Simulator

RecordingReplayRecording

Replay

ControlerWorkingPosition

ControlerWorkingPosition

Voice control and

communicationsVoice control

and communications

Radar FrontProcessingRadar Front

Processing

Dual LANFDDI

AFTN/CIDINATFM

ADJACENTFIR'S/TWR'S

MET Centres

RADAR

• Intercom• Priority• Public• RADIO A/G

ControlerWorkingPosition

ControlerWorkingPosition

Page 5: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20045

PLUG : Presentation Layer Universal Generator

� OSI layer 6 & 7 services� Manages heterogeneous programming

languages and hardware� Provides Plug & Play (flexibility)

=> Automatic code generation

=> Object Oriented Design

Application

Presentation

Session

ASN.1*

7

6

5

ASE* ASE ASE ASE

Page 6: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20046

Object analogy

Implementation Interface

A driver doesn't care of engine's internal working.He only knows the interface

Page 7: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20047

Specification Language

Network

Node A Node B

IRS (IDL)Struct message1

Item1 : short;Item2 : long;Item3 : char;Item4 : Boolean;Item4 : Struct data

Item1 : :char;Item2 : long;Item3 : char;Item4 : BooleanItem4 : char;

end struct data;end struct message1

Communication Language

ProgrammingLanguage (C++)

ProgrammingLanguage (Ada)

Communication Object Design

Page 8: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20048

Syntax and Language

� Abstract Syntax : specification language : � ASN.1, IDL, (ADA)

� Working Syntax : programming language : � ADA, C, C++

� Transfert (concrete) Syntax : communication language : � BER/PER, XDR, CDR, � ASTERIX, ADEXP, ICAO

Page 9: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/20049

Compiler VS Parser

� Abstract Syntax is independent of Transfertsyntax :� Automatic code generation : Compilers

� If no Abstract Syntax (AS = TS) :� Manual code generation : Parsers

Page 10: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200410

PLUG Compilers

� ABSTRACT SYNTAX� PLUG Ada RPC : API� PLUG ASN.1 : ATN� PLUG IDL : CORBA

Front End (FE)

� TRANSFERT SYNTAX� PLUG XDR : API� PLUG BER/PER : ATN� PLUG CDR : CORBA, ESIOP

Back End (BE)

Page 11: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200411

PLUG Parsers

� PLUG ASTERIX : � Radar, Meteo, Categorie XX

� PLUG ADEXP : � Flight Plan, ATS, AIS, CFMU, IFPS,

OLDI

� PLUG ICAO : � Flight Plan, Meteo, Notam, ATS, OLDI

Tracks

Primaryand secondary RADAR

Page 12: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200412

PLUG Compilers through applications

� Distributed Object Design : API (IDL) PATIO� UBSS based Ada RPC � Stub generator

� Message passing object design� XDR� Coder generator

� Miscellanous� Symbolic trace and debug functions� Programming Language translator

Page 13: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200413

PATIO API paradigm� Software components Plug & Play

� Vertical services, Frame work, Design Patterns

� Business Middleware = OSI layers 7,5,6 = ORB Core services

� Business APIs = OSI layer 7 ASEs = CORBA objects

� Business Middleware is also called API layer because it exhibitsonly application APIs.

� An API (as an ASE) is :� A protocol and � A logical interface (API = abstract syntax) : IRS

* IRS : Interface Requirements Specification.

Page 14: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200414

API protocol

UBSS

API(SKELETON)

APPLI

UBSS

API(STUBS)

APPLI

ServerClient

API PROTOCOL

UNIX

LAN

UNIX

API

Page 15: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200415

API : How it works

� API protocol is equivalent to Sun RPC (Remote Procedure Call) with asynchronous events

� Servers Publish service interface and clients subscribe to services

� Client invokes remote procedures executed by the server or receives asynchronous event

� Each server exports interfaces.� RPC encapsulates network access :

� Send/Receive are hidden by Application functions call� RPC protocol manages parameters passing between client to

server.� XDR (External Data Representation) manages heterogeneous

programming language and hardware : Ada, C, C++.

Page 16: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200416

RPC principle

Library

Main

Push

Pop

Unix process

Library

Main

Send

Receive

Unix process

Client Server

Marshalling

Unmarshalling

=>XDR

XDR

Unix process

S = A+ B

A, B, +

S

Page 17: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200417

API : Ada distributed Package

Ada Packagespecificationc

Ada PackageImplementation

OperationsOperations

DATAand

Operations Implementation

DATAand

Operations Implementation

OperationsOperations

EmptyImplementation

Comms

EmptyImplementation

Comms

OperationsOperations

DATAand

Operations Implementation

DATAand

Operations Implementation

Client side Server side

=>

Page 18: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200418

Heterogeneous Distributed System : Language or Hardware

Operations

DATAand

Operations Implementation

Operations

DATAand

Operations Implementation

Operations

DATAand

Operations Implementation

Operations

DATAand

Operations Implementation

Main API interface Operations

DATAand

Operations Implementation

Operations

DATAand

Operations Implementation

Operations

DATAand

Operations Implementation

Operations

DATAand

Operations Implementation

Ada ServerUnix Process

C ServerUnix Process

C++ ServerUnix Process

Ada or C or C++Client

Unix Process

Page 19: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200419

API Programming model : Client Register; Start Supervision APIRegister with supervisor; Subscribe to supervision eventsProgram Main Loop

Wait next event Case API

Supervision :peek event from supervision :

process supervision events : Initialise, start, stop, killAPI1 :

peek event from API 1 :process AP1 events : ............

API2 :peek event from API 2 :

process AP2 events : ............End loopStop event processingStop API1, API2Stop supervision APIUnregister

Underlying code is the stubautomatically generatedby PLUG.

Itallic code is written by applicationprogrammer.

Page 20: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200420

S u p e r v i s e d

I n i t i a l i s e d

R u n n in g

I n i t i a l i s e / S t a r t S e r v i c e s & S u b s c r i b e

S t a r t / P r o c e s s E v e n t s

K i l l / U n r e g i s t e r

U n s u p e r v i s e d

/ S t a r t s u p e r v i s i o n , R e g i s t e r & S u b s c r i b e

U n r e g i s t e r e d

/ R e g i s t e rE v e n t / A c t i o n

F r o z e n

U n f r e e z e / P r o c e s s E v e n t s

S t o p / S t o p s e r v i c e s

K i l l / S t o p S e r v i c e s & U n r e g i s t e r

F r e e z e / D o n ' t p r o c e s s E v e n t s

Client state diagram

Page 21: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200421

XDR

Stub Generator Coder Generator

C Ada

Ada API

C Ada

PLUG : Presentation Layer Universal Generator

(IDL)

(CDR)(IDL,C++)

Page 22: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200422

PLUGStub Generator

Register; Start Supervion APIRegister with supervisor; Subscribe to supervision eventsProgram Main Loop

Wait next event Case API

Supervision :peek event from supervision :

process supervision events : Initialise, start, stop, killAPI1 :

peek event from API 1 :

process AP1 events : .

API2 :peek event from API 2 :

process AP2 events : ............

API3 :peek event from API 2 :

process AP2 events : ............End loopStop event processingStop API1, API2Stop supervision APIUnregister

• Program skeltons are automatically generated by PLUG.• Stub generation is template driven.• Templates are written with PLUG Template Description Language (TDL).

Template

All Technical Middelware details are hidden to the programmer : Registry, Supervision, Subscription.

Page 23: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200423

PLUG Coder generator

IFF

XDR/C generatedencoding source files

Front End(lex/yacc)

Back End

XDR/ADA generatedencoding source files

AdaGrammar(BNF)

grammar analyzegrammar analyze

XDR Templatesexpansion

XDR Templatesexpansion

XDRTemplates

(TDL)

AdaAPI

IndependantFormat File

IndependantFormat File

Abstract Syntax Tree

Page 24: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200424

Object message passing with PLUG

� UBSS manages pipes not the semantic of transported messages

� PLUG Coder are used to manage FIFO and CDC messages.

� Ada type specification is used as Specification input file (AS)

� IRS documents are replaced by Ada specification

Page 25: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200425

Plug coder use : FIFO encode/decode

FIFOEnqueue Dequeue

Type AType BType Simple 1Type Simple 2

End Type BType CType Simple 1Type Simple 3Type D

Type Simple 3Type Simple 2

End Type DEnd Type C

End Type A

Type AType BType Simple 1Type Simple 2

End Type BType CType Simple 1Type Simple 3Type D

Type Simple 3Type Simple 2

End Type DEnd Type C

End Type A

Type Ada Type C

Ada

XDR

XDR

C

Call Back encoding routing

XDR buffer

ToolsUser Tools User

Page 26: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200426

Plug coder use : CDC encode/decode

Ada

XDR

XDR

C

Type AType BType Simple 1Type Simple 2

End Type BType CType Simple 1Type Simple 3Type D

Type Simple 3Type Simple 2

End Type DEnd Type C

End Type A

Type AType BType Simple 1Type Simple 2

End Type BType CType Simple 1Type Simple 3Type D

Type Simple 3Type Simple 2

End Type DEnd Type C

End Type A

Type Ada Type CCall Back encoding routing

CDCCDC_write() CDC_read()

Page 27: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200427

AdaCSCI

CCSCI

XDR

Ada Compiler C Compiler

XDR : How it works.

Page 28: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200428

Coder : Structure Serialization

Struct Message Type 1 Field AField B

Field CField D

Field EField FField G

End struct Message type1

Ada or C structure

XDR Stream

XDR Convertor

Elementary types are : Int, Char, float, Boolean Field 1Field 2Field 3Field 4Field 5 Header

Type 1

A B

C D

E

F G

Page 29: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200429

C/XDRCoder

(C)

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

C structure

Field 1Field 2Field 3Field 4Field 5Field 6Field 7Field 8Field 9

XDR StreamAda/XDRCoder(Ada)

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

Ada structure

InterfaceSpecification

Abstract Syntax

Transfert Syntax

Programming SyntaxProgramming Syntax

Object Message Passing Syntax

Page 30: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200430

C/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

C structure

Field 1Field 2Field 3Field 4Field 5Field 6Field 7Field 8Field 9

XDR StreamAda/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

Ada structure

InterfaceSpecification

C/XDRCoder

Generator

Ada to CTranslator

Ada/XDRCoder

Generator

Ada PackageSpecification

(With)

Code generation output

Page 31: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200431

C/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

C structure

Field 1Field 2Field 3Field 4Field 5Field 6Field 7Field 8Field 9

XDR StreamC/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

C structure

C/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

C structure

Field 1Field 2Field 3Field 4Field 5Field 6Field 7Field 8Field 9

XDR StreamAda/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

Ada structure

Ada/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

Ada structure

Field 1Field 2Field 3Field 4Field 5Field 6Field 7Field 8Field 9

XDR StreamAda/XDRCoder

Struct Message Type 1 Field A

Field BField C

Field DField E

Field FField GField H

Field IEnd struct Message Type1

Ada structure

Coder context

Page 32: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200432

Plug other possible applications

� Symbolic trace and debug functions� Complex structure symbolic dump

� Programming Language Translator� Ada to C, Ada to C++

� Off line and recording files management� XDR standard file format

Page 33: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200433

Sum Up

� Object Oriented Design is mandatory to manage heterogeneous programming language and hardware to provide P&P.

� Three kinds of services� UBSS based Object Middleware : API� Ada abstract syntax for Object Message Passing� Handcrafted Parser for ATC specific Transfer

Syntax

Page 34: PLUG : Presentation Layer Universal Generator

E. F

UC

HS

plug

.ppt

P&D/SSD/TCE/TFP/AST - 3/28/200434

Future

� IDL based ASTERIX compiler� States chart based code generation for Object

dymanic� ASE Skelton automatic generation� Business Object Skelton automatic generation� Ada/C++ translator