mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 12:56:26 +00:00
Fixed the warning and error messages when toggling monte carlo (#1761)
This commit is contained in:
parent
b87598c80c
commit
de1cb6740b
@ -465,9 +465,9 @@ class VariableServerSimObject : public Trick::SimObject {
|
||||
// monte carlo slave sim children, and the monte carlo master.
|
||||
// monte carlo slave parents do not reach initialization.
|
||||
{TRK} P0 ("initialization") trick_ret = vs.init() ;
|
||||
{TRK} ("monte_master_init") trick_ret = vs.init() ;
|
||||
|
||||
#ifndef TRICK_NO_MONTE_CARLO
|
||||
{TRK} ("monte_master_init") trick_ret = vs.init() ;
|
||||
{TRK} P1 ("initialization") monte_carlo_disable_all_apps() ;
|
||||
#endif
|
||||
{TRK} P1 ("initialization") Trick::launch_all_external_applications();
|
||||
|
@ -406,6 +406,7 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
||||
public void getInitializationPacket() {
|
||||
String simRunDir = null;
|
||||
String[] results = null;
|
||||
boolean masterslave_enabled;
|
||||
try {
|
||||
String errMsg = "Error: SimControlApplication:getInitializationPacket()";
|
||||
try {
|
||||
@ -445,6 +446,10 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
||||
|
||||
simState = new SimState();
|
||||
|
||||
commandSimcom.put("trick.var_exists(\"trick_master_slave.master.num_slaves\")");
|
||||
results = commandSimcom.get().split("\t");
|
||||
masterslave_enabled = results[1].equals("1");
|
||||
|
||||
commandSimcom.put("trick.var_set_client_tag(\"SimControl\")\n");
|
||||
commandSimcom.put("trick.var_add(\"trick_sys.sched.sim_start\") \n" +
|
||||
"trick.var_add(\"trick_sys.sched.terminate_time\") \n" +
|
||||
@ -452,9 +457,13 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
||||
"trick.var_add(\"trick_cmd_args.cmd_args.default_dir\") \n" +
|
||||
"trick.var_add(\"trick_cmd_args.cmd_args.cmdline_name\") \n" +
|
||||
"trick.var_add(\"trick_cmd_args.cmd_args.input_file\") \n" +
|
||||
"trick.var_add(\"trick_cmd_args.cmd_args.run_dir\") \n" +
|
||||
"trick.var_add(\"trick_master_slave.master.num_slaves\") \n" +
|
||||
"trick.var_send() \n" +
|
||||
"trick.var_add(\"trick_cmd_args.cmd_args.run_dir\") \n");
|
||||
|
||||
if (masterslave_enabled) {
|
||||
commandSimcom.put("trick.var_add(\"trick_master_slave.master.num_slaves\") \n");
|
||||
}
|
||||
|
||||
commandSimcom.put("trick.var_send() \n" +
|
||||
"trick.var_clear() \n");
|
||||
|
||||
results = commandSimcom.get().split("\t");
|
||||
@ -470,7 +479,7 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
||||
simStopTime = terminateTime/execTimeTicValue - simStartTime;
|
||||
}
|
||||
|
||||
slaveCount = Integer.parseInt(results[8]);
|
||||
slaveCount = masterslave_enabled ? Integer.parseInt(results[8]) : 0;
|
||||
|
||||
simRunDirField = new JTextField[slaveCount+1];
|
||||
overrunField = new JTextField[slaveCount+1];
|
||||
|
Loading…
Reference in New Issue
Block a user