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; } }
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; } }
void ChannelPutRequesterImpl::getDone(const epics::pvData::Status& status) { qDebug() << "ChannelPutRequesterImpl getDone"; if (status.isSuccess()) { // show warning if (!status.isOK()) { std::cerr << "[" << m_channelName << "] channel get: " << status.toString() << std::endl; } // access smart pointers Lock lock(m_pointerMutex); { PVField::shared_pointer value = m_pvStructure->getSubField("value"); } m_event->signal(); } else { std::cerr << "[" << m_channelName << "] failed to get: " << status.toString() << std::endl; } }
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; } }
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; } }
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(); }