// receives token sent by itself when it
// is also an input port, i.e., when this
// FSMActor is used as a modal controller.
if (((IOPort) destination).isInput()) {
ComponentCodeGenerator containerHelper = _getHelper(((IOPort) destination)
.getContainer().getContainer());
StringBuffer containerReference = new StringBuffer();
containerReference.append("$ref("
+ destination.getName());
if (((IOPort) destination).isMultiport()) {
containerReference.append("#" + channel);
}
containerReference.append(")");
codeBuffer
.append(((CodeGeneratorHelper) containerHelper)
.processCode(containerReference
.toString())
+ " = ");
}
} else { // broadcast
int width = ((IOPort) action
.getDestination(destinationName))
.getWidth();
for (int i = 0; i < width; i++) {
codeBuffer.append("$ref(" + destinationName
+ "#" + i + ") = ");
// During choice action, an output
// port receives token sent by itself
// when it is also an input port,
// i.e., when this FSMActor is used as
// a modal controller.
if (((IOPort) destination).isInput()) {
ComponentCodeGenerator containerHelper = _getHelper(((IOPort) destination)
.getContainer().getContainer());
StringBuffer containerReference = new StringBuffer();
containerReference.append("$ref("
+ destination.getName());