当前位置: 首页>>代码示例>>C++>>正文


C++ Q_SUPER函数代码示例

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


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


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