Skip to content
Snippets Groups Projects
Commit 6cf759c1 authored by Martin Eisenmann's avatar Martin Eisenmann
Browse files

YELLOW


Signed-off-by: default avatarEisenmann <eisenmann@fortiss.org>
parent 4895dabe
Branches preinstalled-libs
No related tags found
No related merge requests found
......@@ -2,7 +2,8 @@ CanBusGeneratorExtension.java 4bed3c88e71923515d7d9dc9235bc40a49ce237f YELLOW
CanConnectorGeneratorExtension.java 900c836414d63ccf2cba904b396e4d5b2efe51a5 YELLOW
CanTransmissionCatalog.java f678cb0f16d4ba46a0f5ae5dd35b569c1211f499 YELLOW
ConsoleOutputGeneratorExtension.java 1246aa81a2865a798207f13e66bfeebc8fbf0cb8 YELLOW
MultiUnitMainGenerator.java 9b07ae320e31b7de7be9dfc9c6f6e9b8e6084738 RED
MainGenerator.java f241e63e8ebb6a3ecc955fe503369dde1d4b89c3 YELLOW
MultiUnitMainGenerator.java 7bd01a961598265014a39b44030e0fd7dfadcc1e RED
PWMActuatorGeneratorExtension.java a4925aac8b6b7d650ef60fca32b18bba894c3b03 YELLOW
RaspberryPIGeneratorExtension.java 690bf97a0fbc064e685a65af664c2d64811cf2f0 YELLOW
SingleUnitMainGenerator.java b7c0a59b508d993ad22473d01fd78143c168d280 YELLOW
RaspberryPIGeneratorExtension.java e47fb8e892354505fce0e388fd362d789f686fb6 YELLOW
SingleUnitMainGenerator.java 772c368ade02ebc703a8fc8f329b6748bcce72be YELLOW
......@@ -45,10 +45,10 @@ import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.tooling.kernel.model.INamedElement;
/**
*
* @author eisenmann
* Class containing the code-generation of the main.c file that is shared between single- and
* multi-unit deployment.
*/
public class MainGenerator {
public abstract class MainGenerator {
/** The current execution unit. */
protected RaspberryPi executionUnit;
......
......@@ -93,7 +93,8 @@ class SingleUnitMainGenerator extends MainGenerator {
}
// Phase 3: call logical component step functions
for(Pair<ExecutionUnit, Component> p : deployedComponents) {
sb.append(makeCall("perform_step", p.getSecond()));
Component c = p.getSecond();
sb.append("perform_step_" + c.getName() + "_ID_" + c.getId() + "();\n");
}
// Phase 4: call all code from writable instances
for(Pair<PlatformConnectorUnit, Port> p : deployedPorts) {
......@@ -119,12 +120,4 @@ class SingleUnitMainGenerator extends MainGenerator {
// return result
return sb.toString();
}
/** Creates the function call code. */
private String makeCall(String function, Component c) {
StringBuilder sb = new StringBuilder();
sb.append(function).append('_').append(c.getName());
sb.append("_ID_").append(c.getId()).append("();\n");
return sb.toString();
}
}
RasPiCTemplates.java 639a149f0cf6591f0fda33e2f40d27303061ee3e YELLOW
RasPiCTemplates.java 843dc9fb546902cef84910e2c3b23975095e405d YELLOW
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment