christian gerkeepics rdb workshop 2005 march 9-111 epicsora building epics-db-files from an oracle...

19
Christian Gerke EPICS rdb Workshop 2005 March 9- 11 1 EpicsOra building Epics-db-files from an Oracle Database Programmed by Anatoli Khvorostianov

Upload: samantha-garrett

Post on 18-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Christian Gerke EPICS rdb Workshop 2005 March 9-11 1

EpicsOra

building Epics-db-files from an Oracle Database

Programmed by

Anatoli Khvorostianov

Christian Gerke EPICS rdb Workshop 2005 March 9-11 2

Basic Idea

• Use database instead of flat filesmake it master of all info– Import dbd-files (define EPICS-version)– Export db-files to be loaded to IOCs– Modify here / re-import modified db-files

• Define “objects”– Structure: group of records– Structure: can be nested (complex objects)– Parameters– Inheritance

Christian Gerke EPICS rdb Workshop 2005 March 9-11 3

Further ideas

• Link different fields of interest– Epics– Hardware devices (also asset management)– “registry” for graphics, alarming– etc.

• Use “io_name” as link– Name of sensor/actor in drawings– Name of sensor/actor in graphics– Associated to cable/wires in cabling– …

Christian Gerke EPICS rdb Workshop 2005 March 9-11 4

EPICS and rdb at DESY

db

PK IO_name

device

PK IO_name

cable

PK IO_name

something

PK IO_name

EPICSORAHardware

IO_name

Christian Gerke EPICS rdb Workshop 2005 March 9-11 5

dbd files → epicsOra → db file

Christian Gerke EPICS rdb Workshop 2005 March 9-11 6

Prototypes:inheritance for record-fields

Christian Gerke EPICS rdb Workshop 2005 March 9-11 7

Record Fields

• Can be modified at all levels

• Inherit values from higher level

• Can use parameters in prototypese.g. $(desc), $(egu)

• Can use functions in prototypese.g. $CONT(record.field), $LINK(record), $ROUND(0.9*$(eguhi)),$IONAME(io_name)

Christian Gerke EPICS rdb Workshop 2005 March 9-11 8

Link to hardware

• Fields: INP, OUT,…

Development• Assign address string at instance level• Calculate address string from variables• Take address string from special table• Calculate address string and DTYP from

device- /asset-tables

Christian Gerke EPICS rdb Workshop 2005 March 9-11 9

Structure

• Re-usable• Nested• Link records• Inherit field values• Name rules • Copy structure

– New object– New epics version

Christian Gerke EPICS rdb Workshop 2005 March 9-11 10

Hierarchy in EpicsOra

dbd

Base prototypes add

structure Fields inherit values

Define parametersComposite

prototypesAssign values

Composite Instances

Instances

db file

Christian Gerke EPICS rdb Workshop 2005 March 9-11 11

Inside EpicsOra(Oracle AS 10g, Forms 9)

Christian Gerke EPICS rdb Workshop 2005 March 9-11 12

Inside EpicsOra:project

Christian Gerke EPICS rdb Workshop 2005 March 9-11 13

Inside EpicsOrabase prototype

Christian Gerke EPICS rdb Workshop 2005 March 9-11 14

Inside EpicsOrarecord of base prototype

Christian Gerke EPICS rdb Workshop 2005 March 9-11 15

Inside EpicsOracomposite prototype

Christian Gerke EPICS rdb Workshop 2005 March 9-11 16

Inside EpicsOrarecord in composite prototype

Christian Gerke EPICS rdb Workshop 2005 March 9-11 17

Inside EpicsOrainstance of composite prototype

Christian Gerke EPICS rdb Workshop 2005 March 9-11 18

Inside EpicsOrainstance of base prototype

Christian Gerke EPICS rdb Workshop 2005 March 9-11 19

Inside EpicsOrainstance of record