Merge branch 'release/4.1'

This commit is contained in:
mrkraimer
2015-10-21 07:17:48 -04:00
19 changed files with 2084 additions and 372 deletions

View File

@ -33,6 +33,6 @@ For example:
Status
------
* The API is for release 4.5.0-pre1
* The API is for EPICS Version 4 release 4.5.0

10
RELEASE_NOTES.md Normal file
View File

@ -0,0 +1,10 @@
EPICS V4 release 4.5
====================
This release is one component of EPICS V4 release 4.5.
This is the first release of pvDatabaseCPP.
It provides functionality equivalent to pvDatabaseJava.

View File

@ -2,7 +2,9 @@
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
EPICS_BASE=/home/install/epics/base
PVCOMMON=/home/hg/pvCommonCPP
PVDATA=/home/hg/pvDataCPP
PVACCESS=/home/hg/pvAccessCPP
PVASRV=/home/hg/pvaSrv
V4BASE=/home/epicsv4
PVCOMMON=${V4BASE}/pvCommonCPP
PVDATA=${V4BASE}/pvDataCPP
NORMATIVETYPES=${V4BASE}/normativeTypesCPP
PVACCESS=${V4BASE}/pvAccessCPP
PVASRV=${V4BASE}/pvaSrv

View File

@ -1,25 +0,0 @@
<h1>Release 4.0 IN DEVELOPMENT</h1>
<p>The main changes since release 3.0.2 are:</p>
<ul>
<li>array semantics now enforce Copy On Write.</li>
<li>String no longer defined.</li>
<li>toString replaced by stream I/O </li>
<li>union is new type.</li>
<li>copy and monitor use new code in pvDataCPP</li>
</ul>
<h2>New Semantics for Arrays</h2>
<p>pvDatabaseCPP has been changed to use the new array implementation from pvDataCPP.</p>
<h2>String no longer defined</h2>
<p>String is replaced by std::string.</p>
<h2>toString replaced by stream I/O</h2>
<p>All uses of toString have been changed to use the steam I/O that pvDataCPP implements.</p>
<h2>union is a new basic type.</h2>
<p>exampleDatabase now has example records for union and union array.
There are records for regular union and for variant union.</p>
<h2>copy</h2>
<p>The implementation of copy and monitor for pvAccess has been changed
to use the new monitor and copy support from pvDataCPP.</p>
<h2>monitorPlugin</h2>
<p>exampleDatabase now has a example plugin that implements onChange.</p>
<h1>Release 0.9.2</h1>
<p>This was the starting point for RELEASE_NOTES</p>

View File

@ -1,50 +0,0 @@
Release 4.0 IN DEVELOPMENT
===========
The main changes since release 3.0.2 are:
* array semantics now enforce Copy On Write.
* String no longer defined.
* toString replaced by stream I/O
* union is new type.
* copy and monitor use new code in pvDataCPP
New Semantics for Arrays
--------
pvDatabaseCPP has been changed to use the new array implementation from pvDataCPP.
String no longer defined
---------
String is replaced by std::string.
toString replaced by stream I/O
---------
All uses of toString have been changed to use the steam I/O that pvDataCPP implements.
union is a new basic type.
------------
exampleDatabase now has example records for union and union array.
There are records for regular union and for variant union.
copy
----
The implementation of copy and monitor for pvAccess has been changed
to use the new monitor and copy support from pvDataCPP.
monitorPlugin
-------------
exampleDatabase now has a example plugin that implements onChange.
Release 0.9.2
==========
This was the starting point for RELEASE_NOTES

View File

@ -1,9 +1,4 @@
<h1>TODO</h1>
<h2>recordList</h2>
<p>This is putGet support that provides a list of all the records in an IOC.
Since pvAccess implements pvlist this is no longer needed.
Remove it from pvDatabaseCPP and pvIOCCPP.
Also remove channelList from swtshell.</p>
<h2>monitorPlugin</h2>
<p>A debate is on-going about what semantics should be.</p>
<h2>Must test record delete.</h2>

View File

@ -1,15 +1,6 @@
TODO
===========
recordList
----------
This is putGet support that provides a list of all the records in an IOC.
Since pvAccess implements pvlist this is no longer needed.
Remove it from pvDatabaseCPP and pvIOCCPP.
Also remove channelList from swtshell.
monitorPlugin
-------------

View File

