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

C++ Q_SUPER函数代码示例

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

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



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

示例1: button_down

static QState button_down(struct Button *me)
{
	switch (Q_SIG(me)) {
	case Q_ENTRY_SIG:
		post((QActive*)(&ui), me->press_signal, 0);
		return Q_HANDLED();
	case BUTTON_PRESSED_SIGNAL:
		me->counter ++;
		if (me->counter == 32) {
			return Q_TRAN(button_long);
		} else {
			return Q_HANDLED();
		}
	case Q_EXIT_SIG:
		post((QActive*)(&ui), me->release_signal, 0);
		return Q_HANDLED();
	}
	return Q_SUPER(button_maybe_down);
}
开发者ID:russells,项目名称:hc2,代码行数:19,代码来源:buttons.c


示例2: Tunnel_screen_saver_hide

/*..........................................................................*/
QState Tunnel_screen_saver_hide(Tunnel *me, QEvt const *e) {
    switch (e->sig) {
        case Q_ENTRY_SIG: {
            BSP_displayOff();                     /* power down the display */
            QTimeEvt_postIn(&me->screenTimeEvt, (QActive *)me,
                            BSP_TICKS_PER_SEC*3);             /* 3s timeout */
            return Q_HANDLED();
        }
        case Q_EXIT_SIG: {
            QTimeEvt_disarm(&me->screenTimeEvt);
            BSP_displayOn();                        /* power up the display */
            return Q_HANDLED();
        }
        case SCREEN_TIMEOUT_SIG: {
            return Q_TRAN(&Tunnel_screen_saver_show);
        }
    }
    return Q_SUPER(&Tunnel_screen_saver);
}
开发者ID:christation,项目名称:STM32491_CPLR,代码行数:20,代码来源:tunnel.c


示例3: Philo_thinking

/*..........................................................................*/
QState Philo_thinking(Philo *me, QEvt const *e) {
    switch (e->sig) {
        case Q_ENTRY_SIG: {
            QTimeEvt_postIn(&me->timeEvt, (QActive *)me, THINK_TIME);
            return Q_HANDLED();
        }
        case TIMEOUT_SIG: {
            BSP_busyDelay();
            return Q_TRAN(&Philo_hungry);
        }
        case EAT_SIG:                         /* intentionally fall-through */
        case DONE_SIG: {
                      /* EAT or DONE must be for other Philos than this one */
            Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
            return Q_HANDLED();
        }
    }
    return Q_SUPER(&QHsm_top);
}
开发者ID:christation,项目名称:STM32491_CPLR,代码行数:20,代码来源:philo.c


示例4: switch

// active / idle
QP::QState vca_manager::idle ( vca_manager * const me, QP::QEvt const * const e )
{
    QP::QState status;

    switch ( e->sig )
    {
    case Q_ENTRY_SIG:
    {
        status = Q_HANDLED();
        break;
    }

    default:
        status = Q_SUPER ( &vca_manager::active );
        break;
    }

    return status;
}
开发者ID:khoinguyentran,项目名称:hdb-node,代码行数:20,代码来源:vca_manager.cpp


示例5: FlashMgr_DataBusTest

/*${AOs::FlashMgr::SM::Active::BusyRam::DataBusTest} .......................*/
static QState FlashMgr_DataBusTest(FlashMgr * const me, QEvt const * const e) {
    QState status_;
    switch (e->sig) {
        /* ${AOs::FlashMgr::SM::Active::BusyRam::DataBusTest} */
        case Q_ENTRY_SIG: {
            me->currRamTest = _DC3_RAM_TEST_DATA_BUS;
            me->currRamAddr = 0;
            me->errorCode = ERR_SDRAM_DATA_BUS_TEST_TIMEOUT;

            QEvt *evt = Q_NEW(QEvt, RAM_OP_START_SIG);
            QACTIVE_POST(AO_FlashMgr, (QEvt *)(evt), AO_FlashMgr);

            status_ = Q_HANDLED();
            break;
        }
        /* ${AOs::FlashMgr::SM::Active::BusyRam::DataBusTest::RAM_OP_START} */
        case RAM_OP_START_SIG: {
            me->currRamTest = _DC3_RAM_TEST_DATA_BUS;
            me->currRamAddr = SDRAM_testDataBus( 0 );
            /* ${AOs::FlashMgr::SM::Active::BusyRam::DataBusTest::RAM_OP_START::[Error?]} */
            if (0 != me->currRamAddr) {
                me->errorCode = ERR_SDRAM_DATA_BUS;
                ERR_printf(
                    "RAM data bus test failed at addr: 0x%08x on pattern: 0x%08x. Error: 0x%08x\n",
                    SDRAM_BANK_ADDR + 0, me->currRamAddr, me->errorCode
                );
                status_ = Q_TRAN(&FlashMgr_Idle);
            }
            /* ${AOs::FlashMgr::SM::Active::BusyRam::DataBusTest::RAM_OP_START::[else]} */
            else {
                DBG_printf("No RAM Data bus error found.\n");
                status_ = Q_TRAN(&FlashMgr_AddrBusTest);
            }
            break;
        }
        default: {
            status_ = Q_SUPER(&FlashMgr_BusyRam);
            break;
        }
    }
    return status_;
}
开发者ID:christation,项目名称:STM32491_CPLR,代码行数:43,代码来源:FlashMgr.c


