statecharts icon indicating copy to clipboard operation
statecharts copied to clipboard

Get current state array

Open danlapid opened this issue 8 years ago • 4 comments

I'd like to be able to get an array of current states, maybe only in non-orthogonal state machines even. I'd like the stateConfVector to be public or have get/set and I think that's a feature many people would have use for, having to make a lot of if/elses for a function that will then run through a big switch/case sounds like a bad thing to have in an embedded system..

danlapid avatar Dec 14 '15 19:12 danlapid

Maybe we can add a generator feature for a read only access to the current state configuration vector

andreasmuelder avatar Dec 27 '15 10:12 andreasmuelder

@danlapid : What code generator do you use? For C you can access by handle->stateConfVector.

We will add public readonly access for Java and C++.

terfloth avatar Jan 06 '16 12:01 terfloth

+1 vote on this feature.

benedekh avatar Jan 20 '16 10:01 benedekh

Hi,

+1 on this feature. We are currently writing a switch case from "isStateActive()" which is very weird. We agree that introspection is bad for operational code, nevertheless we like to log every state transition of our high level machines.

wixiw avatar Aug 14 '20 08:08 wixiw