1 / 13

Channel Access Server Tool Developers Training

Channel Access Server Tool Developers Training. Jeff Hill, Kay-Uwe Kasemir, LANL. Host. CA. CA. Host. CA. CA Servers & Clients. IOC. Server. Client: EDM. Client: Archiver. IOC. Client: CA Link. Server. Source. CA Server Library: CAS. C++ library for WIN32, Solaris, Linux, ...

allisong
Télécharger la présentation

Channel Access Server Tool Developers Training

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Channel Access Server ToolDevelopers Training Jeff Hill, Kay-Uwe Kasemir,LANL CAS Tool Developers Training

  2. Host CA CA Host CA CA Servers & Clients IOC Server Client: EDM Client: Archiver IOC Client: CA Link Server Source CAS Tool Developers Training

  3. CA Server Library: CAS • C++ library for WIN32, Solaris, Linux, ... • Part of EPICS/base/...: • Include: include/casdef.h • Library: lib/<arch>/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 CAS Tool Developers Training

  4. Data Source/Store Server Side tool CAS Library CA Protocol Export Data to EPICS Your Task CAS Tool Developers Training

  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 CAS Tool Developers Training

  6. Server Tool Responsibilities • Respond to PV existence test requests:override caServer::pvExistsTest • Attach client to named PV:override caServer::createPV • Process PV read requests:override casPV::read • Process PV write requests:override casPV::write • Notify server library when PV changes:call casPV::postEvent CAS Tool Developers Training

  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 CAS Tool Developers Training

  8. Example: • Extremely Simple CA Server • <EPICS base>/src/cas/example/simple • more in <EPICS base>/src/cas/example CAS Tool Developers Training

  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. CAS Tool Developers Training

  10. Advanced “caServer” • Optional virtual member functions • show server tool state: watch clients attach.. • Ordinary member functions • register new event type CAS Tool Developers Training

  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 CAS Tool Developers Training

  12. 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 Asynchronous IO CAS Tool Developers Training

  13. Create appropriate asynchronous IO object Return S_casApp_asyncCompletion When the IO completes call asynchronous IO object’s “postIOCompletion()” Completing IO Asynchronously CAS Tool Developers Training

More Related