@ -38,7 +38,7 @@
<h1>pvDatabaseCPP</h1>
<!-- Maturity: Working Draft or Request for Comments, or Recommendation, and date. -->
<h2 class="nocount">EPICS v4 Working Group, Working Draft, 09-Oct-2014</h2>
<h2 class="nocount">EPICS v4 Working Group, Working Draft, 02-October-2015</h2>
<dl>
<dt>Latest version:</dt>
<dd><a
@ -46,11 +46,11 @@
</dd>
<dt>This version:</dt>
<dd><a
href= "pvDatabaseCPP_20140811.html">pvDatabaseCPP20140811.html
href= "pvDatabaseCPP_20151002.html">pvDatabaseCPP20151002.html
</a> </dd>
<dt>Previous version:</dt>
<dd><a
href= "pvDatabaseCPP_20140710.html">pvDatabaseCPP20140710.html
href= "pvDatabaseCPP_20140811.html">pvDatabaseCPP20140811.html
</a> </dd>
<dt>Editors:</dt>
<dd>Marty Kraimer, BNL</dd>
@ -78,7 +78,7 @@ V4 control system programming environment:<br />
<h2 class="nocount">Status of this Document</h2>
<p>This is the 09-Oct-2014 version of of pvDatabaseCPP.</p>
<p>This is the 02-October-2015 version of of pvDatabaseCPP.</p>
<p>This version is a complete implementation of what is described in this manual.
</p>
</div>
@ -474,22 +474,6 @@ include "dbPv.dbd"
<h3>src/special</h3>
<p>This directory has the following files:</p>
<dl>
<dt>recordList.h</dt>
<dd>This implements a PVRecord that provides a list of the names
of the records in the PVDatabase.
It also serves as an example of how to implement a service.
The exampleDatabase creates an instance via the following code:
<pre>
recordName = "laptoprecordListPGRPC";
pvRecord = RecordListRecord::create(recordName);
if(pvRecord==NULL) {
cout &lt;&lt; "RecordListRecord::create failed" &lt;&lt; endl;
} else {
result = master->addRecord(pvRecord);
if(!result) cout&lt;&lt; "record " &lt;&lt; recordName &lt;&lt; " not added" &lt;&lt; endl;
}
</pre>
</dd>
<dt>traceRecord.h</dt>
<dd>This implements a PVRecord that can set the trace level for
another record. See below for a discussion of trace level.</dd>
@ -1116,45 +1100,6 @@ pvRecord = TraceRecord::create(recordName);
result = master-&gt;addRecord(pvRecord);
if(!result) cout&lt;&lt; "record " &lt;&lt; recordName &lt;&lt; " not added" &lt;&lt; endl;
</pre>
<h3>recordList</h3>
<p>This implements a PVRecord that allows a client to
get the names of all the PVRecords in the PVDatabase.
It follows the pattern of a channelPutGet
record:
</p>
<pre>
traceRecord
structure argument
string database master
string regularExpression .*
structure result
string status
string[] name
</pre>
where:
<dl>
<dt>database</dt>
<dd>The name of the database. The default is "master"</dd>
<dt>regularExpression</dt>
<dd>For now this is ignored and the complete list of names is always
returned.</dd>
<dt>status</dt>
<dd>The status of a putGet request.</dd>
<dt>name</dt>
<dd>The array of record names.</dd>
</dl>
<p>Note that swtshell, which is a Java GUI tool, has a command <b>channelList</b> that
requires that a record of this type is present and calls it.
Thus user code does not have to use a channelGetPut to get the list
of record names.</p>
<p>testExampleServerMain.cpp has an example of how to create a traceRecord:
</p>
<pre>
recordName = "recordListPGRPC";
pvRecord = RecordListRecord::create(recordName);
result = master-&gt;addRecord(pvRecord);
if(!result) cout&lt;&lt; "record " &lt;&lt; recordName &lt;&lt; " not added" &lt;&lt; endl;
</pre>
<h2>exampleServer</h2>
<h3>Overview</h3>
@ -1428,10 +1373,6 @@ int main(int argc,char *argv[])
pvRecord = TraceRecord::create(recordName);
result = master-&gt;addRecord(pvRecord);
if(!result) cout&lt;&lt; "record " &lt;&lt; recordName &lt;&lt; " not added" &lt;&lt; endl;
recordName = "recordListPGRPC";
pvRecord = RecordListRecord::create(recordName);
result = master-&gt;addRecord(pvRecord);
if(!result) cout&lt;&lt; "record " &lt;&lt; recordName &lt;&lt; " not added" &lt;&lt; endl;
ServerContext::shared_pointer pvaServer =
startPVAServer(PVACCESS_ALL_PROVIDERS,0,true,true);
PVStringArrayPtr pvNames = master-&gt;getRecordNames();
@ -1450,7 +1391,7 @@ This:
<li>Gets a pointer to the master database.</li>
<li>Creates the local Channel Provider. This starts the pvAccess server.</li>
<li>Creates record exampleServer </li>
<li>creates records traceRecordPGRPC and recordListPGRPC</li>
<li>creates record traceRecordPGRPC</li>
<li>lists all the records</li>
<li>Runs forever until the user types exit on standard in.</li>
</ul>
@ -1489,9 +1430,6 @@ or via PVAccess.</p>
<dd>An array record that is an instance of a record with a process method
that does nothing. It can be tested like exampleDouble. In addition channelArray can
also be used.</dd>
<dt>laptoprecordListPGRPC</dt>
<dd>Implements the record expected by swtshell channelList.
It can also be used via channelPutGet.</dd>
<dt>traceRecordPGRPC</dt>
<dd>This can be used via channelPutGet to set the trace level of another record.</dd>
</dl>

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,6 @@
#include <pv/standardField.h>
#include <pv/standardPVField.h>
#include <pv/channelProviderLocal.h>
#include <pv/recordList.h>
#include <pv/traceRecord.h>
#include <pv/powerSupply.h>
@ -156,13 +155,5 @@ void ExampleDatabase::create()
result = master->addRecord(psr);
if(!result) cout<< "record " << recordName << " not added" << endl;
}
recordName = "laptoprecordListPGRPC";
pvRecord = RecordListRecord::create(recordName);
if(!pvRecord) {
cout << "RecordListRecord::create failed" << endl;
} else {
result = master->addRecord(pvRecord);
if(!result) cout<< "record " << recordName << " not added" << endl;
}
}

