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

C++ scanIoRequest函数代码示例

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

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



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

示例1: assert

// Called from ISR context
void SeqManager::doEndOfSequence(unsigned i)
{
    assert(i<hw.size());
    SeqHW* HW = hw[i];

    HW->running = false;

    SoftSequence *seq = HW->loaded;

    if(!seq) return;

    if(seq->committed.mode==Single) {
        seq->is_enabled = false;
    }

    seq->numEnd++;

    scanIoRequest(seq->onEnd);

    if(!seq->is_insync)
        seq->sync();

    if(seq->committed.mode==Single)
        scanIoRequest(seq->changed);
}
开发者ID:epics-modules,项目名称:mrfioc2,代码行数:26,代码来源:mrmSeq.cpp


示例2: drvACQ196_set_data_parsing

int drvACQ196_set_data_parsing(ST_STD_device *pSTDdev)
{
	ST_MASTER *pMaster = pSTDdev->pST_parentAdmin;

	pSTDdev->StatusDev &= ~TASK_SYSTEM_IDLE;
	pSTDdev->StatusDev |= TASK_POST_PROCESS;
	scanIoRequest(pSTDdev->ioScanPvt_status);
	printf("%s: start data parsing!\n", pSTDdev->taskName );
	if( !proc_dataChannelization( pSTDdev ) )
	{
		epicsPrintf("\n>>> drvACQ196_set_data_parsing(%s) : proc_dataChannelization() ... fail\n", pSTDdev->taskName);
		pSTDdev->StatusDev &= ~TASK_POST_PROCESS;
		pSTDdev->StatusDev |= DEV_CHANNELIZATION_FAIL;
		scanIoRequest(pSTDdev->ioScanPvt_status);
		pMaster->ErrorAdmin |= ERROR_AFTER_SHOT_PROCESS;
		scanIoRequest(pMaster->ioScanPvt_status);
		return WR_ERROR;
	}
	pSTDdev->StatusDev &= ~TASK_POST_PROCESS;
	pSTDdev->StatusDev |= TASK_SYSTEM_IDLE;

	scanIoRequest(pSTDdev->ioScanPvt_status);

	pSTDdev->StatusDev |= DEV_READY_TO_SAVE; /* if save PV put, then it cleared! */
	return WR_OK;
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:26,代码来源:PCI_drvACQ196.c


示例3: fprintf

void
evgSoftSeq::abort(bool callBack) {
    if(!isLoaded() && !isEnabled())
        return;

    // Prevent re-trigger
    m_seqRam->setRunMode(Single);
    m_seqRam->setTrigSrc(None);

    m_seqRam->reset();
    m_isEnabled = false;
    if(mrmEVGSeqDebug)
        fprintf(stderr, "SS%u: Abort!\n",m_id);
    scanIoRequest(ioscanpvt);

    if(callBack) {
        /*
             * Satisfy any callback request pending on irqStop0 or irqStop1
             * recList. As no 'End of sequence' Intrrupt will be generated. 
             */
        if(m_seqRam->getId() == 0)
            callbackRequest(&m_owner->irqStop0_cb);
        else
            callbackRequest(&m_owner->irqStop1_cb);
    }
}
开发者ID:Sangil-Lee,项目名称:Work,代码行数:26,代码来源:evgSoftSeq.cpp


示例4: drvTPG262_timeoutCallback

LOCAL void drvTPG262_timeoutCallback(asynUser* pasynTPG262User)
{
    asynTPG262UserData* pasynTPG262UserData = (asynTPG262UserData*) pasynTPG262User->userPvt;
    drvTPG262Config* pdrvTPG262Config = (drvTPG262Config*) pasynTPG262UserData->pdrvTPG262Config;
    TPG262_read* pTPG262_read = (TPG262_read*) pdrvTPG262Config->pTPG262_read;

    pdrvTPG262Config->status |= TPG262STATUS_SETUNIT_MASK;
    pdrvTPG262Config->status |= TPG262STATUS_TIMEOUT_MASK;
    pdrvTPG262Config->status |= TPG262STATUS_GETGID_MASK;
    pdrvTPG262Config->status |= TPG262STATUS_GETPROGVER_MASK;

    epicsMutexLock(pdrvTPG262Config->lock);
    pdrvTPG262Config->cbCount =0;
    pdrvTPG262Config->timeoutCount++;
    pTPG262_read->gst0 = TPG262GST_TIMEOUT; 
    pTPG262_read->gst1 = TPG262GST_TIMEOUT;
    pTPG262_read->gst_str0 = tSenStList[vSenStList[pTPG262_read->gst0]];
    pTPG262_read->gst_str1 = tSenStList[vSenStList[pTPG262_read->gst1]];
    strcpy(pTPG262_read->gid_str0, TPG262GID_UNKNOWN_STR);
    strcpy(pTPG262_read->gid_str1, TPG262GID_UNKNOWN_STR);
    strcpy(pTPG262_read->progver_str, TPG262PROGVER_UNKNOWN_STR);
    epicsMutexUnlock(pdrvTPG262Config->lock);

    scanIoRequest(pdrvTPG262Config->ioScanPvt);

   return; 
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:27,代码来源:drvTPG262.c


示例5: devNI6123_AO_DAQ_MAX_VOLT

static void devNI6123_AO_DAQ_MAX_VOLT(ST_execParam *pParam)
{
        ST_MASTER *pMaster = get_master();
        ST_STD_device *pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
        ST_NI6123 *pNI6123 = NULL;

        kLog (K_DATA,"[devNI6123_AO_DAQ_MAX_VOLT] minVolt(%f)\n", pParam->setValue);

        while(pSTDdev) {
                if (pSTDdev->StatusDev & TASK_ARM_ENABLED) {
                        kLog (K_DATA,"[devNI6123_AO_DAQ_MAX_VOLT] %s: System is armed! \n", pSTDdev->taskName);
                        notify_error (1, "System is armed!", pSTDdev->taskName );
                }
                else {
                        pNI6123 = pSTDdev->pUser;
                        pNI6123->maxVal = pParam->setValue;
                        scanIoRequest(pSTDdev->ioScanPvt_userCall);

                        kLog (K_DATA,"[devNI6123_AO_DAQ_MAX_VOLT] task(%s) maxVolt(%.f)\n",
                                        pSTDdev->taskName, pNI6123->maxVal);
                }

                pSTDdev = (ST_STD_device*) ellNext(&pSTDdev->node);
        }
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:25,代码来源:devNI6123.c


示例6: checkMySync

static void checkMySync( ) {
    /* we use channel 0 on board 0 to check */
    MY_BOARD_SOFTWARE *pBoardSoft = myBoard_getSoftwareBoard( 0 );
    MY_RING_BUFFER *pRingBuffer =  &(pBoardSoft->channel_buffer[0]);

    int resetting = 0;
    if (getWriteIndexOfMyRingBuffer( pRingBuffer ) == 0) {
        resetting = 1;
    }
    int i;
    for (i = 0; i < mySyncTagGetNumberUsed(); ++i) {
        MY_SYNC_T *pMySync = mySyncTagGetSync( i );
        if (resetting) {
            pMySync->indexRead = 0;
            pMySync->indexNextRead = 0;
        } else {
            pMySync->indexRead = pMySync->indexNextRead;
            /* this will change indexNextRead if enough data */
            if (readDataFromMyRingBuffer(
                pRingBuffer,
                pMySync->indexRead,
                &(pMySync->indexNextRead),
                pMySync->numNewNeed,
                NULL,
                0,
                &(pMySync->numNewAvailable),
                &(pMySync->numWaiting)
            )) {
                scanIoRequest( pMySync->ioScanPvt );
            }
        }
    }
}
开发者ID:emayssat,项目名称:epics-iocs,代码行数:33,代码来源:devComedi.c


示例7: devNI6123_AO_DAQ_SAMPLEING_RATE

static void devNI6123_AO_DAQ_SAMPLEING_RATE(ST_execParam *pParam)
{
        ST_MASTER *pMaster = get_master();
        ST_STD_device *pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
        ST_NI6123 *pNI6123 = NULL;

        kLog (K_DATA,"[devNI6123_AO_DAQ_SAMPLEING_RATE] sampleRate(%f)\n", pParam->setValue);

        while(pSTDdev) {
                if (pSTDdev->StatusDev & TASK_ARM_ENABLED) {
                        kLog (K_DATA,"[devNI6123_AO_DAQ_SAMPLEING_RATE] %s: System is armed! \n", pSTDdev->taskName);
                        notify_error (1, "System is armed!", pSTDdev->taskName );
                }
                else {
                        pNI6123 = pSTDdev->pUser;
			if(pParam->setValue > pNI6123->sample_rateLimit){
				/*  Device Sampling Rate Limit Cut if User is over Sampling Rate Setting.  */
				pParam->setValue = pNI6123->sample_rateLimit;
			} else if(pParam->setValue <= 0){
				 pParam->setValue = 1;
			}
			pNI6123->sample_rate = pParam->setValue;
                        scanIoRequest(pSTDdev->ioScanPvt_userCall);

                        kLog (K_DATA,"[devNI6123_AO_DAQ_SAMPLEING_RATE] task(%s) sampleRate(%.f)\n",
                                        pSTDdev->taskName, pNI6123->sample_rate);
                }

                pSTDdev = (ST_STD_device*) ellNext(&pSTDdev->node);
        }
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:31,代码来源:devNI6123.c


示例8: devNI6123_BO_AUTO_RUN

/* auto Run function */
static void devNI6123_BO_AUTO_RUN(ST_execParam *pParam)
{
        ST_MASTER *pMaster = get_master();
        ST_STD_device *pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
        ST_NI6123 *pNI6123 = NULL;

        kLog (K_TRACE, "[devNI6123_BO_AUTO_RUN] auto_run(%f)\n", pParam->setValue);

        if( pMaster->StatusAdmin & TASK_WAIT_FOR_TRIGGER ||
                        pMaster->StatusAdmin & TASK_IN_PROGRESS ) {
                kLog (K_ERR, "System is running! (0x%x)\n", pMaster->StatusAdmin);
                notify_error (1, "System is running! (0x%x)\n", pMaster->StatusAdmin);
                return;
        }

        if(pParam->setValue) {
                if( !(pMaster->StatusAdmin & TASK_SYSTEM_IDLE) ) {
                        kLog (K_ERR, "System is busy! (0x%x)\n", pMaster->StatusAdmin);
                        notify_error (1, "System is busy! (0x%x)\n", pMaster->StatusAdmin);
                        return;
                }
#if 0
		char strBuf[24];
		float stopT1;
	/*	remove this function because ECH has not LTU, so We donot use the DBproc_get function */
				if( pSTDdev->ST_Base.opMode == OPMODE_REMOTE ){
					DBproc_get (PV_LTU_TIG_T0_STR, strBuf);   //Get T0 from LTU
					DBproc_put (PV_START_TIG_T0_STR, strBuf);   //Set T0 from LTU
					sscanf(strBuf, "%f", &stopT1);
					stopT1 = pNI6123->sample_time - stopT1;
					sprintf(strBuf,"%f",stopT1);
					DBproc_put (PV_STOP_TIG_T1_STR, strBuf);   //Set T0 from LTU
				}
#endif
                while(pSTDdev) {
                        pSTDdev->StatusDev |= TASK_STANDBY;

                        pNI6123 = pSTDdev->pUser;
                        pNI6123->auto_run_flag = 1;

                        pSTDdev = (ST_STD_device*) ellNext(&pSTDdev->node);
                }
        }
        else if(!pParam->setValue) {
                while(pSTDdev) {
                        pNI6123 = pSTDdev->pUser;
                        pNI6123->auto_run_flag = 0;

                        pSTDdev = (ST_STD_device*) ellNext(&pSTDdev->node);
                }

                pMaster->n8EscapeWhile = 0;
                epicsThreadSleep(3.0);
                pMaster->n8EscapeWhile = 1;
                admin_all_taskStatus_reset();
                scanIoRequest(pMaster->ioScanPvt_status);
        }

        notify_refresh_master_status();
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:61,代码来源:devNI6123.c


示例9: G

void Sim::run()
{
    Guard G(lock);
    while(!stop) {
        if(!doSim) {
            UnGuard U(G);
            event.wait();
            continue;
        }

        doSim = false;

        epicsTimeStamp start;
        epicsTimeGetCurrent(&start);

        try {
            std::auto_ptr<StateBase> state(machine->allocState());

            machine->propagate(state.get());

            valid = true;
        }catch(std::exception& e){
            last_msg = e.what();
            valid = false;
        }

        epicsTimeGetCurrent(&last_run);
        last_duration = epicsTimeDiffInSeconds(&last_run, &start);

        scanIoRequest(aftersim);
    }
}
开发者ID:frib-high-level-controls,项目名称:FLAME,代码行数:32,代码来源:flame.cpp


示例10: func_acq196_OP_MODE

void func_acq196_OP_MODE(void *pArg, double arg1, double arg2)
{
	ST_STD_device* pSTDdev = (ST_STD_device *)pArg;

	drvACQ196_status_reset(pSTDdev);
	scanIoRequest(pSTDdev->ioScanPvt_status);
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:7,代码来源:PCI_drvACQ196.c


示例11: devNI6250_AO_DAQ_GAIN

static void devNI6250_AO_DAQ_GAIN(ST_execParam *pParam)
{
	ST_MASTER *pMaster = get_master();
	ST_STD_device *pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
	ST_NI6250 *pNI6250 = NULL;

	kLog (K_MON, "[devNI6250_AO_DAQ_GAIN] gain(%f)\n", pParam->setValue);

	while(pSTDdev) {
		if (pSTDdev->StatusDev & TASK_ARM_ENABLED) {
			kLog (K_ERR, "[devNI6250_AO_DAQ_GAIN] %s: System is armed! \n", pSTDdev->taskName);
			notify_error (1, "System is armed!", pSTDdev->taskName );		
		}
		else {
			pNI6250 = pSTDdev->pUser;
			pNI6250->gain = pParam->setValue;
			scanIoRequest(pSTDdev->ioScanPvt_userCall); 			

			kLog (K_DEBUG, "[devNI6250_AO_DAQ_GAIN] task(%s) gain(%.f)\n",
					pSTDdev->taskName, pNI6250->gain);
		}

		pSTDdev = (ST_STD_device*) ellNext(&pSTDdev->node);
	}
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:25,代码来源:devNI6250.c


示例12: while

/**
 * @brief Thread function that periodically reads the scaler values
 * @param arg ignore. does not take arguments
 * @return nothing.
 */
void *thread_measure( void* arg)
{

    int i;

    while( 1 )
    {

        // Clear Counters
        for( i=0; i<n_vuproms; ++i) {
            start_measurement( &(vu[i]) );
        }

        usleep( sleep_time );

        // Save Counters
        for( i=0; i<n_vuproms; ++i) {
            stop_measurement( &(vu[i]) );
        }

        // copy values
        for( i=0; i<n_vuproms; ++i) {
            save_values( &(vu[i]) );
        }

        if( _iointr )
            scanIoRequest( ioinfo );

    }

    return NULL;
}
开发者ID:A2-Collaboration,项目名称:vuprom_epics,代码行数:37,代码来源:drv.c


示例13: drvACQ196_notify_InitCondition

int drvACQ196_notify_InitCondition(ST_STD_device *pSTDdev)
{
	ST_ACQ196 *pAcq196 = (ST_ACQ196*)pSTDdev->pUser;

	if( (pAcq196->boardConfigure & ACQ196_SET_CLOCK_RATE) &&
		(pAcq196->boardConfigure & ACQ196_SET_R_BITMASK) &&
		(pAcq196->boardConfigure & ACQ196_SET_M_BITMASK) &&
		(pAcq196->boardConfigure & ACQ196_SET_L_BITMASK) &&
		(pAcq196->boardConfigure & ACQ196_SET_T0) &&
		(pAcq196->boardConfigure & ACQ196_SET_T1) &&
		(pAcq196->boardConfigure & ACQ196_SET_TAG) )
/*		(pAcq196->boardConfigure & ACQ196_SET_SHOT_NUM) )  */
	{
		if( pSTDdev->ST_Base.opMode == OPMODE_REMOTE )
			pSTDdev->StatusDev |= TASK_STANDBY;
		else {
			if( pAcq196->boardConfigure & ACQ196_SET_SHOT_NUM) {
				pSTDdev->StatusDev |= TASK_STANDBY;
/*				printf(" %s: ready, %x\n", pSTDdev->taskName, pSTDdev->StatusDev ); */
			} else {
				pSTDdev->StatusDev &= ~TASK_STANDBY;
/*				printf(" %s: not ready, %x\n", pSTDdev->taskName, pSTDdev->StatusDev ); */
				}
		}
	} else{
		pSTDdev->StatusDev &= ~TASK_STANDBY;
	}
	scanIoRequest(pSTDdev->ioScanPvt_status);

/*	notify_sys_ready(); */
	notify_refresh_master_status();
	
	return WR_OK;
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:34,代码来源:PCI_drvACQ196.c


示例14: simRegDevCallback

void simRegDevCallback(void* arg)
{
    simRegDevMessage* msg = arg;
    regDevice *device = msg->device;
    regDevTransferComplete callback = msg->callback;
    int status;

    if (simRegDevDebug & (msg->isOutput ? DBG_OUT : DBG_IN))
        printf ("simRegDevCallback %s %s: copy %u bytes * %"Z"u elements\n",
        msg->user, device->name, msg->dlen, msg->nelem);
    epicsMutexLock(device->lock);
    if (device->connected == 0)
    {
        status = S_dev_noDevice;
    }
    else
    {
        regDevCopy(msg->dlen, msg->nelem, msg->src, msg->dest, msg->pmask, device->swap);
        status = S_dev_success;
    }
    msg->next = device->msgFreelist[msg->prio];
    device->msgFreelist[msg->prio] = msg;
    if (msg->isOutput)
    {
        /* We got new data: trigger all interested input records */
        if (simRegDevDebug & DBG_OUT)
            printf ("simRegDevCallback %s %s: trigger input records\n", msg->user, device->name);
        scanIoRequest(device->ioscanpvt);
    }
    epicsMutexUnlock(device->lock);
    if (simRegDevDebug & (msg->isOutput ? DBG_OUT : DBG_IN))
        printf ("simRegDevCallback %s %s: call back status=%d\n", msg->user, device->name, status);
    callback(msg->user, status);
}
开发者ID:paulscherrerinstitute,项目名称:regdev,代码行数:34,代码来源:simRegDev.c


示例15: simRegDevSetStatus

int simRegDevSetStatus(
    const char* name,
    int connected)
{
    regDevice* device;

    if (!name)
    {
        printf ("usage: simRegDevSetStatus name, 0|1\n");
        return S_dev_badArgument;
    }
    device = regDevFind(name);
    if (!device)
    {
        errlogSevPrintf(errlogFatal,
            "simRegDevSetStatus: %s not found\n",
            name);
        return S_dev_noDevice;
    }
    if (device->magic != MAGIC)
    {
        errlogSevPrintf(errlogFatal,
            "simRegDevSetStatus: %s is not a simRegDev\n",
            name);
        return S_dev_wrongDevice;
    }
    device->connected = connected;
    if (simRegDevDebug >= 1)
        printf ("simRegDevSetStatus %s: trigger input records\n", device->name);
    scanIoRequest(device->ioscanpvt);
    return S_dev_success;
}
开发者ID:paulscherrerinstitute,项目名称:regdev,代码行数:32,代码来源:simRegDev.c


示例16: setTimestamp

    void setTimestamp(const double *arr, epicsUInt32 count)
    {
        const double tmult = getTimeScale();
        times_t times(count);
        // check for monotonic
        // TODO: not handling overflow (HW supports controlled rollover w/ special 0xffffffff times)
        for(epicsUInt32 i=0; i<count; i++)
        {
            if(!finite(arr[i]) || arr[i]<0.0)
                throw std::runtime_error("times must be finite >=0");

            times[i] = (arr[i]*tmult)+0.5;

            if(i>0 && times[i]<=times[i-1])
                throw std::runtime_error("Non-monotonic timestamp array");
            else if(times[i]==0xffffffff)
                throw std::runtime_error("Time overflow, rollover not supported");
        }
        {
            SCOPED_LOCK(mutex);
            scratch.times.swap(times);
            is_committed = false;
        }
        DEBUG(4, ("Set times\n"));
        scanIoRequest(changed);
    }
开发者ID:epics-modules,项目名称:mrfioc2,代码行数:26,代码来源:mrmSeq.cpp


示例17: devNI6123_AO_BEAM_PLUSE

static void devNI6123_AO_BEAM_PLUSE(ST_execParam *pParam)
{
	ST_MASTER *pMaster = get_master();
	ST_STD_device *pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
	ST_NI6123 *pNI6123 = NULL;

	kLog (K_TRACE, "[devNI6123_AO_BEAM_PLUSE] beam_pulse(%f)\n", pParam->setValue);

	while(pSTDdev) {
		if (pSTDdev->StatusDev & TASK_ARM_ENABLED) {
			kLog (K_ERR, "[devNI6123_AO_BEAM_PLUSE] %s: System is armed! \n", pSTDdev->taskName);
			notify_error (1, "System is armed!", pSTDdev->taskName );		
		}
		else {
			pNI6123 = pSTDdev->pUser;
			pNI6123->beam_pulse = pParam->setValue;
			scanIoRequest(pSTDdev->ioScanPvt_userCall); 			

			kLog (K_DEBUG, "[devNI6123_AO_BEAM_PLUSE] task(%s) pulse(%.f)\n",
					pSTDdev->taskName, pNI6123->beam_pulse);
		}

		pSTDdev = (ST_STD_device*) ellNext(&pSTDdev->node);
	}
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:25,代码来源:devNI6123.c


示例18: devCallback

LOCAL void devCallback(void * drvPvt)
{
    devPvt	*pdevPvt;

    pdevPvt = (devPvt *)(*pabDrv->getUserPvt)(drvPvt);
    if(!pdevPvt) return;
    scanIoRequest(pdevPvt->ioscanpvt);
}
开发者ID:A2-Collaboration,项目名称:epics,代码行数:8,代码来源:devAB1771IL.c


示例19: scan_callback

/* Callback, registered with drvEtherIP, for input records.
 * Used _IF_ scan="I/O Event":
 * Driver has new value (or no value because of error), process record
 */
static void scan_callback(void *arg)
{
    dbCommon      *rec = (dbCommon *) arg;
    DevicePrivate *pvt = (DevicePrivate *)rec->dpvt;
    if (rec->tpro)
        printf("EIP scan_callback('%s')\n", rec->name);
    scanIoRequest(pvt->ioscanpvt);
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:12,代码来源:devEtherIP.c


示例20: simRegDevWrite

int simRegDevWrite(
    regDevice *device,
    size_t offset,
    unsigned int dlen,
    size_t nelem,
    void* pdata,
    void* pmask,
    int prio,
    regDevTransferComplete callback,
    const char* user)
{
    if (!device || device->magic != MAGIC)
    {
        errlogSevPrintf(errlogMajor,
            "simRegDevWrite: illegal device handle\n");
        return S_dev_wrongDevice;
    }
    if (device->connected == 0)
    {
        return S_dev_noDevice;
    }
    if (simRegDevDebug & DBG_OUT)
    {
        size_t n;
        printf ("simRegDevWrite %s %s:%"Z"u: %u bytes * %"Z"u elements, prio=%d\n",
        user, device->name, offset, dlen, nelem, prio);
        for (n=0; n<nelem && n<10; n++)
        {
            switch (dlen)
            {
                case 1:
                    printf (" %02x",((epicsUInt8*)pdata)[n*dlen]);
                    break;
                case 2:
                    printf (" %04x",((epicsUInt16*)pdata)[n*dlen]);
                    break;
                case 4:
                    printf (" %08x",((epicsUInt32*)pdata)[n*dlen]);
                    break;
                case 8:
                    printf (" %08llx",((unsigned long long*)pdata)[n*dlen]);
                    break;
            }
        }
        printf ("\n");
    }

    if (nelem > 1 && device->lock)
        return simRegDevAsynTransfer(device, dlen, nelem, pdata,
            device->buffer+offset, pmask, prio, callback, user, TRUE);

    regDevCopy(dlen, nelem, pdata, device->buffer+offset, pmask, device->swap);
    /* We got new data: trigger all interested input records */
    if (simRegDevDebug & DBG_OUT)
        printf ("simRegDevWrite %s: trigger input records\n", device->name);
    scanIoRequest(device->ioscanpvt);
    return S_dev_success;
}
开发者ID:paulscherrerinstitute,项目名称:regdev,代码行数:58,代码来源:simRegDev.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ scanKeys函数代码示例发布时间:2022-05-30
下一篇:
C++ scan函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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