Channel Access Server Tool Developers Training - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Channel Access Server Tool Developers Training

Description:

EPICS base /src/cas/example/simple. more in EPICS base /src/cas/example. 11/29/09 ... register new event type. 11/29/09. CAS Tool Developers Training. 11 ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 14
Provided by: hil796
Category:

less

Transcript and Presenter's Notes

Title: Channel Access Server Tool Developers Training


1
Channel Access Server Tool Developers Training
  • Jeff Hill, Kay-Uwe Kasemir,LANL

2
CA Servers Clients
IOC
Server
Client EDM
Client Archiver
IOC
Client CA Link
Server
Source
3
CA Server Library CAS
  • C library for WIN32, Solaris, Linux, ...
  • Part of EPICS/base/...
  • Include include/casdef.h
  • Library lib/ltarchgt/cas.a, cas.lib, ...
  • Sources src/cas/
  • Examples src/cas/example
  • Manual http//www.aps.anl.gov/epics/,follow
    Other Sites, LANL, Tools, Channel Access

4
Export Data to EPICS
Your Task
5
CAS Library API
  • Four Classes
  • Server - caServer
  • Process variable - casPV
  • Channel (optional) - casChannel
  • Asynchronous IO (optional) - casAsyncXxxIO
  • Override virtual methods
  • Uses GDD class (Gen. Data Descriptor) for
    portable data handling
  • Driven by EPICS fdManager

6
Server Tool Responsibilities
  • Respond to PV existence test requestsoverride
    caServerpvExistsTest
  • Attach client to named PVoverride
    caServercreatePV
  • Process PV read requestsoverride casPVread
  • Process PV write requestsoverride casPVwrite
  • Notify server library when PV changescall
    casPVpostEvent

7
GDD
  • Reference counted
  • Allocate dynamically
  • Add/delete reference, removes itself when no
    longer referenced
  • Three types of GDDs
  • Scalar
  • Vector (Atomic)
  • Container (e.g. value time stamp limits)
  • Characterized by
  • primitive type integer, float., ...
  • application value, time, limits, units
  • gddAppFuncTable.hHelper class to dispatch read
    requests by application, also for containers

8
Example
  • Extremely Simple CA Server
  • ltEPICS basegt/src/cas/example/simple
  • more in ltEPICS basegt/src/cas/example

9
Caveats
  • There is no EPICS database at work!Your server
    tools decides what channels to serve.
  • CAS helps by handling not only DBR_DOUBLE but
    also e.g. DBR_CTRL_DOUBLE requests. If you fill
    those container requests, clients can see the
    control limits, units, etc.
  • BUT If you serve fred, there is no fred.VAL
    nor fred.HIHI unless you serve that, too, as
    separate PVs.

10
Advanced caServer
  • Optional virtual member functions
  • show server tool state watch clients attach..
  • Ordinary member functions
  • register new event type

11
Advanced casPV
  • Optional virtual member function
  • maximum matrix dimension and bounds
  • client interest (event subscription) notification
  • begin / end transaction notification
  • no clients attached to PV destroy hint
  • create channel (for access security)
  • show

12
Asynchronous IO
  • The server tool should not block when completing
    a client initiated request
  • Currently four IO operations can be completed
    asynchronously
  • PV read
  • PV write
  • PV exist test
  • PV attach

13
Completing IO Asynchronously
  • Create appropriate asynchronous IO object
  • Return S_casApp_asyncCompletion
  • When the IO completes
  • call asynchronous IO objects postIOCompletion()
Write a Comment
User Comments (0)
About PowerShow.com