I am researching HSM and I have a question about.
In HSM (for all system), is there only one current state? For example; In my project, there is two user type : normal user and technician user. There is no identicality between them. Normal user can login to system any time and logout. And technician same. Also, technician user can login to system when normal user logined. Also, technician user can login to system when normal user have already logined. But normal user does not do it.
Yes... I think that there is two current state : current state 1 = nomral user logined or quited. current state 2 = technician user logined or quited. Am I rigt?
I am a bit of confused about them. How can we show this states on HSM diagram as only one current state?
is there only one current state
In a general way it is possible to have several current states in a state machine instantiation thank to the fork from where output vertices are in orthogonal regions of a composite state.
For instance if the states indicate if there is or not at least one normal user logged and there is or not at least one technician logged :
where the two entry state behaviors setting the counters to 0 are not necessary. If there is at most one normal user and one technician the associated counters and the internal transitions disappear.
The current states can be :
no normal user logged and no technician logged
no normal user logged and at least one technician logged
at least one normal user logged and no technician logged
at least one normal user logged and at least one technician logged
But your statement is not clear at all :
first because of normal user can login to system any time and logout. And technician same
that means there is no restriction when a normal user and technician can login, but but normal user does not do it seems to introduce a restriction which is contradictory. I think these two sentences must be removed.
technician user can login to system when normal user logined
: nothing new because we already know technician same
meaning technician can login to system any time and logout
technician user can login to system when normal user have already logined
: what difference with the previous assumption ? Perhaps you wanted to say technician user can login to system when a technician user have already logined, but there is nothing new because we already know technician same
meaning technician can login to system any time and logout
but normal user does not do it
: does not do what ? out of the fact this is contradictory with normal user can login to system any time and logout
can a normal user login when there is already a normal user logged ? can a normal user login when there is already a technician user logged ?
I think that there is two current state : current state 1 = nomral user logined or quited. current state 2 = technician user logined or quited. Am I rigt?
your states seems the same as me except there is one and only one normal user and one and only one technician, but this machine is compatible with normal user can login to system any time and logout. And technician same
and then probably contradictory with the obscure but normal user does not do it
. The fact there is a dependency between the logged normal user(s) and technician(s) implies there is only one current state
Edit after your remark
The statement is :
A normal way to do that is the machine :
where there is only one current state at a time.
Of course you can also cheat to have a machine having two current states at a time :
but as you can see the fact the technician is logged is managed both by states and a variable, that has no sense and makes that machine artificially complicated for nothing.