示例6: FlashMgr_DeviceTest

/*${AOs::FlashMgr::SM::Active::BusyRam::DeviceTest} ........................*/
static QState FlashMgr_DeviceTest(FlashMgr * const me, QEvt const * const e) {
    QState status_;
    switch (e->sig) {
        /* ${AOs::FlashMgr::SM::Active::BusyRam::DeviceTest} */
        case Q_ENTRY_SIG: {
            me->currRamTest = _DC3_RAM_TEST_DEV_INT;
            me->currRamAddr = 0;
            me->errorCode = ERR_SDRAM_DEVICE_INTEGRITY_TEST_TIMEOUT;

            QEvt *evt = Q_NEW(QEvt, RAM_OP_START_SIG);
            QACTIVE_POST(AO_FlashMgr, (QEvt *)(evt), AO_FlashMgr);

            status_ = Q_HANDLED();
            break;
        }
        /* ${AOs::FlashMgr::SM::Active::BusyRam::DeviceTest::RAM_OP_START} */
        case RAM_OP_START_SIG: {
            me->currRamAddr = SDRAM_testDevice(0, RAM_TEST_BLOCK_SIZE );
            /* ${AOs::FlashMgr::SM::Active::BusyRam::DeviceTest::RAM_OP_START::[Error?]} */
            if (0 != me->currRamAddr) {
                me->errorCode = ERR_SDRAM_DEVICE_INTEGRITY;
                ERR_printf(
                    "RAM device bus test failed at addr: 0x%08x. Error: 0x%08x\n",
                    me->currRamAddr, me->errorCode
                );
                status_ = Q_TRAN(&FlashMgr_Idle);
            }
            /* ${AOs::FlashMgr::SM::Active::BusyRam::DeviceTest::RAM_OP_START::[else]} */
            else {
                me->errorCode = ERR_NONE;
                DBG_printf("No RAM device errors found.\n");
                status_ = Q_TRAN(&FlashMgr_Idle);
            }
            break;
        }
        default: {
            status_ = Q_SUPER(&FlashMgr_BusyRam);
            break;
        }
    }
    return status_;
}
开发者ID:christation,项目名称:STM32491_CPLR,代码行数:43,代码来源:FlashMgr.c


示例7: switch

// $(AOs::Commands::Statechart::focus_move) ..................................
QState Commands::focus_move(Commands *me, QEvent const *e) {
    switch (e->sig) {
        // @(/2/4/4/2)
        case Q_ENTRY_SIG: {
            //Notify(PSTR("AO_Commands: Focus Move Entry\r\n"));
            uint16_t ptp_error;
            if((ptp_error = Eos.MoveFocus(me->fstep_cmd)) != PTP_RC_OK) {    //one step towards the camera
                PTPTRACE2("AO_Commands: Focus Step failed", ptp_error);
                AO_Lights->postFIFO(Q_NEW(QEvent, LED_ERROR_SIG));
            }

            if(me->fstep_cmd == NSTEP) {
                --me->focus_position;
                }
                else {
                    ++me->focus_position;
                }
            me->cmd_delay.disarm();
            me->cmd_delay.postIn(me, FM_CMD_DELAY);
            return Q_HANDLED();
        }
        // @(/2/4/4/2)
        case Q_EXIT_SIG: {
            //Notify(PSTR("AO_Commands: Focus Move Exit\r\n"));

            return Q_HANDLED();
        }
        // @(/2/4/4/2/0)
        case CMD_DELAY_SIG: {
            //Notify(PSTR("AO_Commands: Focus Move: CMD_DELAY_SIG\r\n"));

            FocusMovedEvt *fme = Q_NEW( FocusMovedEvt, FOCUS_MOVED_SIG );
            fme->focus_position = me->focus_position;

            AO_Lights->postFIFO(Q_NEW(QEvent, LED_WORKING_SIG));

            AO_Camera->postFIFO( fme );
            return Q_TRAN(&Commands::idle);
        }
    }
    return Q_SUPER(&QHsm::top);
}
开发者ID:georgbachmann,项目名称:FSA-EOS,代码行数:43,代码来源:commands.cpp


