Menu

Multiple Instances of a simple HSM

2014-06-24
2014-06-24
  • Rodrigo Haguiuda

    Hi

    Can someone provide some help/guidance on how use a simple HSM with multiple instances in QPC?

    I've build a HSM to manage a physical button press/hold behavior in a custom PCB board.
    The board has four buttons. So I need four instances of the HSM, one for each button. I've designed the HSM as an QActive object and tested it to one button, and worked perfectly.

    Now I need to adjust it to accept all buttons. Can someone help?

    Thank you!

     
  • Quantum Leaps

    Quantum Leaps - 2014-06-24

    Please take a look at the standard examples that ship in the QP baseline distros. For example, the DPP (Dining Philosophers Problem) example shows 5 identical "philosopher" active objects, which are all instances of the same class Philo. In the "Fly 'n' Shoot" game example, there are 20 Mines objects: 10 instances of the class Mine1 and 10 of the class Mine2. In this latter case, the Mines are simple state machines, not active objects.

    I hope a look at these examples will answer your questions.

    --MMS

     

Log in to post a comment.

MongoDB Logo MongoDB