ptolemy.domains.fsm.kernel.MultirateFSMDirector director = (ptolemy.domains.fsm.kernel.MultirateFSMDirector) getComponent();
CompositeActor container = (CompositeActor) director.getContainer();
ptolemy.domains.fsm.kernel.FSMActor controller = director
.getController();
ptolemy.codegen.c.actor.TypedCompositeActor containerHelper = (ptolemy.codegen.c.actor.TypedCompositeActor) _getHelper(container);
CodeGeneratorHelper controllerHelper = (CodeGeneratorHelper) _getHelper(controller);
int[] arrayOfFiringsPerGlobalIterationOfContainer = containerHelper
.getFiringsPerGlobalIteration();
int[][] containerRates = containerHelper.getRates();
Iterator states = controller.entityList().iterator();
int configurationNumber = 0;
while (states.hasNext()) {
State state = (State) states.next();
TypedActor[] actors = state.getRefinement();
if (actors != null) {
// There should be at most one refinement for each state.
CodeGeneratorHelper refinementHelper = (CodeGeneratorHelper) _getHelper((NamedObj) actors[0]);
int[][] rates = refinementHelper.getRates();
int length = 1;
if (rates != null) {
// The length of rates represents the number of configurations
// of the refinement.
length = rates.length;