String -> std::string, toString methods removed, take 2
This commit is contained in:
@ -13,18 +13,20 @@
|
||||
#include <pv/standardPVField.h>
|
||||
#include <pv/convert.h>
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
ExampleLinkPtr ExampleLink::create(
|
||||
String const & recordName,
|
||||
String const & providerName,
|
||||
String const & channelName)
|
||||
string const & recordName,
|
||||
string const & providerName,
|
||||
string const & channelName)
|
||||
{
|
||||
PVStructurePtr pvStructure = getStandardPVField()->scalarArray(
|
||||
pvDouble,"alarm.timeStamp");
|
||||
@ -36,9 +38,9 @@ ExampleLinkPtr ExampleLink::create(
|
||||
}
|
||||
|
||||
ExampleLink::ExampleLink(
|
||||
String const & recordName,
|
||||
String providerName,
|
||||
String channelName,
|
||||
string const & recordName,
|
||||
string providerName,
|
||||
string channelName,
|
||||
PVStructurePtr const & pvStructure)
|
||||
: PVRecord(recordName,pvStructure),
|
||||
providerName(providerName),
|
||||
|
@ -42,6 +42,7 @@ using namespace epics::pvAccess;
|
||||
using namespace epics::pvDatabase;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
static StandardPVFieldPtr standardPVField = getStandardPVField();
|
||||
|
||||
@ -58,7 +59,7 @@ static void exampleLinkCallFunc(const iocshArgBuf *args)
|
||||
PVDatabasePtr master = PVDatabase::getMaster();
|
||||
PVRecordPtr pvRecord;
|
||||
bool result(false);
|
||||
String recordName;
|
||||
string recordName;
|
||||
PVStructurePtr pvStructure = standardPVField->scalarArray(
|
||||
pvDouble,"alarm,timeStamp");
|
||||
pvRecord = PVRecord::create("doubleArray",pvStructure);
|
||||
|
@ -12,14 +12,16 @@
|
||||
#include <pv/standardPVField.h>
|
||||
#include <pv/exampleServer.h>
|
||||
|
||||
namespace epics { namespace exampleServer {
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvDatabase;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::string;
|
||||
|
||||
namespace epics { namespace exampleServer {
|
||||
|
||||
|
||||
ExampleServerPtr ExampleServer::create(
|
||||
String const & recordName)
|
||||
string const & recordName)
|
||||
{
|
||||
StandardPVFieldPtr standardPVField = getStandardPVField();
|
||||
PVDataCreatePtr pvDataCreate = getPVDataCreate();
|
||||
@ -41,7 +43,7 @@ ExampleServerPtr ExampleServer::create(
|
||||
}
|
||||
|
||||
ExampleServer::ExampleServer(
|
||||
String const & recordName,
|
||||
string const & recordName,
|
||||
PVStructurePtr const & pvStructure)
|
||||
: PVRecord(recordName,pvStructure)
|
||||
{
|
||||
@ -71,7 +73,7 @@ bool ExampleServer::init()
|
||||
|
||||
void ExampleServer::process()
|
||||
{
|
||||
pvResultValue->put(String("Hello ") + pvArgumentValue->get());
|
||||
pvResultValue->put(string("Hello ") + pvArgumentValue->get());
|
||||
timeStamp.getCurrent();
|
||||
pvTimeStamp.set(timeStamp);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ int main(int argc,char *argv[])
|
||||
ChannelProviderLocalPtr channelProvider = getChannelProviderLocal();
|
||||
PVRecordPtr pvRecord;
|
||||
bool result(false);
|
||||
String recordName;
|
||||
string recordName;
|
||||
recordName = "exampleServer";
|
||||
pvRecord = ExampleServer::create(recordName);
|
||||
result = master->addRecord(pvRecord);
|
||||
|
Reference in New Issue
Block a user