• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ pvdata::Status类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中epics::pvdata::Status的典型用法代码示例。如果您正苦于以下问题:C++ Status类的具体用法?C++ Status怎么用?C++ Status使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: channelPutConnect

void ChannelPutRequesterImpl::channelPutConnect(const epics::pvData::Status& status,
                                                        ChannelPut::shared_pointer const & channelPut,
                                                        epics::pvData::PVStructure::shared_pointer const & pvStructure,
                                                        epics::pvData::BitSet::shared_pointer const & bitSet)
{
    if (status.isSuccess()) {
        // show warning
        if (!status.isOK()) {
            std::cerr << "[" << m_channelName << "] channel put create: " << status.toString() << std::endl;
        }

        // assign smart pointers
        {
            Lock lock(m_pointerMutex);
            m_channelPut = channelPut;
            m_pvStructure = pvStructure;
            m_bitSet = bitSet;
        }

        // we always put all
        m_bitSet->set(0);

        // get immediately old value
        channelPut->get();
    } else {
        std::cerr << "[" << m_channelName << "] failed to create channel put: " << status.toString() << std::endl;
    }
}
开发者ID:jerryjiahaha,项目名称:caqtdm,代码行数:28,代码来源:pvAccessImpl.cpp


示例2: getDone

    virtual void getDone(const epics::pvData::Status& status,
                         ChannelGet::shared_pointer const & /*channelGet*/,
                         epics::pvData::PVStructure::shared_pointer const & pvStructure,
                         epics::pvData::BitSet::shared_pointer const & bitSet)
    {
        if (status.isSuccess())
        {
            // show warning
            if (!status.isOK())
            {
                std::cerr << "[" << m_channelName << "] channel get: " << status << std::endl;
            }

            // access smart pointers
            {
                Lock lock(m_pointerMutex);

                m_pvStructure = pvStructure;
                m_bitSet = bitSet;

                m_done = true;

            }
        }
        else
        {
            std::cerr << "[" << m_channelName << "] failed to get: " << status << std::endl;
        }

        m_event.signal();
    }
开发者ID:msekoranja,项目名称:pvAccessCPP,代码行数:31,代码来源:pvget.cpp


示例3: getDone

    virtual void getDone(const epics::pvData::Status& status,
                         ChannelGet::shared_pointer const & /*channelGet*/,
                         epics::pvData::PVStructure::shared_pointer const & /*pvStructure*/,
                         epics::pvData::BitSet::shared_pointer const & /*bitSet*/)
    {
        if (status.isSuccess())
        {
            // show warning
            if (!status.isOK())
            {
                std::cout << "[" << m_channelName << "] channel get: " << status << std::endl;
            }

            channelCount++;
            if (channelCount == channels)
            {
                iterationCount++;
                channelCount = 0;
            }

            if (iterationCount == iterations)
            {
                epicsTimeStamp endTime;
                epicsTimeGetCurrent(&endTime);

                double duration = epicsTime(endTime) - epicsTime(startTime);
                double getPerSec = iterations*channels/duration;
                double gbit = getPerSec*arraySize*sizeof(double)*8/(1000*1000*1000); // * bits / giga; NO, it's really 1000 and not 1024
                if (verbose)
                    printf("%5.6f seconds, %.3f (x %d = %.3f) gets/s, data throughput %5.3f Gbits/s\n",
                           duration, iterations/duration, channels, getPerSec, gbit);
                sum += getPerSec;

                iterationCount = 0;
                epicsTimeGetCurrent(&startTime);

                runCount++;
                if (runs == 0 || runCount < runs)
                    get_all();
                else
                {
                    printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs);
        
                    Lock guard(waitLoopPtrMutex);
                    waitLoopEvent->signal();	// all done
                }
            }
            else if (channelCount == 0)
            {
                get_all();
            }
        }
        else
        {
            std::cout << "[" << m_channelName << "] failed to get: " << status << std::endl;
        }
    }
开发者ID:ncanestrari,项目名称:EPICS-EPICS_V4,代码行数:57,代码来源:testGetPerformance.cpp


示例4: putDone

void ChannelPutRequesterImpl::putDone(const epics::pvData::Status& status)
{
    if (status.isSuccess()) {
        // show warning
        if (!status.isOK()) {
            std::cerr << "[" << m_channelName << "] channel put: " << status.toString() << std::endl;
        }
        m_event->signal();
    } else {
        std::cerr << "[" << m_channelName << "] failed to get: " << status.toString() << std::endl;
    }
}
开发者ID:jerryjiahaha,项目名称:caqtdm,代码行数:12,代码来源:pvAccessImpl.cpp


