1# @Time    : 2020-11-22
2# @Language: Markdown
3# @Software: VS Code
4# @Author  : Di Wang
5# @Email   : [email protected]

EPICS AppDevGuide

本系列主目录: 粒子加速器控制

这篇文章用于记录一些EPICS Application Developer’s Guide中的内容,由于个人习惯,使用的版本为EPICS 3.15.5。因为已经写过如何编译epics base和epics ioc,对于这些基础流程就不多做介绍。(btw,发现EPICS居然已经支持iOS了,似乎是iOS模拟器,有空可以自己玩下)

Getting Started

IOC Application 类型主要用的是两种iocsupport。主要差别在于Makefile里的rule不同。如果使用example类型,那在它的Makefile里两种rule都包括在内。

 1$ makeBaseApp.pl -l
 2Valid application types are:
 3        caClient
 4        caServer
 5        example
 6        ioc
 7        support
 8Valid iocBoot types are:
 9        example
10        ioc

对于support类型:

 1# xxxRecord.h will be created from xxxRecord.dbd 
 2DBDINC += xxxRecord 
 3DBD += myexampleSupport.dbd 
 4 
 5LIBRARY_IOC += myexampleSupport 
 6 
 7myexampleSupport_SRCS += xxxRecord.c 
 8myexampleSupport_SRCS += devXxxSoft.c 
 9myexampleSupport_SRCS += dbSubExample.c 
10 
11myexampleSupport_LIBS += $(EPICS_BASE_IOC_LIBS)

对于ioc类型:

 1PROD_IOC = myexample 
 2 
 3DBD += myexample.dbd 
 4 
 5# myexample.dbd will be made up from these files: 
 6myexample_DBD += base.dbd 
 7myexample_DBD += xxxSupport.dbd 
 8myexample_DBD += dbSubExample.dbd 
 9 
10# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd 
11myexample_SRCS += myexample_registerRecordDeviceDriver.cpp 
12myexample_SRCS_DEFAULT += myexampleMain.cpp 
13myexample_SRCS_vxWorks += -nil- 
14 
15# Add locally compiled object code 
16myexample_SRCS += dbSubExample.c 
17 
18# Add support from base/src/vxWorks if needed 
19myexample_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary 
20 
21myexample_LIBS += myexampleSupport 
22myexample_LIBS += $(EPICS_BASE_IOC_LIBS)