示例8: ToastOven_heating

/*..........................................................................*/
static QState ToastOven_heating(ToastOven * const me, QEvt const * const e) {
    QState status;
    switch (e->sig) {
        case Q_ENTRY_SIG: {
            printf("heater-On;");
            status = Q_HANDLED();
            break;
        }
        case Q_EXIT_SIG: {
            printf("heater-Off;");
            status = Q_HANDLED();
            break;
        }
        default: {
            status = Q_SUPER(&ToastOven_doorClosed);
            break;
        }
    }
    return status;
}
开发者ID:SmartCocktailFactory,项目名称:QP_LWIP_STM32F2xx_eth_DPP_Example,代码行数:21,代码来源:history.c


示例9: mmi_show_msg

static QState mmi_show_msg(struct mmi_ao *me)
{
    switch (Q_SIG(me)) {
    case Q_ENTRY_SIG:
        QActive_arm((QActive *) me, TICKS(Q_PAR(me) * 1000));
        return Q_HANDLED();
    case Q_EXIT_SIG:
        QActive_disarm((QActive *) me);
        return Q_HANDLED();
    case Q_TIMEOUT_SIG:
        return Q_TRAN(mmi_navigate);
    case SIG_KEY_PRESS:
        if (Q_PAR(me) == KEY_ENTER) {
            return Q_TRAN(mmi_navigate);
        }
        return Q_HANDLED();;
    }

    return Q_SUPER(&QHsm_top);
}
开发者ID:westlicht,项目名称:camcontrol,代码行数:20,代码来源:mmi.c


示例10: Tag_Fault

static QState Tag_Fault(Tag * const me) {
  QState status;

  switch (Q_SIG(me))
  {
  case Q_ENTRY_SIG:
    {
      printf("fault\r\n");
      status = Q_HANDLED();
      break;
    }

  default:
    {
      status = Q_SUPER(&QHsm_top);
      break;
    }
  }
  return status;
}
开发者ID:evchar,项目名称:charging,代码行数:20,代码来源:charging.c


示例11: QGprs_sleep

/* @(/1/8/23/2/1) ..........................................................*/
static QState QGprs_sleep(QGprs * const me, QEvt const * const e) {
    QState status_;
    switch (e->sig) {
        /* @(/1/8/23/2/1/0) */
        case GPRS_COMMINGSMS_SIG: {
            status_ = Q_TRAN(&QGprs_sleep_SMSHandling);
            break;
        }
        /* @(/1/8/23/2/1/1) */
        case GPRS_COMMINGCALL_SIG: {
            status_ = Q_TRAN(&QGprs_sleep_PhoneCalling);
            break;
        }
        default: {
            status_ = Q_SUPER(&QGprs_powerSaveMode);
            break;
        }
    }
    return status_;
}
开发者ID:chalot,项目名称:BWRecorder,代码行数:21,代码来源:qgprs.c


示例12: Calc_result

/*..........................................................................*/
QState Calc_result(Calc * const me, QEvt const * const e) {
    QState status;
    switch (e->sig) {
        case Q_ENTRY_SIG: {
            BSP_message("result-ENTRY;");
            status = Q_HANDLED();
            break;
        }
        case Q_EXIT_SIG: {
            BSP_message("result-EXIT;");
            status = Q_HANDLED();
            break;
        }
        default: {
            status = Q_SUPER(&Calc_ready);
            break;
        }
    }
    return status;
}
开发者ID:SmartCocktailFactory,项目名称:QP_LWIP_STM32F2xx_eth_DPP_Example,代码行数:21,代码来源:calc2.c


示例13: QTTS_normal

