本文整理汇总了C++中epics::pvdata::Status::isSuccess方法的典型用法代码示例。如果您正苦于以下问题:C++ Status::isSuccess方法的具体用法?C++ Status::isSuccess怎么用?C++ Status::isSuccess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类epics::pvdata::Status
的用法示例。
在下文中一共展示了Status::isSuccess方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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;
}
}
示例3: 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;
}
}
示例4: 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;
}
}
示例5: 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;
}
}
示例6: 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;
}
}
示例7: 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;
}
}
示例8: 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;
}
}
示例9: 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;
}
}
示例10: 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;
}
}
示例11: 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;
}
示例12: 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;
}
示例13: 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();
}
示例14: 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;
}
}
示例15: 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;
}
}