本文整理汇总了C++中scanIoRequest函数的典型用法代码示例。如果您正苦于以下问题:C++ scanIoRequest函数的具体用法?C++ scanIoRequest怎么用?C++ scanIoRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scanIoRequest函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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;
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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 );
}
}
}
}
示例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);
}
}
示例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();
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}