示例5: channelCreated

void ChannelRequesterImpl::channelCreated(const epics::pvData::Status& status, Channel::shared_pointer const & channel)
{
    qDebug() << "ChannelRequesterImpl channelCreated";
    if (status.isSuccess()) {
        // show warning
        if (!status.isOK()) {
             std::cout << "[" << channel->getChannelName() << "] channel create: " << status.toString()  << std::endl;
        }
    } else {
         std::cout << "[" << channel->getChannelName() << "] failed to create a channel: " << status.toString()  << std::endl;
    }
}
开发者ID:jerryjiahaha,项目名称:caqtdm,代码行数:12,代码来源:pvAccessImpl.cpp


示例6: monitorConnect

void  MonitorRequesterImpl::monitorConnect(const epics::pvData::Status& status, Monitor::shared_pointer const & monitor, StructureConstPtr const & /*structure*/)
{
    qDebug() << "monitorConnect";
    if (status.isSuccess()) {
        Status startStatus = monitor->start();
        // show error
        if (!startStatus.isSuccess()) {
            std::cerr << "[" << m_channelName << "] channel monitor start: " << startStatus.toString() << std::endl;
        }

    } else {
        std::cerr << "monitorConnect(" << status.toString() << ")" << std::endl;
    }
}
开发者ID:jerryjiahaha,项目名称:caqtdm,代码行数:14,代码来源:pvAccessImpl.cpp


示例7: channelCreated

 virtual void channelCreated(const epics::pvData::Status& status,
                             Channel::shared_pointer const & channel)
 {
     if (status.isSuccess())
     {
         // show warning
         if (!status.isOK())
         {
             std::cout << "[" << channel->getChannelName() << "] channel create: " << status << std::endl;
         }
     }
     else
     {
         std::cout << "[" << channel->getChannelName() << "] failed to create a channel: " << status << std::endl;
     }
 }
开发者ID:mdavidsaver,项目名称:pvAccessCPP,代码行数:16,代码来源:testMonitorPerformance.cpp


