LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the disadvantage of state machine?


@crossrulz wrote:

@REAL! wrote:

Isn't a state machine with a queue a QMH? Smiley Wink


Not quite.  There is a slight difference between a Queued State Machine and a Queued Message Handler.  They look alike, but the QSM handles its own queue to go through states while the QMH just accepts commands from other threads through the queue.


I would say that the QSM is an extension of the state machine, and QMH is an extension of the QSM.  Or, that's how I picture it in my mind's eye.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 16
(1,149 Views)

@billko wrote:

@crossrulz wrote:

@REAL! wrote:

Isn't a state machine with a queue a QMH? Smiley Wink


Not quite.  There is a slight difference between a Queued State Machine and a Queued Message Handler.  They look alike, but the QSM handles its own queue to go through states while the QMH just accepts commands from other threads through the queue.


I would say that the QSM is an extension of the state machine, and QMH is an extension of the QSM.  Or, that's how I picture it in my mind's eye.


I would not state it quite that way.  A QSM is an extension of the Simple State Machine.  You can say this since they still act very much the same.  The QMH is in a different world.  Unlike the state machines that cycle through states in a somewhat deterministic way, a QMH just sits there and does something when it is told.  So you really can't call the QMH an extension of the state machine.  The QMH is actually an extension of the Producer/Consumer.

 

Nothing like arguing over semantics...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 16
(1,140 Views)

@Dennis_Knutson wrote:
...but NI will also lose points for such a question on the exam.

We've been doing some internal CLAD reviews...that question's days are numbered. 😉

0 Kudos
Message 13 of 16
(1,133 Views)

@crossrulz wrote:

@billko wrote:

@crossrulz wrote:

@REAL! wrote:

Isn't a state machine with a queue a QMH? Smiley Wink


Not quite.  There is a slight difference between a Queued State Machine and a Queued Message Handler.  They look alike, but the QSM handles its own queue to go through states while the QMH just accepts commands from other threads through the queue.


I would say that the QSM is an extension of the state machine, and QMH is an extension of the QSM.  Or, that's how I picture it in my mind's eye.


I would not state it quite that way.  A QSM is an extension of the Simple State Machine.  You can say this since they still act very much the same.  The QMH is in a different world.  Unlike the state machines that cycle through states in a somewhat deterministic way, a QMH just sits there and does something when it is told.  So you really can't call the QMH an extension of the state machine.  The QMH is actually an extension of the Producer/Consumer.

 

Nothing like arguing over semantics...


And, semantically speaking, we're having a discussion, not an arguement.  😉

 

Maybe that's why I never could quite resolve why they didn't really act the same.  If I think about it, it does have a lot more in common with the producer/consumer.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 16
(1,101 Views)

@billko wrote:

@crossrulz wrote:

@billko wrote:

@crossrulz wrote:

@REAL! wrote:

Isn't a state machine with a queue a QMH? Smiley Wink


Not quite.  There is a slight difference between a Queued State Machine and a Queued Message Handler.  They look alike, but the QSM handles its own queue to go through states while the QMH just accepts commands from other threads through the queue.


I would say that the QSM is an extension of the state machine, and QMH is an extension of the QSM.  Or, that's how I picture it in my mind's eye.


I would not state it quite that way.  A QSM is an extension of the Simple State Machine.  You can say this since they still act very much the same.  The QMH is in a different world.  Unlike the state machines that cycle through states in a somewhat deterministic way, a QMH just sits there and does something when it is told.  So you really can't call the QMH an extension of the state machine.  The QMH is actually an extension of the Producer/Consumer.

 

Nothing like arguing over semantics...


And, semantically speaking, we're having a discussion, not an arguement.  😉

 

Maybe that's why I never could quite resolve why they didn't really act the same.  If I think about it, it does have a lot more in common with the producer/consumer.


If you really want to think about it, head over to this LAVA thread.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 15 of 16
(1,091 Views)

@crossrulz wrote:

@billko wrote:

@crossrulz wrote:

@billko wrote:

@crossrulz wrote:

@REAL! wrote:

Isn't a state machine with a queue a QMH? Smiley Wink


Not quite.  There is a slight difference between a Queued State Machine and a Queued Message Handler.  They look alike, but the QSM handles its own queue to go through states while the QMH just accepts commands from other threads through the queue.


I would say that the QSM is an extension of the state machine, and QMH is an extension of the QSM.  Or, that's how I picture it in my mind's eye.


I would not state it quite that way.  A QSM is an extension of the Simple State Machine.  You can say this since they still act very much the same.  The QMH is in a different world.  Unlike the state machines that cycle through states in a somewhat deterministic way, a QMH just sits there and does something when it is told.  So you really can't call the QMH an extension of the state machine.  The QMH is actually an extension of the Producer/Consumer.

 

Nothing like arguing over semantics...


And, semantically speaking, we're having a discussion, not an arguement.  😉

 

Maybe that's why I never could quite resolve why they didn't really act the same.  If I think about it, it does have a lot more in common with the producer/consumer.


If you really want to think about it, head over to this LAVA thread.


Sounds fun - and educational.  What could be better?  🙂

 

Thanks!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 16 of 16
(1,086 Views)