Commit 21dae839 authored by yoogx's avatar yoogx

* Rename package

parent 0da7fda3
package MinePump
package MinePump_BA
public
with Data_Model; -- For data representation (integer, ...)
......@@ -11,7 +11,7 @@ public
properties
Data_Model::Data_Representation => Integer;
end Int;
-- ReadHLS Subprogram
subprogram ReadHLS
features
......@@ -21,7 +21,7 @@ public
Source_Name => "readhls";
Source_Text => ("simu.c");
end ReadHLS;
-- ReadLLS Subprogram
subprogram ReadLLS
features
......@@ -76,15 +76,15 @@ public
variables
HLS, LLS : Int;
waterlvl : Int;
states
states
s : initial complete final state;
transitions
s -[on dispatch]-> s
{
s -[on dispatch]-> s
{
ReadHLS!(HLS);
if (HLS = 1)
waterlvl := 1
else
else
ReadLLS!(LLS);
if (LLs = 0)
waterlvl := 0
......@@ -94,7 +94,7 @@ public
};
**};
end WaterLevelMonitoring;
-- MethaneMonitoring task
thread MethaneMonitoring
......@@ -109,13 +109,13 @@ public
variables
MS : Int;
level : Int;
states
states
s : initial complete final state;
transitions
s -[on dispatch]-> s
s -[on dispatch]-> s
{
ReadMS!(MS);
if (MS > 100)
if (MS > 100)
level := 2
elsif (MS > 70)
level := 1
......@@ -141,16 +141,16 @@ public
variables
niveau_eau, niveau_alarme, alarme : Int;
cmd : Int;
states
s : initial complete final state;
states
s : initial complete final state;
transitions
s -[on dispatch MethaneLevel and WaterLevel]-> s
s -[on dispatch MethaneLevel and WaterLevel]-> s
{
cmd := 0;
niveau_alarme := MethaneLevel;
if (niveau_alarme = 0)
if (niveau_alarme = 0)
alarme := 0
else
else
alarme := 1
end if;
......@@ -158,11 +158,11 @@ public
if (niveau_alarme = 2)
cmd := 0
else
else
niveau_eau := WaterLevel;
if (niveau_eau = 1)
if (niveau_eau = 1)
cmd := 1
elsif (niveau_eau = 0)
elsif (niveau_eau = 0)
cmd := 0
end if
end if;
......@@ -183,10 +183,10 @@ public
annex behavior_specification {**
variables
value : Int;
states
s : initial complete final state;
states
s : initial complete final state;
transitions
s -[on dispatch WaterAlarm]-> s
s -[on dispatch WaterAlarm]-> s
{
value := WaterAlarm;
CmdAlarm!(value)
......@@ -233,4 +233,4 @@ public
Actual_Processor_Binding => (reference (Hardware)) applies to Software;
end MinePump.impl;
end MinePump;
end MinePump_BA;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment