当前位置: 首页>>代码示例>>C++>>正文


C++ PVRecordPtr::get方法代码示例

本文整理汇总了C++中PVRecordPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ PVRecordPtr::get方法的具体用法?C++ PVRecordPtr::get怎么用?C++ PVRecordPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PVRecordPtr的用法示例。


在下文中一共展示了PVRecordPtr::get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: scalarTest

static void scalarTest()
{
    if(debug) {cout << endl << endl << "****scalarTest****" << endl; }
    PVRecordPtr pvRecord;
    pvRecord = createScalar("doubleRecord",pvDouble,"alarm,timeStamp.display");
    testOk1(pvRecord.get()!=0);
    if(pvRecord && debug) {
          cout << pvRecord << endl;
    }
    pvRecord->destroy();
}
开发者ID:mrkraimer,项目名称:pvDatabaseCPP,代码行数:11,代码来源:testPVRecord.cpp

示例2: arrayTest

static void arrayTest()
{
    if(debug) {cout << endl << endl << "****arrayTest****" << endl; }
    PVRecordPtr pvRecord;
    pvRecord = createScalarArray("doubleArrayRecord",pvDouble,"alarm,timeStamp");
    testOk1(pvRecord.get()!=0);
    if(pvRecord && debug) {
          cout << pvRecord << endl;
    }
    pvRecord->destroy();
}
开发者ID:mrkraimer,项目名称:pvDatabaseCPP,代码行数:11,代码来源:testPVRecord.cpp

示例3: powerSupplyTest

static void powerSupplyTest()
{
    if(debug) {cout << endl << endl << "****powerSupplyTest****" << endl; }
    PVRecordPtr pvRecord;
    PVStructurePtr pv = createPowerSupply();
    pvRecord = PowerSupply::create("powerSupply",pv);
    testOk1(pvRecord.get()!=0);
    if(pvRecord && debug) {
          cout << pvRecord << endl;
    }
    pvRecord->destroy();
}
开发者ID:mrkraimer,项目名称:pvDatabaseCPP,代码行数:12,代码来源:testPVRecord.cpp

示例4: lockOtherRecord

void PVRecord::lockOtherRecord(PVRecordPtr const & otherRecord)
{
    if(traceLevel>2) {
        cout << "PVRecord::lockOtherRecord() " << recordName << endl;
    }
    if(this<otherRecord.get()) {
        otherRecord->lock();
        return;
    }
    unlock();
    otherRecord->lock();
    lock();
}
开发者ID:mrkraimer,项目名称:pvDatabaseCPP,代码行数:13,代码来源:pvRecord.cpp

示例5: channelFind

ChannelFind::shared_pointer ChannelProviderLocal::channelFind(
    string const & channelName,
    ChannelFindRequester::shared_pointer  const &channelFindRequester)
{
    Lock xx(mutex);
    PVRecordPtr pvRecord = pvDatabase->findRecord(channelName);
    if(pvRecord.get()!=NULL) {
        channelFindRequester->channelFindResult(
            Status::Ok,
            channelFinder,
            true);
        
    } else {
        Status notFoundStatus(Status::STATUSTYPE_ERROR,"pv not found");
        channelFindRequester->channelFindResult(
            notFoundStatus,
            channelFinder,
            false);
    }
    return channelFinder;
}
开发者ID:anjohnson,项目名称:pvDatabaseCPP,代码行数:21,代码来源:channelProviderLocal.cpp

示例6: destroy

void PVDatabase::destroy()
{
    lock();
    try {
        if(isDestroyed) {
            unlock();
            return;
        }
        isDestroyed = true;
        PVRecordMap::iterator iter;
        while(true) {
            iter = recordMap.begin();
            if(iter==recordMap.end()) break;
            PVRecordPtr pvRecord = (*iter).second;
            recordMap.erase(iter);
            if(pvRecord.get()!=NULL) pvRecord->destroy();
        }
        unlock();
    } catch (...) {
        unlock();
        throw;
    }
}
开发者ID:ncanestrari,项目名称:EPICS-EPICS_V4,代码行数:23,代码来源:pvDatabase.cpp

示例7: createChannel

Channel::shared_pointer ChannelProviderLocal::createChannel(
    string const & channelName,
    ChannelRequester::shared_pointer  const &channelRequester,
    short priority,
    string const &address)
{
    Lock xx(mutex);
    PVRecordPtr pvRecord = pvDatabase->findRecord(channelName);
    if(pvRecord.get()!=NULL) {
        ChannelLocalPtr channel(new ChannelLocal(
            getPtrSelf(),channelRequester,pvRecord));
        channelRequester->channelCreated(
            Status::Ok,
            channel);
        pvRecord->addPVRecordClient(channel);
        return channel;
    }   
    Status notFoundStatus(Status::STATUSTYPE_ERROR,"pv not found");
    channelRequester->channelCreated(
        notFoundStatus,
        Channel::shared_pointer());
    return Channel::shared_pointer();
}
开发者ID:anjohnson,项目名称:pvDatabaseCPP,代码行数:23,代码来源:channelProviderLocal.cpp

示例8: removeRecord

bool PVDatabase::removeRecord(PVRecordPtr const & record)
{
    lock();
    try {
        if(isDestroyed) {
            unlock();
            return false;
        }
        string recordName = record->getRecordName();
        PVRecordMap::iterator iter = recordMap.find(recordName);
        if(iter!=recordMap.end())  {
            PVRecordPtr pvRecord = (*iter).second;
            recordMap.erase(iter);
            if(pvRecord.get()!=NULL) pvRecord->destroy();
            unlock();
            return true;
        }
        unlock();
        return false;
    } catch(...) {
        unlock();
        throw;
    }
}
开发者ID:ncanestrari,项目名称:EPICS-EPICS_V4,代码行数:24,代码来源:pvDatabase.cpp


注:本文中的PVRecordPtr::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。