示例8: channelCreated

 virtual void channelCreated(const epics::pvData::Status& status, Channel::shared_pointer const & channel)
 {
     if (!status.isSuccess())
     {
         std::cout << "channelCreated(" << status << ", "
                   << (channel ? channel->getChannelName() : "(0)") << ")" << std::endl;
     }
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:8,代码来源:testChannelConnect.cpp


示例9: channelGetConnect

 virtual void channelGetConnect(const epics::pvData::Status& status,ChannelGet::shared_pointer const & /*channelGet*/,
                                epics::pvData::Structure::const_shared_pointer const & pvStructure)
 {
     std::cout << "channelGetConnect(" << status << ")" << std::endl;
     if (status.isSuccess())
     {
         std::cout << *pvStructure << std::endl;
     }
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:9,代码来源:testRemoteClientImpl.cpp


示例10: monitorConnect

 virtual void monitorConnect(const epics::pvData::Status& status,
 		Monitor::shared_pointer const & /*monitor*/, StructureConstPtr const & structure)
 {
     std::cout << "monitorConnect(" << status << ")" << std::endl;
     if (status.isSuccess() && structure)
     {
         std::cout << *structure << std::endl;
     }
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:9,代码来源:testRemoteClientImpl.cpp


示例11: getArrayDone

 virtual void getArrayDone(const epics::pvData::Status& status, ChannelArray::shared_pointer const &,
     PVArray::shared_pointer const & pvArray)
 {
     std::cout << "getArrayDone(" << status << ")" << std::endl;
     if (status.isSuccess())
     {
         std::cout << *pvArray << std::endl;
     }
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:9,代码来源:testRemoteClientImpl.cpp


示例12: requestDone

 virtual void requestDone(const epics::pvData::Status& status, ChannelRPC::shared_pointer const &,
     epics::pvData::PVStructure::shared_pointer const & pvResponse)
 {
     std::cout << "requestDone(" << status << ")" << std::endl;
     if (status.isSuccess())
     {
         std::cout << *pvResponse << std::endl;
     }
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:9,代码来源:testRemoteClientImpl.cpp


示例13: putGetDone

 virtual void putGetDone(const epics::pvData::Status& status, ChannelPutGet::shared_pointer const &,
     PVStructure::shared_pointer const & putData, BitSet::shared_pointer const & /*bitSet*/)
 {
     std::cout << "putGetDone(" << status << ")" << std::endl;
     if (status.isSuccess())
     {
         std::cout << *putData << std::endl;
     }
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:9,代码来源:testRemoteClientImpl.cpp


示例14: channelArrayConnect

 virtual void channelArrayConnect(const epics::pvData::Status& status,ChannelArray::shared_pointer const & /*channelArray*/,
                                  epics::pvData::Array::const_shared_pointer const & array)
 {
     std::cout << "channelArrayConnect(" << status << ")" << std::endl;
     if (status.isSuccess())
     {
         std::cout << array << std::endl;
     }
     
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:10,代码来源:testRemoteClientImpl.cpp


示例15: getDone

void GetFieldRequesterImpl::getDone(const epics::pvData::Status& status, epics::pvData::FieldConstPtr const & field)
{
    qDebug() << "GetFieldRequesterImpl getDone";
    if (status.isSuccess()) {
        // show warning
        if (!status.isOK()) {
            std::cerr << "[" << m_channel->getChannelName() << "] getField create: " << status.toString() << std::endl;
        }
        // assign smart pointers
        {
            Lock lock(m_pointerMutex);
            m_field = field;
        }
    } else {
        // do not complain about missing field
        //std::cerr << "[" << m_channel->getChannelName() << "] failed to get channel introspection data: " << status.toString() << std::endl;
    }
    m_event.signal();
}
开发者ID:jerryjiahaha,项目名称:caqtdm,代码行数:19,代码来源:pvAccessImpl.cpp


示例16: monitorConnect

    virtual void monitorConnect(const epics::pvData::Status& status,
                                Monitor::shared_pointer const & /*monitor*/,
                                epics::pvData::Structure::const_shared_pointer const & /*structure*/)
    {
        if (status.isSuccess())
        {
            // show warning
            if (!status.isOK())
            {
                std::cout << "[" << m_channelName << "] channel monitor create: " << status << std::endl;
            }

            m_connectionEvent.signal();
        }
        else
        {
            std::cout << "[" << m_channelName << "] failed to create channel monitor: " << status << std::endl;
        }
    }
开发者ID:mdavidsaver,项目名称:pvAccessCPP,代码行数:19,代码来源:testMonitorPerformance.cpp


示例17: channelCreated

    virtual void channelCreated(const epics::pvData::Status& status,
                                pva::Channel::shared_pointer const & channel)
    {
        if (status.isSuccess())
        {

        }
        else
            std::cout << "failed to create channel: " << status << std::endl;
    }
开发者ID:mdavidsaver,项目名称:pvAccessCPP,代码行数:10,代码来源:testRAII.cpp


示例18: getDone

 virtual void getDone(const epics::pvData::Status& status, epics::pvData::FieldConstPtr const & field)
 {
     std::cout << "getDone(" << status << ", ";
     if (status.isSuccess() && field)
     {
         std::cout << *field;
     }
     else
         std::cout << "(0)";
     std::cout << ")" << std::endl;
 }
开发者ID:hartmansm,项目名称:pvAccessCPP,代码行数:11,代码来源:testRemoteClientImpl.cpp


示例19: channelGetConnect

    virtual void channelGetConnect(const epics::pvData::Status& status, ChannelGet::shared_pointer const & channelGet,
                                   epics::pvData::Structure::const_shared_pointer const & /*structure*/)
    {
        if (status.isSuccess())
        {
            // show warning
            if (!status.isOK())
            {
                std::cerr << "[" << m_channelName << "] channel get create: " << status << std::endl;
            }

            channelGet->lastRequest();
            channelGet->get();
        }
        else
        {
            std::cerr << "[" << m_channelName << "] failed to create channel get: " << status << std::endl;
            m_event.signal();
        }
    }
开发者ID:msekoranja,项目名称:pvAccessCPP,代码行数:20,代码来源:pvget.cpp


示例20: monitorConnect

void TestChannelMonitorRequester::monitorConnect(pvd::Status const & status,
                                                 pvd::MonitorPtr const & monitor,
                                                 pvd::StructureConstPtr const & structure)
{
    testDiag("monitorConnect %p %d", monitor.get(), (int)status.isSuccess());
    Guard G(lock);
    connectStatus = status;
    dtype = structure;
    connected = true;
    wait.trigger();
}
开发者ID:mdavidsaver,项目名称:pva2pva,代码行数:11,代码来源:utilities.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ errorlogger::ErrorMessage类代码示例发布时间:2022-05-31
下一篇:
C++ epg::CEpgInfoTagPtr类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap