public int rootState_dispatchEvent(short id) {
            int res = RiJStateReactive.TAKE_EVENT_NOT_CONSUMED;
            switch (rootState_active) {
                case EmergencyStopped:
                {
                    res = EmergencyStopped_takeEvent(id);
                }
                break;
                case EmergencyMoving:
                {
                    res = EmergencyMoving_takeEvent(id);
                }
                break;
                case EmergencyBaseLevel:
                {
                    res = EmergencyBaseLevel_takeEvent(id);
                }
                break;
                case Stopped:
                {
                    res = Stopped_takeEvent(id);
                }
                break;
                case waitingForRequest:
                {
                    res = waitingForRequest_takeEvent(id);
                }
                break;
                case Finished:
                {
                    res = Finished_takeEvent(id);
                }
                break;
                case Moving:
                {
                    res = Moving_takeEvent(id);
                }
                break;
                default:
                    break;
            }
            return res;
        }