View File

@ -13,7 +13,6 @@
#include <string>
#include <iostream>
#include <pv/recordList.h>
#include <pv/powerSupply.h>
#include <pv/traceRecord.h>
#include <pv/channelProviderLocal.h>
@ -43,11 +42,6 @@ int main(int argc,char *argv[])
result = master->addRecord(pvRecord);
if (!result) cout<< "record " << recordName << " not added" << endl;
recordName = "laptoprecordListPGRPC";
pvRecord = RecordListRecord::create(recordName);
result = master->addRecord(pvRecord);
if (!result) cout<< "record " << recordName << " not added" << endl;
ContextLocal::shared_pointer contextLocal = ContextLocal::create();
contextLocal->start(true);

View File

@ -15,7 +15,6 @@
#include <pv/exampleServer.h>
#include <pv/traceRecord.h>
#include <pv/recordList.h>
#include <pv/channelProviderLocal.h>
using namespace std;
@ -41,12 +40,7 @@ int main(int argc,char *argv[])
result = master->addRecord(pvRecord);
if(!result) cout<< "record " << recordName << " not added" << endl;
recordName = "laptoprecordListPGRPC";
pvRecord = RecordListRecord::create(recordName);
result = master->addRecord(pvRecord);
if(!result) cout<< "record " << recordName << " not added" << endl;
ContextLocal::shared_pointer contextLocal = ContextLocal::create();
contextLocal->start();

View File

@ -31,7 +31,6 @@
#include <pv/pvData.h>
#include <pv/pvAccess.h>
#include <pv/pvDatabase.h>
#include <pv/recordList.h>
#include <epicsExport.h>
#include <pv/exampleServer.h>
@ -56,14 +55,6 @@ static void exampleServerCallFunc(const iocshArgBuf *args)
ExampleServerPtr record = ExampleServer::create(recordName);
bool result = master->addRecord(record);
if(!result) cout << "recordname" << " not added" << endl;
PVRecordPtr pvRecord = RecordListRecord::create(
"laptoprecordListPGRPC");
if(!pvRecord) {
cout << "RecordListRecord::create failed" << endl;
} else {
result = master->addRecord(pvRecord);
if(!result) cout<< "record " << recordName << " not added" << endl;
}
}
static void exampleServerRegister(void)

View File

@ -18,10 +18,10 @@ BASE=${1:-${DEFAULT_BASE}}
USE_MB=${2:-"MB_NO"}
# Dependent module branches (empty = master)
PVCOMMON_BRANCH=""
PVDATA_BRANCH=""
PVACCESS_BRANCH=""
PVASRV_BRANCH=""
PVCOMMON_BRANCH="Release-4.1-"
PVDATA_BRANCH="Release-5.0-"
PVACCESS_BRANCH="Release-4.1-"
PVASRV_BRANCH="Release-0.11-"
###########################################
# Fetch and unpack dependencies

View File

