void ChannelProcessLocal::process()
{
    ChannelProcessRequester::shared_pointer requester = channelProcessRequester.lock();
    if(!requester) return;
    if(isDestroyed) {
         requester->processDone(channelDestroyedStatus,getPtrSelf());
         return;
    } 
    if(pvRecord->getTraceLevel()>1)
    {
        cout << "ChannelProcessLocal::process";
        cout << " nProcess " << nProcess << endl;
    }
    try {
        for(int i=0; i< nProcess; i++) {
            epicsGuard <PVRecord> guard(*pvRecord);
            pvRecord->beginGroupPut();
            pvRecord->process();
            pvRecord->endGroupPut();
        }
        requester->processDone(Status::Ok,getPtrSelf());
    } catch(std::exception& ex) {
        Status status = Status(Status::STATUSTYPE_FATAL, ex.what());
        requester->processDone(status,getPtrSelf());
    }
}
Beispiel #2
0
ChannelProcess::shared_pointer CAChannel::createChannelProcess(
        ChannelProcessRequester::shared_pointer const & channelProcessRequester,
        epics::pvData::PVStructure::shared_pointer const & /*pvRequest*/)
{
    Status errorStatus(Status::STATUSTYPE_ERROR, "not supported");
    ChannelProcess::shared_pointer nullChannelProcess;
    EXCEPTION_GUARD(channelProcessRequester->channelProcessConnect(errorStatus, nullChannelProcess));
    return nullChannelProcess;
}
Beispiel #3
0
ChannelProcess::shared_pointer ChannelBase::createChannelProcess(
        ChannelProcessRequester::shared_pointer const & channelProcessRequester,
        PVStructure::shared_pointer const & pvRequest)
{
    Status status(Status::STATUSTYPE_ERROR,
        String("ChannelProcess not supported"));
    channelProcessRequester->channelProcessConnect(
        status,
        ChannelProcess::shared_pointer());
    return ChannelProcess::shared_pointer();
}