Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support editor HMI blocks in FBME #20

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/ant.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 1 addition & 18 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/ant_antlr.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/ant_launcher.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/libraries/apache_ant_junit.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions .mps/encodings.xml

This file was deleted.

1 change: 1 addition & 0 deletions .mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<modulePath path="$PROJECT_DIR$/samples/smv-debugger/solutions/org.fbme.smvDebugger.sandbox/org.fbme.smvDebugger.sandbox.msd" folder="samples.smv debugger" />
<modulePath path="$PROJECT_DIR$/samples/statistics-plugin/buildsolution/org.fbme.samples.statisticsPlugin.build.msd" folder="samples.statistics plugin" />
<modulePath path="$PROJECT_DIR$/samples/statistics-plugin/solutions/org.fbme.samples.statisticsPlugin/org.fbme.samples.statisticsPlugin.msd" folder="samples.statistics plugin" />
<modulePath path="$PROJECT_DIR$/solutions/WaterTank/WaterTank.msd" folder="samples" />
</projectModules>
</component>
</project>
6 changes: 2 additions & 4 deletions .mps/runConfigurations/MPS_with_IEC_61499.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
<MyState>
<option name="myVmOptions" value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" />
<option name="myJrePath" value="" />
<option name="mySettingsPath" value="$USER_HOME$/Library/Preferences" />
<option name="mySettingsPath" value="$PROJECT_DIR$/../Library/Preferences" />
</MyState>
</myMpsSettings>
<myPluginsSettings>
<MyState>
<option name="myPluginsToDeploy">
<list>
<option value="r:d873dcfc-44fd-449a-83a0-b73f30522ba6(iec61499.build)/7065554940418943295" />
</list>
<list />
</option>
</MyState>
</myPluginsSettings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@
</concept>
</language>
<language id="7866978e-a0f0-4cc7-81bc-4d213d9375e1" name="jetbrains.mps.lang.smodel">
<concept id="1179168000618" name="jetbrains.mps.lang.smodel.structure.Node_GetIndexInParentOperation" flags="nn" index="2bSWHS" />
<concept id="1177026924588" name="jetbrains.mps.lang.smodel.structure.RefConcept_Reference" flags="nn" index="chp4Y">
<reference id="1177026940964" name="conceptDeclaration" index="cht4Q" />
</concept>
Expand All @@ -487,6 +488,7 @@
<concept id="1145404486709" name="jetbrains.mps.lang.smodel.structure.SemanticDowncastExpression" flags="nn" index="2JrnkZ">
<child id="1145404616321" name="leftExpression" index="2JrQYb" />
</concept>
<concept id="1171310072040" name="jetbrains.mps.lang.smodel.structure.Node_GetContainingRootOperation" flags="nn" index="2Rxl7S" />
<concept id="2644386474300074836" name="jetbrains.mps.lang.smodel.structure.ConceptIdRefExpression" flags="nn" index="35c_gC">
<reference id="2644386474300074837" name="conceptDeclaration" index="35c_gD" />
</concept>
Expand Down Expand Up @@ -3052,6 +3054,17 @@
</node>
</node>
</node>
<node concept="3clFbF" id="6wjDFs17gjt" role="3cqZAp">
<node concept="2OqwBi" id="6wjDFs18bsu" role="3clFbG">
<node concept="2OqwBi" id="6wjDFs184KQ" role="2Oq$k0">
<node concept="37vLTw" id="6wjDFs17gjr" role="2Oq$k0">
<ref role="3cqZAo" node="5HzRr7EKTG3" resolve="fb" />
</node>
<node concept="2Rxl7S" id="6wjDFs188eD" role="2OqNvi" />
</node>
<node concept="2bSWHS" id="6wjDFs18f3d" role="2OqNvi" />
</node>
</node>
<node concept="3cpWs8" id="5HzRr7EKXYd" role="3cqZAp">
<node concept="3cpWsn" id="5HzRr7EKXYe" role="3cpWs9">
<property role="TrG5h" value="resource" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<FBType Name="JSON_DESERIALIZER" Comment="Composite FB wrapping other FBs">
<Identification Standard="61499-2">
</Identification>
<VersionInfo Version="1.0" Author="valentinnodan" Date="2023-04-20">
</VersionInfo>
<InterfaceList>
<EventInputs>
<Event Name="REQ" Type="Event" Comment="Normal Execution Request">
<With Var="DATA"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Name="RES" Type="Event" Comment="Execution Confirmation">
<With Var="BOOL_VALUE"/>
<With Var="INT_VALUE"/>
<With Var="STRING_VALUE"/>
<With Var="REAL_VALUE"/>
<With Var="LREAL_VALUE"/>
<With Var="NAME"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="DATA" Type="STRING" Comment="Input event qualifier"/>
</InputVars>
<OutputVars>
<VarDeclaration Name="NAME" Type="STRING" Comment=""/>
<VarDeclaration Name="BOOL_VALUE" Type="BOOL" Comment="Output event qualifier"/>
<VarDeclaration Name="INT_VALUE" Type="INT" Comment=""/>
<VarDeclaration Name="STRING_VALUE" Type="STRING" Comment=""/>
<VarDeclaration Name="REAL_VALUE" Type="REAL" Comment=""/>
<VarDeclaration Name="LREAL_VALUE" Type="LREAL" Comment=""/>
</OutputVars>
</InterfaceList>
<FBNetwork>
<FB Name="TYPE_DETECTOR" Type="TYPE_DETECTOR" Comment="" x="1529.4117647058822" y="-235.2941176470588">
</FB>
<FB Name="JSON_PARSER" Type="JSON_PARSER" Comment="" x="470.5882352941176" y="-1058.8235294117646">
</FB>
<FB Name="F_STRING_TO_BOOL" Type="F_STRING_TO_BOOL" Comment="" x="3764.705882352941" y="-588.2352941176471">
</FB>
<FB Name="F_STRING_TO_INT" Type="F_STRING_TO_INT" Comment="" x="3764.705882352941" y="0.0">
</FB>
<FB Name="F_STRING_TO_REAL" Type="F_STRING_TO_REAL" Comment="" x="3764.705882352941" y="588.2352941176471">
</FB>
<FB Name="F_STRING_TO_LREAL" Type="F_STRING_TO_LREAL" Comment="" x="3764.705882352941" y="1176.4705882352941">
</FB>
<EventConnections>
<Connection Source="REQ" Destination="JSON_PARSER.REQ" Comment="" dx1="294.11764705882354"/>
<Connection Source="JSON_PARSER.RES" Destination="TYPE_DETECTOR.REQ" Comment="" dx1="129.41176470588235"/>
<Connection Source="TYPE_DETECTOR.IS_BOOL" Destination="F_STRING_TO_BOOL.REQ" Comment="" dx1="670.5882352941176"/>
<Connection Source="F_STRING_TO_BOOL.CNF" Destination="RES" Comment="" dx1="241.17647058823528"/>
<Connection Source="TYPE_DETECTOR.IS_INT" Destination="F_STRING_TO_INT.REQ" Comment="" dx1="494.1176470588235"/>
<Connection Source="TYPE_DETECTOR.IS_REAL" Destination="F_STRING_TO_REAL.REQ" Comment="" dx1="670.5882352941176"/>
<Connection Source="TYPE_DETECTOR.IS_LREAL" Destination="F_STRING_TO_LREAL.REQ" Comment="" dx1="670.5882352941176"/>
<Connection Source="F_STRING_TO_INT.CNF" Destination="RES" Comment="" dx1="558.8235294117646"/>
<Connection Source="F_STRING_TO_REAL.CNF" Destination="RES" Comment="" dx1="535.2941176470588"/>
<Connection Source="F_STRING_TO_LREAL.CNF" Destination="RES" Comment="" dx1="511.7647058823529"/>
<Connection Source="TYPE_DETECTOR.IS_STRING" Destination="RES" Comment="" dx1="1723.5294117647059"/>
</EventConnections>
<DataConnections>
<Connection Source="DATA" Destination="JSON_PARSER.DATA" Comment="" dx1="294.11764705882354"/>
<Connection Source="JSON_PARSER.TYPE" Destination="TYPE_DETECTOR.TYPE_NAME" Comment="" dx1="129.41176470588235"/>
<Connection Source="JSON_PARSER.VALUE" Destination="F_STRING_TO_BOOL.IN" Comment="" dx1="1270.5882352941176"/>
<Connection Source="JSON_PARSER.VALUE" Destination="F_STRING_TO_INT.IN" Comment="" dx1="1558.8235294117646"/>
<Connection Source="F_STRING_TO_BOOL.OUT" Destination="BOOL_VALUE" Comment="" dx1="241.17647058823528"/>
<Connection Source="JSON_PARSER.NAME" Destination="NAME" Comment="" dx1="1652.941176470588"/>
<Connection Source="JSON_PARSER.VALUE" Destination="F_STRING_TO_REAL.IN" Comment="" dx1="1247.0588235294117"/>
<Connection Source="JSON_PARSER.VALUE" Destination="F_STRING_TO_LREAL.IN" Comment="" dx1="1247.0588235294117"/>
<Connection Source="F_STRING_TO_INT.OUT" Destination="INT_VALUE" Comment="" dx1="558.8235294117646"/>
<Connection Source="F_STRING_TO_REAL.OUT" Destination="REAL_VALUE" Comment="" dx1="535.2941176470588"/>
<Connection Source="F_STRING_TO_LREAL.OUT" Destination="LREAL_VALUE" Comment="" dx1="511.7647058823529"/>
<Connection Source="JSON_PARSER.VALUE" Destination="STRING_VALUE" Comment="" dx1="2300.0"/>
</DataConnections>
</FBNetwork>
</FBType>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<FBType Name="JSON_FORMER" Comment="Basic FB with empty ECC">
<Identification Standard="61499-2">
</Identification>
<VersionInfo Version="1.0" Author="valentinnodan" Date="2023-04-20">
</VersionInfo>
<InterfaceList>
<EventInputs>
<Event Name="REQ" Type="Event" Comment="">
<With Var="NAME"/>
<With Var="TYPE"/>
<With Var="VALUE"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Name="RES" Type="Event" Comment="">
<With Var="DATA_MSG"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="NAME" Type="STRING" Comment=""/>
<VarDeclaration Name="TYPE" Type="STRING" Comment=""/>
<VarDeclaration Name="VALUE" Type="STRING" Comment=""/>
</InputVars>
<OutputVars>
<VarDeclaration Name="DATA_MSG" Type="STRING" Comment=""/>
</OutputVars>
</InterfaceList>
<BasicFB>
<ECC>
<ECState Name="START" Comment="Initial State" x="547.0588235294117" y="423.52941176470586">
</ECState>
<ECState Name="FORM_MSG" Comment="" x="2470.5882352941176" y="588.2352941176471">
<ECAction Algorithm="formMessage" Output="RES"/>
</ECState>
<ECTransition Source="START" Destination="FORM_MSG" Condition="REQ" Comment="" x="1658.8235294117646" y="770.5882352941176"/>
<ECTransition Source="FORM_MSG" Destination="START" Condition="1" Comment="" x="1623.5294117647059" y="488.235294117647"/>
</ECC>
<Algorithm Name="formMessage" Comment="">
<ST><![CDATA[VAR
openBrace: STRING;
closeBrace: STRING;
quote: STRING;
splitter: STRING;
separator: STRING;
nameMsg:STRING;
typeMsg: STRING;
valueMsg: STRING;
valueName: STRING;
nameName: STRING;
typeName: STRING;
END_VAR;
quote := '"';
openBrace := '{';
closeBrace := '}';
splitter:= ':';
separator:=',';
nameName:='NAME';
typeName:='TYPE';
valueName:='VALUE';
nameMsg:=CONCAT(quote, nameName, quote, splitter, quote, NAME, quote);
typeMsg:=CONCAT(quote, typeName, quote, splitter, quote, TYPE, quote);
valueMsg:=CONCAT(quote, valueName, quote, splitter, quote, VALUE, quote);
DATA_MSG:=CONCAT(CONCAT(openBrace, CONCAT(nameMsg, separator)), CONCAT(CONCAT(typeMsg, separator), CONCAT(valueMsg, closeBrace)));]]></ST>
</Algorithm>
</BasicFB>
</FBType>
Loading