@ -269,7 +269,8 @@ public:
/**
* Constructor.
* @param pvField The field from the top level structure.
* @param The parent.
* @param parent The parent.
* @param pvRecord The PVRecord.
*/
PVRecordField(
epics::pvData::PVFieldPtr const & pvField,

View File

@ -231,7 +231,7 @@ public:
virtual void destroy();
/**
* Get the requester name.
* @param returns the name of the channel requester.
* @return returns the name of the channel requester.
*/
virtual std::string getRequesterName();
/**
@ -279,7 +279,7 @@ public:
* Get the introspection interface for subField.
* The introspection interface is given via GetFieldRequester::getDone.
* @param requester The client callback.
* @param The subField of the record.
* @param subField The subField of the record.
* If an empty string then the interface for the top level structure of
* the record is provided.
*/
@ -384,7 +384,7 @@ public:
/**
* This is called when a record is being removed from the database.
* Calls destroy.
* @record The record being destroyed.
* @param pvRecord The record being destroyed.
*/
virtual void detach(PVRecordPtr const &pvRecord);
protected:

View File

@ -2,8 +2,6 @@
SRC_DIRS += $(PVDATABASE_SRC)/special
INC += recordList.h
INC += traceRecord.h
LIBSRCS += recordList.cpp
LIBSRCS += traceRecord.cpp

View File

@ -1,98 +0,0 @@
/* recordList.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.04.18
*/
#define epicsExportSharedSymbols
#include <pv/recordList.h>
using std::tr1::static_pointer_cast;
using namespace epics::pvData;
using namespace std;
namespace epics { namespace pvDatabase {
RecordListRecordPtr RecordListRecord::create(
std::string const & recordName)
{
FieldCreatePtr fieldCreate = getFieldCreate();
PVDataCreatePtr pvDataCreate = getPVDataCreate();
StructureConstPtr topStructure = fieldCreate->createFieldBuilder()->
addNestedStructure("argument")->
add("database",pvString)->
add("regularExpression",pvString)->
endNested()->
addNestedStructure("result") ->
add("status",pvString) ->
addArray("names",pvString) ->
endNested()->
createStructure();
PVStructurePtr pvStructure = pvDataCreate->createPVStructure(topStructure);
RecordListRecordPtr pvRecord(
new RecordListRecord(recordName,pvStructure));
if(!pvRecord->init()) pvRecord.reset();
return pvRecord;
}
RecordListRecord::RecordListRecord(
std::string const & recordName,
epics::pvData::PVStructurePtr const & pvStructure)
: PVRecord(recordName,pvStructure)
{
}
RecordListRecord::~RecordListRecord()
{
}
void RecordListRecord::destroy()
{
PVRecord::destroy();
}
bool RecordListRecord::init()
{
initPVRecord();
PVStructurePtr pvStructure = getPVStructure();
database = pvStructure->getSubField<PVString>("argument.database");
if(database.get()==NULL) return false;
regularExpression = pvStructure->getSubField<PVString>(
"argument.regularExpression");
if(regularExpression.get()==NULL) return false;
status = pvStructure->getSubField<PVString>("result.status");
if(status.get()==NULL) return false;
PVFieldPtr pvField = pvStructure->getSubField("result.names");
if(pvField.get()==NULL) {
std::cerr << "no result.names" << std::endl;
return false;
}
name = pvStructure->getSubField<PVStringArray>("result.names");
if(name.get()==NULL) return false;
return true;
}
void RecordListRecord::process()
{
PVStringArrayPtr pvNames = PVDatabase::getMaster()->getRecordNames();
name->replace(pvNames->view());
string message("");
if(database->get().compare("master")!=0) {
message += " can only access master ";
}
string regEx = regularExpression->get();
if(regEx.compare("")!=0 && regEx.compare(".*")!=0) {
message += " regularExpression not implemented ";
}
status->put(message);
}
}}

View File

@ -1,72 +0,0 @@
/* recordListTest.h */
/**
* 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.04.18
*/
#ifndef RECORDLIST_H
#define RECORDLIST_H
#include <shareLib.h>
#include <pv/pvDatabase.h>
namespace epics { namespace pvDatabase {
class RecordListRecord;
typedef std::tr1::shared_ptr<RecordListRecord> RecordListRecordPtr;
/**
* @brief List records in PVDatabase.
*
* @deprecated no longer needed because of pvlist command for pvAccess.
*
* This is a record that provides a PVStringArray that
* has the record names of all records in the local PVDatabase.
* It is meant to be used by a channelPutGet request.
*/
class epicsShareClass RecordListRecord :
public PVRecord
{
public:
POINTER_DEFINITIONS(RecordListRecord);
/**
* Factory methods to create RecordListRecord.
* @param recordName The name for the RecordListRecord.
* @return A shared pointer to RecordListRecord..
*/
static RecordListRecordPtr create(
std::string const & recordName);
/**
* destructor
*/
virtual ~RecordListRecord();
/**
* Clean up any resources used.
*/
virtual void destroy();
/**
* standard init method required by PVRecord
* @return true unless record name already exists.
*/
virtual bool init();
/*
* Generated the list of record names.
*/
virtual void process();
private:
RecordListRecord(std::string const & recordName,
epics::pvData::PVStructurePtr const & pvStructure);
epics::pvData::PVStringPtr database;
epics::pvData::PVStringPtr regularExpression;
epics::pvData::PVStringPtr status;
epics::pvData::PVStringArrayPtr name;
};
}}
#endif /* RECORDLIST_H */