Add example of record which supports RPC and a client

Record has x and y-coordinate fields and a timestamp and also provides
a service which sets (x,y) to a sequence of values.

An RPC client application (move) sends positions as an array.
This commit is contained in:
Dave Hickin
2015-12-08 12:20:43 +00:00
parent a99b08fd02
commit bc3335d4f9
33 changed files with 1015 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#==================================================
# Build an IOC support library
#
DBD += exampleRPC.dbd
#=============================
# build an ioc application
PROD_IOC += exampleRPC
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
exampleRPC_SRCS += exampleRPC_registerRecordDeviceDriver.cpp
exampleRPC_SRCS_DEFAULT += exampleRPCMain.cpp
exampleRPC_SRCS_vxWorks += -nil-
# The following adds support from base/src/vxWorks
exampleRPC_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
exampleRPC_LIBS += exampleRPC
exampleRPC_LIBS += pvDatabase
exampleRPC_LIBS += pvaSrv
exampleRPC_LIBS += pvAccess
exampleRPC_LIBS += pvData
exampleRPC_LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

View File

@@ -0,0 +1,6 @@
include "base.dbd"
include "PVAClientRegister.dbd"
include "PVAServerRegister.dbd"
include "registerChannelProviderLocal.dbd"
include "dbPv.dbd"
include "exampleRPC.dbd"

View File

@@ -0,0 +1,31 @@
/* exampleRPCMain.cpp */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvData is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/**
* @author mrk
* @date 2013.07.24
*/
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "epicsExit.h"
#include "epicsThread.h"
#include "iocsh.h"
int main(int argc,char *argv[])
{
if(argc>=2) {
iocsh(argv[1]);
epicsThreadSleep(.2);
}
iocsh(NULL);
epicsExit(0);
return(0);
}