/* @(/1/6/0/1) .............................................................*/
static QState QTTS_normal(QTTS * const me, QEvt const * const e) {
    QState status_;
    switch (e->sig) {
        /* @(/1/6/0/1/0) */
        case TTS_READMSG_SIG: {
            status_ = Q_HANDLED();
            break;
        }
        /* @(/1/6/0/1/1) */
        case ACC_OFF_SIG: {
            status_ = Q_HANDLED();
            break;
        }
        default: {
            status_ = Q_SUPER(&QHsm_top);
            break;
        }
    }
    return status_;
}
开发者ID:chalot,项目名称:BWRecorder,代码行数:21,代码来源:qtts.c


示例14: Philo_eating

QState Philo_eating(Philo * const me, QEvt const * const e) {
    TableEvt *pe;
    switch (e->sig) {
        case Q_ENTRY_SIG: {
            QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); /* one shot */
            return Q_HANDLED();
        }
        case Q_EXIT_SIG: {
            QTimeEvt_disarm(&me->timeEvt);
            pe = Q_NEW(TableEvt, DONE_SIG);
            pe->philNum = me->num;
            QF_PUBLISH((QEvt *)pe, me);
            return Q_HANDLED();
        }
        case TIMEOUT_SIG: {
            return Q_TRAN(&Philosopher_thinking);
        }
    }
    return Q_SUPER(&QHsm_top);
}
开发者ID:christation,项目名称:STM32491_CPLR,代码行数:20,代码来源:qf_state.c


示例15: uiMenuMaybeSettime

static QState uiMenuMaybeSettime(struct UI *me)
{
	switch (Q_SIG(me)) {
	case Q_ENTRY_SIG:
		lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL);
		lcd_showstring("SETTIME");
		return Q_HANDLED();
	case BUTTON_ENTER_PRESS_SIGNAL:
		ACTION();
		me->settime = *gettimep();
		return Q_TRAN(uiMenuSettimeYears);
	case BUTTON_UP_PRESS_SIGNAL:
		ACTION();
		return Q_HANDLED();
	case BUTTON_DOWN_PRESS_SIGNAL:
		ACTION();
		return Q_TRAN(uiMenuMaybeCalibrate);
	}
	return Q_SUPER(uiMenu);
}
开发者ID:russells,项目名称:hc2,代码行数:20,代码来源:ui.c


示例16: uiRun

static QState uiRun(struct UI *me)
{
	switch (Q_SIG(me)) {
	case Q_ENTRY_SIG:
		lcd_buttons(LCD_BUTTONS_ENTER_UP_DOWN);
		show_temperature(me->ti);
		show_time(gettimep());
		return Q_HANDLED();
	case BUTTON_ENTER_PRESS_SIGNAL:
		return Q_TRAN(uiMenuMaybeSettime);
	case BUTTON_UP_PRESS_SIGNAL:
		return Q_TRAN(uiShowMax);
	case BUTTON_DOWN_PRESS_SIGNAL:
		return Q_TRAN(uiShowMin);
	case CURRENT_TEMPERATURE_SIGNAL:
		me->ti = (int16_t) Q_PAR(me);
		show_temperature(me->ti);
	}
	return Q_SUPER(uiTop);
}
开发者ID:russells,项目名称:hc2,代码行数:20,代码来源:ui.c


示例17: LPJ_Dimm

/* @(/1/0/1/2/1) ...........................................................*/
static QState LPJ_Dimm(LPJ * const me, QEvent const * const e) {
    QState status;
    switch (e->sig) {
        /* @(/1/0/1/2/1) */
        case Q_ENTRY_SIG: {
            /* Dimm(me->dimm); */
	    //printf("LPJ_Dimm");
	    periksaPIR();
            status = Q_HANDLED();
            break;
        }
        /* @(/1/0/1/2/1/0) */
        case reportBefore_SIG: {
	    me->before =((reportEvt const *)e)->presence;
	    if(me->before == ADA) status = Q_TRAN(&LPJ_NodeBefore);
	    else status = Q_HANDLED();
            break;
        }
        /* @(/1/0/1/2/1/1) */
        case PIRIntr_SIG: {
	    me->pir = ((pirEvt const *)e)->pir;
	    //kirimReport((me->pir)+4);
	    if(me->pir == ADA) status = Q_TRAN(&LPJ_OnTheNode);
	    else status = Q_HANDLED();
            break;
        }
        case TickTime_SIG: {
	    if(me->dimm < 3500) {
		me->dimm +=20;
		Dimm(me->dimm);
	    }
//	    periksaLux();
	    status = Q_HANDLED();
	}
        default: {
            status = Q_SUPER(&LPJ_On);
            break;
        }
    }
    return status;
}
开发者ID:orhan89,项目名称:LPJCerdas,代码行数:42,代码来源:lpj.c


