質問

I am working on a software integrated with the hardware component. I need to create a simple diagram to express that:

  1. Certain activity runs in a cycle (the device continously monitor a temperature)
  2. When the temperature deviates from the baseline and remains so for 10 seconds, a function is called

I am writing a high level document and I am not sure how to capture this - UML diagrams do not seem to be suitable..but maybe an activity diagram?

役に立ちましたか?

解決

Either activity diagram or sequence diagram (they are pretty much two views of the same thing).

(EDIT: whoops in earlier text I was confusing correlation diagram with activity diagram; they are really similar. Either it's been too long, or else there are just too many damn diagrams available. ;) )

Sequence diagrams have notation for looping; the message that follows the deviation would just come right after the loop.

...

The boxes around an activity diagrams just become the boxes at the top of the sequence diagram. I used to really like activity diagrams, but came to find sequence diagrams easier to manage -- personal preference. BTW there's a good online tool for playing with sequence diagrams: http://websequencediagrams.com

...

Also, you're describing a state machine, so a state diagram might also work well. The states are

  • initial

  • normal -- no deviation

  • alert -- deviation detected, but less than 10 seconds

  • trigger -- deviation detected for 10 seconds

...and then back to normal.

In any case, there are a few good choices. It's a small enough problem that you could do it each way and see what looks best.

ライセンス: CC-BY-SA帰属
所属していません softwareengineering.stackexchange
scroll top