s = getDiscreteStateImpl(obj) returns a
struct s of state values. The field names of the
struct are the object's DiscreteState property
names. To restrict or change the values returned by getDiscreteState method,
you can override this getDiscreteStateImpl method.
getDiscreteStatesImpl is called by the getDiscreteState method,
which is called by the setup method.
You must set Access=protected for this method.