示例18: switch

QP::QState Txr::playBack(Txr * const me, QP::QEvt const * const e) {
  QP::QState status_;
  switch (e->sig) {
    case Q_ENTRY_SIG: 
    {
      ENC_GREEN_LED_ON();
      ENC_RED_LED_ON();
      me->mPacket.mode = PLAYBACK_MODE;
      me->mPacket.position = me->mCurPos;
      me->mVelocityManager.Init(50); // init at 50% speed
      status_ = Q_HANDLED();
      break;
    }
    case Q_EXIT_SIG: 
    {
      me->mVelocityManager.SetAllLEDsOff();
      status_ = Q_HANDLED();
      break;
    }
    case SEND_TIMEOUT_SIG: 
    {
      me->UpdatePositionPlayBack(me);            
      status_ = Q_HANDLED(); 
      break;
    }
    case POSITION_BUTTON_SIG:
    {
      int buttonNum = ((PositionButtonEvt*)e)->ButtonNum;
      Q_REQUIRE(buttonNum < NUM_POSITION_BUTTONS);
      me->mCurPos = me->mSavedPositions[buttonNum];
      status_ = Q_HANDLED();
      break;
    }
    default: 
    {
      status_ = Q_SUPER(&calibrated);
      break;
    }
  }
  return status_;
}
开发者ID:MotionDogs,项目名称:Lenzhound-dev-pre-release,代码行数:41,代码来源:ao_Txr.cpp


示例19: QGprs_sleepRequest

/* @(/1/8/23/1/7/6) ........................................................*/
static QState QGprs_sleepRequest(QGprs * const me, QEvt const * const e) {
    QState status_;
    switch (e->sig) {
        /* @(/1/8/23/1/7/6) */
        case Q_ENTRY_SIG: {
            //进入休眠命令
            TRACE_(QS_USER, NULL, "[GPRS] Enable MG323 Module entering into Sleep mode...");
            GPRS_RequestSleep();
            QTimeEvt_postIn(&me->m_Timer, &me->super, TIMEOUT_ATACK);
            status_ = Q_HANDLED();
            break;
        }
        /* @(/1/8/23/1/7/6) */
        case Q_EXIT_SIG: {
            QTimeEvt_disarm(&me->m_Timer);
            status_ = Q_HANDLED();
            break;
        }
        /* @(/1/8/23/1/7/6/0) */
        case AT_OK_SIG: {
            TRACE_(QS_USER, NULL, "[GPRS] Sleep mode is Done.");
            status_ = Q_TRAN(&QGprs_powerSaveMode);
            break;
        }
        /* @(/1/8/23/1/7/6/1) */
        case Q_TIMEOUT_SIG: {
            status_ = Q_TRAN(&QGprs_sleepRequest);
            break;
        }
        /* @(/1/8/23/1/7/6/2) */
        case AT_ERROR_SIG: {
            status_ = Q_HANDLED();
            break;
        }
        default: {
            status_ = Q_SUPER(&QGprs_polling);
            break;
        }
    }
    return status_;
}
开发者ID:chalot,项目名称:BWRecorder,代码行数:42,代码来源:qgprs.c


示例20: switch

// @(/1/0/3/1/3) .............................................................
QP::QState Pelican::pedsEnabled(Pelican * const me, QP::QEvt const * const e) {
    QP::QState status_;
    switch (e->sig) {
        // @(/1/0/3/1/3)
        case Q_EXIT_SIG: {
            BSP_signalPeds(PEDS_DONT_WALK);
            status_ = Q_HANDLED();
            break;
        }
        // @(/1/0/3/1/3/0)
        case Q_INIT_SIG: {
            status_ = Q_TRAN(&Pelican::pedsWalk);
            break;
        }
        default: {
            status_ = Q_SUPER(&Pelican::operational);
            break;
        }
    }
    return status_;
}
开发者ID:ankiys,项目名称:QP_Fraunchpad,代码行数:22,代码来源:ao_pelican.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Q_TRAN函数代码示例发布时间:2022-05-30
下一篇:
C++ Q_SIG函数代码示例发布时间: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