Menu

qp model statediagram transition

2015-11-03
2015-11-25
  • VIGNESH PRABHU

    VIGNESH PRABHU - 2015-11-04

    I am here with a question for you ,hoping I could get the answer

    How to get the current active state and how to make branch to current active state using return Q_TRAN ( ); or any other means?

    What "return Q_TRAN(&me);" do exactly?does 'me' has any information for the current Active state?

    Please guide me on this so that I would be able proceed further in my project development.

     
  • VIGNESH PRABHU

    VIGNESH PRABHU - 2015-11-04

    what does " return Q_TRAN(QHsm_state(me)); " do ?how useful is this in this case ?

     
  • Quantum Leaps

    Quantum Leaps - 2015-11-04

    Vignesh,
    The macro Q_TRAN() as well as Q_HANDLED(), Q_SUPER(), etc. are part of the state machine implementation technique used in the QP frameworks. This implementation is described in Chapter 4 of the PSiCC2 book. You can also find some information about these macros online in the QP/C Reference Manual.

    --MMS

     
  • VIGNESH PRABHU

    VIGNESH PRABHU - 2015-11-05

    OK I will go through this concept and proceed.THank you .

     
  • VIGNESH PRABHU

    VIGNESH PRABHU - 2015-11-05

    Here is one Ex:return Q_TRAN(&target_state),where as the target_state is nested inside multiple state,in this does the call for return Q_TRAN(&target_state) leads to execution of all the entry function of the states which the target_state is nested?how do we directly transit to the traget_state without going through entry functions of the other states than the target_state?

     
  • VIGNESH PRABHU

    VIGNESH PRABHU - 2015-11-25

    Hi Miro,

    I just want to know how to prioritize the time events QP::QTimeEvt which are scheduled to occur at same time.
    For eg:if i have a 3 QP::QTimeEvt time events which are scheduled to occur for every 40 msec ,but in that i want to prioritize the events as per my critical requirement in project,how can i proceed with this situation ?

     
  • Quantum Leaps

    Quantum Leaps - 2015-11-25

    I'm not quite sure that I understand what you mean by "prioritizing time events" and what is it that you want to achieve. But in QP, you cannot prioritize events. You prioritize active objects, which are the recipients of the events.

    Also, with multiple periodic time events with the time period (say, every 40ms), you might want to shift them in phase, so that they don't expire at exactly the same time. The QP function specifically designed to adjust the phase of an armed time events is QTimeEvt::rearm().

    --MMS

     

Log in to post a comment.