State Machine

Hi All

Other than the default state machine provided in tango which is accessed through pogo, Are there any other state machine available which is compatible with tango ? If yes, please share the link from where I can download ?
Any help will be appreciated.

Thanks and Regards
TCS-GMRT Team
Regards,
TCS_GMRT
Edited 8 years ago
There isn't other "state machine compatible with Tango".

You have to do with it's current 14 states, you can't add others states or change the way it works.

If it isn't enough for you, just add an attribute which will be your "own" state machine.
You can change the way it works if you edit the code. smile
For instance, in C++, Pogo will generate a file named XXXStateMachine.cpp.
There are protected regions in this file, so you can add some code where you can add special cases where a given command or attribute read or write would not be allowed for instance.
About the states, I would support what Sebastien just wrote. You can always find a way to add more states by adding new attributes but in general, the recommended way is to stick with the Tango official states.
But we know there are special cases where this night not be enough nor convenient.
We can imagine that one could implement more complex state machines where state transitions are defined with entry/transition and exit actions and are triggered on events.
What is provided in Tango keeps it simple and fits the majority of the use cases.
You can change the state simply by calling set_state() method but you have to code what needs to be done during the state transition if needed.
As it is, there is no support for substates or hierarchical state machines but nothing prevents you from coding it or reusing a state machine implementation if this is not good enough for your use case.

Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Reynald
You can change the way it works if you edit the code.
For instance, in C++, Pogo will generate a file named XXXStateMachine.cpp.
There are protected regions in this file, so you can add some code where you can add special cases where a given command or attribute read or write would not be allowed for instance.

Yes you are right. I was only thinking about "add new states" part of the question.
 
Register or login to create to post a reply.