EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Adding new record to EPICS 7 IOC with pvDatabase
From: Joao Paulo Martins via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 27 Apr 2020 18:53:03 +0000

Hi Marty,

 

Your example is much simpler, indeed. I managed to create the new PV and it works as expected.

Then I realized that the problem with my first attempt was actually setting up C++11 in my Makefile (USR_CXXFLAGS).

 

Thank you very much!

______________________

 

Joao Paulo Martins

Control Systems Engineer / ICS / ESS ERIC

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Marty Kraimer via Tech-talk <tech-talk at aps.anl.gov>
Reply to: Marty Kraimer <mrkraimer at comcast.net>
Date: Monday, 27 April 2020 at 17:56
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Re: Adding new record to EPICS 7 IOC with pvDatabase

 

Below you say:

I would appreciate any help to overcome these basics steps.

Thanks in advance!


I have been working on some python code that uses PVRecords.
As part of this I needed a simple IOC that has PVRecords.
The code is available at

https://github.com/mrkraimer/testPython.git


The IOC code is in
testPython/database.


When the database is booted You will see

mrk> pwd
/home/epics7/modules/testPython/database/iocBoot/mandelbrotDatabase
mrk> ../../bin/linux-x86_64/mandelbrotDatabase st.cmd
< envPaths

...

epics> pvdbl
TPYaddRecord
TPYmandelbrotRecord
TPYremoveRecord
TPYtraceRecord
epics>

TPYaddRecord,TPYremoveRecord, and TPYtraceRecord are all supplied by pvDatabaseCPP

The code for TPYmandelbrotRecord is created in testPython/database/src.
testPython/database/iocSrc builds everything for starting an IOC..

This is a much simpler example than exampleCPP/database or NDPluginPVA from ADCore
There is a testPython/database/README.md but it just says:


This is part of a work in progress.
This needs documentation.


But I hope it helps.

Marty

On 4/27/20 10:36 AM, Joao Paulo Martins via Tech-talk wrote:

Hello Tech-Talk,

 

I’m trying to compile an IOC that has a single PV created using pvDatabase, pvData and pvAccess facilities. I’m using the “database” example in exampleCPP and also “NDPluginPVA.cpp” from ADCore as the models on how to do this task. Basically I have an an EPICS shell function that will has the following code:

 

PVDatabasePtr master = PVDatabase::getMaster();

 

string recordName = “my_record_name”;

NTScalarBuilderPtr ntScalarBuilder = NTScalar::createBuilder();

PVStructurePtr pvStructure = ntScalarBuilder->

    value(pvInt)->

    addAlarm()->

    addTimeStamp()->

    createPVStructure();

 

PVRecordPtr pvRecord = PVRecord::create(recordName,pvStructure);

bool result = master->addRecord(pvRecord);

 

The above code is include in the source of the support library built together with the IOC. The Makefile looks like this:

 

mySupport_LIBS += qsrv nt pvDatabase

mySupport_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)

mySupport_LIBS += $(EPICS_BASE_IOC_LIBS)

 

I’ve also included the same libs for the IOC rules:

myIOC_LIBS += mySupport

myIOC_LIBS += qsrv nt pvDatabase

myIOC_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)

myIOC_DBD  += PVAServerRegister.dbd

myIOC_DBD  += qsrv.dbd

 

However, when I compile the module, the linking process shows that there are two undefined references:

mySupport.so: undefined reference to `epics::pvDatabase::PVDatabase::addRecord(std::shared_ptr<epics::pvDatabase::PVRecord> const&)'

mySupport.so: undefined reference to `epics::pvDatabase::PVRecord::create(std::string const&, std::shared_ptr<epics::pvData::PVStructure> const&)'

 

I would appreciate any help to overcome these basics steps.

Thanks in advance!

______________________

Joao Paulo Martins

Control Systems Engineer

European Spallation Source ERIC

 

 

 




References:
Adding new record to EPICS 7 IOC with pvDatabase Joao Paulo Martins via Tech-talk
Re: Adding new record to EPICS 7 IOC with pvDatabase Marty Kraimer via Tech-talk

Navigate by Date:
Prev: Re: Tips for doing conditional logic in EPICS records Ralph Lange via Tech-talk
Next: Re: Stream Device Format "%d" has data type signed which is not supported by RECORD Noboru Yamamoto via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Adding new record to EPICS 7 IOC with pvDatabase Marty Kraimer via Tech-talk
Next: Tips for doing conditional logic in EPICS records Mark Davis via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 27 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·