update documentation; remove recordList
This commit is contained in:
@ -33,6 +33,6 @@ For example:
|
|||||||
Status
|
Status
|
||||||
------
|
------
|
||||||
|
|
||||||
* The API is for release 4.5.0-pre1
|
* The API is for EPICS Version 4 release 4.5.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
|
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
|
||||||
|
|
||||||
EPICS_BASE=/home/install/epics/base
|
EPICS_BASE=/home/install/epics/base
|
||||||
PVCOMMON=/home/hg/pvCommonCPP
|
V4BASE=/home/epicsv4
|
||||||
PVDATA=/home/hg/pvDataCPP
|
PVCOMMON=${V4BASE}/pvCommonCPP
|
||||||
PVACCESS=/home/hg/pvAccessCPP
|
PVDATA=${V4BASE}/pvDataCPP
|
||||||
PVASRV=/home/hg/pvaSrv
|
NORMATIVETYPES=${V4BASE}/normativeTypesCPP
|
||||||
|
PVACCESS=${V4BASE}/pvAccessCPP
|
||||||
|
PVASRV=${V4BASE}/pvaSrv
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<h1>EPICS V4 release 4.5</h1>
|
||||||
|
<p>This releaase is one component of EPICS V4 release 4.5.</p>
|
||||||
|
<p>The main change since release 4.0 is:</p>
|
||||||
|
<ul>
|
||||||
|
<li>recordList has been removed since pvAccess has the pvlist shell command.</li>
|
||||||
|
</ul>
|
||||||
<h1>Release 4.0 IN DEVELOPMENT</h1>
|
<h1>Release 4.0 IN DEVELOPMENT</h1>
|
||||||
<p>The main changes since release 3.0.2 are:</p>
|
<p>The main changes since release 3.0.2 are:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
EPICS V4 release 4.5
|
||||||
|
====================
|
||||||
|
|
||||||
|
This releaase is one component of EPICS V4 release 4.5.
|
||||||
|
|
||||||
|
The main change since release 4.0 is:
|
||||||
|
|
||||||
|
* recordList has been removed since pvAccess has the pvlist shell command.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Release 4.0 IN DEVELOPMENT
|
Release 4.0 IN DEVELOPMENT
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
<h1>TODO</h1>
|
<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>
|
<h2>monitorPlugin</h2>
|
||||||
<p>A debate is on-going about what semantics should be.</p>
|
<p>A debate is on-going about what semantics should be.</p>
|
||||||
<h2>Must test record delete.</h2>
|
<h2>Must test record delete.</h2>
|
||||||
|
@ -1,15 +1,6 @@
|
|||||||
TODO
|
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
|
monitorPlugin
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<h1>pvDatabaseCPP</h1>
|
<h1>pvDatabaseCPP</h1>
|
||||||
<!-- Maturity: Working Draft or Request for Comments, or Recommendation, and date. -->
|
<!-- 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>
|
<dl>
|
||||||
<dt>Latest version:</dt>
|
<dt>Latest version:</dt>
|
||||||
<dd><a
|
<dd><a
|
||||||
@ -46,11 +46,11 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>This version:</dt>
|
<dt>This version:</dt>
|
||||||
<dd><a
|
<dd><a
|
||||||
href= "pvDatabaseCPP_20140811.html">pvDatabaseCPP20140811.html
|
href= "pvDatabaseCPP_20151002.html">pvDatabaseCPP20151002.html
|
||||||
</a> </dd>
|
</a> </dd>
|
||||||
<dt>Previous version:</dt>
|
<dt>Previous version:</dt>
|
||||||
<dd><a
|
<dd><a
|
||||||
href= "pvDatabaseCPP_20140710.html">pvDatabaseCPP20140710.html
|
href= "pvDatabaseCPP_20140811.html">pvDatabaseCPP20140811.html
|
||||||
</a> </dd>
|
</a> </dd>
|
||||||
<dt>Editors:</dt>
|
<dt>Editors:</dt>
|
||||||
<dd>Marty Kraimer, BNL</dd>
|
<dd>Marty Kraimer, BNL</dd>
|
||||||
@ -78,7 +78,7 @@ V4 control system programming environment:<br />
|
|||||||
|
|
||||||
<h2 class="nocount">Status of this Document</h2>
|
<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>This version is a complete implementation of what is described in this manual.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -474,22 +474,6 @@ include "dbPv.dbd"
|
|||||||
<h3>src/special</h3>
|
<h3>src/special</h3>
|
||||||
<p>This directory has the following files:</p>
|
<p>This directory has the following files:</p>
|
||||||
<dl>
|
<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 << "RecordListRecord::create failed" << endl;
|
|
||||||
} else {
|
|
||||||
result = master->addRecord(pvRecord);
|
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
</dd>
|
|
||||||
<dt>traceRecord.h</dt>
|
<dt>traceRecord.h</dt>
|
||||||
<dd>This implements a PVRecord that can set the trace level for
|
<dd>This implements a PVRecord that can set the trace level for
|
||||||
another record. See below for a discussion of trace level.</dd>
|
another record. See below for a discussion of trace level.</dd>
|
||||||
@ -1116,45 +1100,6 @@ pvRecord = TraceRecord::create(recordName);
|
|||||||
result = master->addRecord(pvRecord);
|
result = master->addRecord(pvRecord);
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
if(!result) cout<< "record " << recordName << " not added" << endl;
|
||||||
</pre>
|
</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->addRecord(pvRecord);
|
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2>exampleServer</h2>
|
<h2>exampleServer</h2>
|
||||||
<h3>Overview</h3>
|
<h3>Overview</h3>
|
||||||
@ -1428,10 +1373,6 @@ int main(int argc,char *argv[])
|
|||||||
pvRecord = TraceRecord::create(recordName);
|
pvRecord = TraceRecord::create(recordName);
|
||||||
result = master->addRecord(pvRecord);
|
result = master->addRecord(pvRecord);
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
if(!result) cout<< "record " << recordName << " not added" << endl;
|
||||||
recordName = "recordListPGRPC";
|
|
||||||
pvRecord = RecordListRecord::create(recordName);
|
|
||||||
result = master->addRecord(pvRecord);
|
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
|
||||||
ServerContext::shared_pointer pvaServer =
|
ServerContext::shared_pointer pvaServer =
|
||||||
startPVAServer(PVACCESS_ALL_PROVIDERS,0,true,true);
|
startPVAServer(PVACCESS_ALL_PROVIDERS,0,true,true);
|
||||||
PVStringArrayPtr pvNames = master->getRecordNames();
|
PVStringArrayPtr pvNames = master->getRecordNames();
|
||||||
@ -1450,7 +1391,7 @@ This:
|
|||||||
<li>Gets a pointer to the master database.</li>
|
<li>Gets a pointer to the master database.</li>
|
||||||
<li>Creates the local Channel Provider. This starts the pvAccess server.</li>
|
<li>Creates the local Channel Provider. This starts the pvAccess server.</li>
|
||||||
<li>Creates record exampleServer </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>lists all the records</li>
|
||||||
<li>Runs forever until the user types exit on standard in.</li>
|
<li>Runs forever until the user types exit on standard in.</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -1489,9 +1430,6 @@ or via PVAccess.</p>
|
|||||||
<dd>An array record that is an instance of a record with a process method
|
<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
|
that does nothing. It can be tested like exampleDouble. In addition channelArray can
|
||||||
also be used.</dd>
|
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>
|
<dt>traceRecordPGRPC</dt>
|
||||||
<dd>This can be used via channelPutGet to set the trace level of another record.</dd>
|
<dd>This can be used via channelPutGet to set the trace level of another record.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
2052
documentation/pvDatabaseCPP_20151002.html
Normal file
2052
documentation/pvDatabaseCPP_20151002.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,6 @@
|
|||||||
#include <pv/standardField.h>
|
#include <pv/standardField.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
#include <pv/channelProviderLocal.h>
|
#include <pv/channelProviderLocal.h>
|
||||||
#include <pv/recordList.h>
|
|
||||||
#include <pv/traceRecord.h>
|
#include <pv/traceRecord.h>
|
||||||
|
|
||||||
#include <pv/powerSupply.h>
|
#include <pv/powerSupply.h>
|
||||||
@ -156,13 +155,5 @@ void ExampleDatabase::create()
|
|||||||
result = master->addRecord(psr);
|
result = master->addRecord(psr);
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <pv/recordList.h>
|
|
||||||
#include <pv/powerSupply.h>
|
#include <pv/powerSupply.h>
|
||||||
#include <pv/traceRecord.h>
|
#include <pv/traceRecord.h>
|
||||||
#include <pv/channelProviderLocal.h>
|
#include <pv/channelProviderLocal.h>
|
||||||
@ -43,11 +42,6 @@ int main(int argc,char *argv[])
|
|||||||
result = master->addRecord(pvRecord);
|
result = master->addRecord(pvRecord);
|
||||||
if (!result) cout<< "record " << recordName << " not added" << endl;
|
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::shared_pointer contextLocal = ContextLocal::create();
|
||||||
contextLocal->start(true);
|
contextLocal->start(true);
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include <pv/exampleServer.h>
|
#include <pv/exampleServer.h>
|
||||||
#include <pv/traceRecord.h>
|
#include <pv/traceRecord.h>
|
||||||
#include <pv/recordList.h>
|
|
||||||
#include <pv/channelProviderLocal.h>
|
#include <pv/channelProviderLocal.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -41,11 +40,6 @@ int main(int argc,char *argv[])
|
|||||||
result = master->addRecord(pvRecord);
|
result = master->addRecord(pvRecord);
|
||||||
if(!result) cout<< "record " << recordName << " not added" << endl;
|
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::shared_pointer contextLocal = ContextLocal::create();
|
||||||
contextLocal->start();
|
contextLocal->start();
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include <pv/pvData.h>
|
#include <pv/pvData.h>
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
#include <pv/recordList.h>
|
|
||||||
|
|
||||||
#include <epicsExport.h>
|
#include <epicsExport.h>
|
||||||
#include <pv/exampleServer.h>
|
#include <pv/exampleServer.h>
|
||||||
@ -56,14 +55,6 @@ static void exampleServerCallFunc(const iocshArgBuf *args)
|
|||||||
ExampleServerPtr record = ExampleServer::create(recordName);
|
ExampleServerPtr record = ExampleServer::create(recordName);
|
||||||
bool result = master->addRecord(record);
|
bool result = master->addRecord(record);
|
||||||
if(!result) cout << "recordname" << " not added" << endl;
|
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)
|
static void exampleServerRegister(void)
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
SRC_DIRS += $(PVDATABASE_SRC)/special
|
SRC_DIRS += $(PVDATABASE_SRC)/special
|
||||||
|
|
||||||
INC += recordList.h
|
|
||||||
INC += traceRecord.h
|
INC += traceRecord.h
|
||||||
|
|
||||||
LIBSRCS += recordList.cpp
|
|
||||||
LIBSRCS += traceRecord.cpp
|
LIBSRCS += traceRecord.cpp
|
||||||
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
@ -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 */
|
|
Reference in New Issue
Block a user