Skip to content

Commit

Permalink
Updated Stateflow driver to use non-deprecated API and pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kolovos committed Nov 18, 2024
1 parent 717efff commit a5a4357
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class StateflowBlock extends SimulinkModelElement {
/** CONSTANTS */

//public static final String STATEFLOW_LIB = "sflib/";
private static final String SIMPLE_TYPE = "?.classhandle.get('Name');";
private static final String SIMPLE_TYPE = "class(?);";
private static final String DELETE_SF = "?.delete;";

/** FIELDS */
Expand Down Expand Up @@ -333,7 +333,7 @@ public Double getHandle() {
public Boolean isCommented() throws EolRuntimeException{
try {
String handle = StateflowUtil.getBlockHandleFromId(((SimulinkModel)model), engine, id);
return (Boolean) engine.evalWithResult("isCommented(?);", handle);
return (Boolean) engine.evalWithResult("?.isCommented;", handle);
}catch (Exception e) {
throw new EolRuntimeException(e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ foundSfChart.println("Found chart" );
var sA = new `Stateflow.State`;
sA.parent = `Stateflow.Chart`.all.first();
sA.path.println;
sA.struct.println;

sA.println(">> CREATED: ");
chart.parent = subsys;
Expand Down

0 comments on commit a5a4357

Please sign in to comment.