Skip to content

Commit c658737

Browse files
Felix ExnerFelix Exner
authored andcommitted
Moving script request from InstallationContribution to NodeContribution
This way, the request will not be performed in each program once this URCap is installed.
1 parent 888b2b1 commit c658737

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/fzi/externalcontrol/impl/ExternalControlInstallationNodeContribution.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ public boolean isDefined() {
6565

6666
@Override
6767
public void generateScript(ScriptWriter writer) {
68-
RequestProgram sender = new RequestProgram(getHostIP(), getCustomPort());
69-
urScriptProgram = sender.sendCommand("request_program\n");
68+
7069
}
7170

7271
// IP helper functions
@@ -169,6 +168,8 @@ public void onOk(String value) {
169168
}
170169

171170
public String getUrScriptProgram() {
171+
RequestProgram sender = new RequestProgram(getHostIP(), getCustomPort());
172+
urScriptProgram = sender.sendCommand("request_program\n");
172173
return urScriptProgram;
173174
}
174175
}

0 commit comments

Comments
 (0)