Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpa
libs
pucrio-tecgraf
Commits
1267ddbb
Commit
1267ddbb
authored
Sep 20, 2021
by
Bernardo Quaresma Dias
Browse files
Atualização de ventgas 4_0
INSTMPA-933
parent
2a7e2c6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib-ventgas-4_0.mpad
View file @
1267ddbb
...
...
@@ -4,7 +4,7 @@
-- Arquivo gerado pelo programa MPA
-- Verso: 6.6
-- Arquivo: lib-ventgas.mpad
-- Data:
18
/0
8
/2021 2
1:08:18
-- Data:
20
/0
9
/2021 2
0:10:42
-- =============================================================================
MPA_5_0 = true
...
...
@@ -41,10 +41,10 @@ Diagrams = {
is_ret = nil,
},
{
name = "
zona
risco",
type = "
STRING
",
name = "risc
o_apoi
o",
type = "
BOOLEAN
",
list = false,
value = "
nil
",
value = "
false
",
comment = nil,
is_arg = nil,
is_ret = nil,
...
...
@@ -98,9 +98,9 @@ Diagrams = {
operation = "get",
},
xmin = 3740,
ymin =
50
60,
ymin =
48
60,
xmax = 3940,
ymax =
51
80,
ymax =
49
80,
},
{
type = "Command",
...
...
@@ -116,9 +116,9 @@ Diagrams = {
functionid = "esperar",
},
xmin = 3740,
ymin = 4
8
60,
ymin = 4
6
60,
xmax = 3940,
ymax = 4
9
80,
ymax = 4
7
80,
},
{
type = "Command",
...
...
@@ -129,7 +129,7 @@ Diagrams = {
aftermsg = nil,
expressions = {},
variables = {
"
ret_
zonasvent",
"zonasvent",
},
classid = "mod_ventgas_monZonaVent",
objname = "mon_zonavent",
...
...
@@ -149,7 +149,7 @@ Diagrams = {
beforemsg = nil,
aftermsg = nil,
expressions = {
"{prot_apoio;'prot-apoio';zona
risco;ret_zonasvent
}",
"{prot_apoio;'prot-apoio';zona
svent;risco_apoio
}",
"';'",
},
variables = {
...
...
@@ -234,41 +234,133 @@ Diagrams = {
xmax = 3660,
ymax = 5180,
},
{
type = "Foreach",
description = nil,
action = {
_switch = "LISTITERATION",
variable = "pt_risco_zona",
index = "idx_zona",
list = "l_risco_zona",
listtype = "BOOLEAN_POINT",
},
xmin = 4300,
ymin = 5060,
xmax = 4500,
ymax = 5180,
},
{
type = "Command",
description = "informa\n$results\n[$object]",
description = "avalia\n$variable_1",
action = {
_switch = "EXPRESSION",
beforemsg = nil,
aftermsg = nil,
expressions = {
"string.match(zonasvent,idx_zona) ~= nil",
},
variables = {
"vent_zona",
},
types = {
"BOOLEAN",
},
islist = {
false,
},
},
xmin = 4300,
ymin = 4860,
xmax = 4500,
ymax = 4980,
},
{
type = "Command",
description = "$variable_1\n= $expression_1",
action = {
_switch = "EXPRESSION",
beforemsg = nil,
aftermsg = nil,
expressions = {
"false",
},
variables = {
"risco_apoio",
},
types = {
"BOOLEAN",
},
islist = {
false,
},
},
xmin = 4020,
ymin = 4860,
xmax = 4220,
ymax = 4980,
},
{
type = "Command",
description = "obtm\n$results\n[$object]",
action = {
_switch = "OBJECTCALL",
beforemsg = nil,
aftermsg = nil,
expressions = {},
variables = {
"l_
zonasapoio
",
"l_
risco_zona
",
},
classid = "mod_ventgas_ProtNavioApoio",
objname = "prot_apoio",
member = "
eval_zonas_apoio
",
operation = "
call
",
member = "
l_ind_risco_zona
",
operation = "
get
",
},
xmin =
402
0,
xmin =
346
0,
ymin = 4860,
xmax =
422
0,
xmax =
366
0,
ymax = 4980,
},
{
type = "Foreach",
type = "Command",
description = "obtm\n$results\n[$object]",
action = {
_switch = "OBJECTCALL",
beforemsg = nil,
aftermsg = nil,
expressions = {},
variables = {
"l_navio_zona",
},
classid = "mod_ventgas_ProtNavioApoio",
objname = "prot_apoio",
member = "l_ind_navio_apoio_zona",
operation = "get",
},
xmin = 3460,
ymin = 4660,
xmax = 3660,
ymax = 4780,
},
{
type = "Command",
description = nil,
action = {
_switch = "LISTITERATION",
variable = "zonaapoio",
index = nil,
list = "l_zonasapoio",
listtype = "INTEGER",
_switch = "OBJECTCALL",
beforemsg = nil,
aftermsg = nil,
expressions = {},
variables = {
"navio_zona",
},
classid = "BOOLEAN_POINT",
objname = "l_navio_zona[idx_zona]",
member = "read",
operation = "call",
},
xmin = 4300,
ymin = 4
8
60,
ymin = 4
6
60,
xmax = 4500,
ymax = 4
9
80,
ymax = 4
7
80,
},
{
type = "Command",
...
...
@@ -278,13 +370,13 @@ Diagrams = {
beforemsg = nil,
aftermsg = nil,
expressions = {
"
string.match(ret_zonasvent,zonaapoio)
",
"
vent_zona and navio_zona
",
},
variables = {
"
zona
risco",
"risco
_zona
",
},
types = {
"
STRING
",
"
BOOLEAN
",
},
islist = {
false,
...
...
@@ -297,61 +389,67 @@ Diagrams = {
},
{
type = "Command",
description = "
$variable_1\n= $expression
_1",
description = "
atualiza\n$variable
_1",
action = {
_switch = "EXPRESSION",
beforemsg = nil,
aftermsg = nil,
expressions = {
"
nil
",
"
risco_apoio or risco_zona
",
},
variables = {
"
zona
risco",
"risc
o_apoi
o",
},
types = {
"
STRING
",
"
BOOLEAN
",
},
islist = {
false,
},
},
xmin = 4300,
ymin =
5
060,
ymin =
4
060,
xmax = 4500,
ymax =
5
180,
ymax =
4
180,
},
{
type = "C
hoice
",
description =
nil
,
type = "C
ommand
",
description =
"atualiza\n$variable_1\ne $variable_2"
,
action = {
_switch = "EXPRESSION",
beforemsg = nil,
aftermsg = nil,
expressions = {
"zonarisco\n== nil",
"risco_apoio",
"zonasvent",
},
variables = {
"risco_apoio_ant",
"zonasvent_ant",
},
variables = {},
types = {
"BOOLEAN",
"STRING",
},
islist = {
false,
false,
},
},
xmin =
430
0,
ymin =
46
60,
xmax =
450
0,
ymax =
47
80,
xmin =
374
0,
ymin =
50
60,
xmax =
394
0,
ymax =
51
80,
},
{
type = "Choice",
description =
nil
,
description =
"atualiza\nregistro?"
,
action = {
_switch = "EXPRESSION",
beforemsg = nil,
aftermsg = nil,
expressions = {
"
zonarisco\n~= nil
",
"
(risco_apoio ~= risco_apoio_ant) or\n(zonasvent ~= zonasvent_ant)
",
},
variables = {},
types = {
...
...
@@ -366,6 +464,27 @@ Diagrams = {
xmax = 4780,
ymax = 5180,
},
{
type = "Command",
description = nil,
action = {
_switch = "OBJECTCALL",
beforemsg = nil,
aftermsg = nil,
expressions = {
"risco_zona",
},
variables = {},
classid = "BOOLEAN_POINT",
objname = "pt_risco_zona",
member = "write",
operation = "call",
},
xmin = 4300,
ymin = 4260,
xmax = 4500,
ymax = 4380,
},
},
Links = {
{
...
...
@@ -406,8 +525,8 @@ Diagrams = {
3840,
},
y = {
5120,
4920,
4720,
},
},
{
...
...
@@ -420,7 +539,7 @@ Diagrams = {
4120,
},
y = {
4
9
20,
4
7
20,
5120,
},
},
...
...
@@ -428,7 +547,7 @@ Diagrams = {
type = "Link",
description = nil,
from = 5,
to = 1
1
,
to = 1
3
,
x = {
4120,
4120,
...
...
@@ -456,7 +575,7 @@ Diagrams = {
type = "Link",
description = nil,
from = 2,
to =
3
,
to =
19
,
x = {
3840,
3840,
...
...
@@ -498,35 +617,105 @@ Diagrams = {
type = "Link",
description = nil,
from = 10,
to =
3
,
to =
14
,
x = {
3560,
3
84
0,
3
56
0,
},
y = {
5120,
4920,
},
},
{
type = "Link",
description = "I",
from = 11,
to = 12,
x = {
4400,
4400,
},
y = {
5120,
4920,
},
},
{
type = "Link",
description =
nil
,
description =
"F"
,
from = 11,
to =
14
,
to =
20
,
x = {
4120,
4400,
4680,
},
y = {
5120,
5120,
},
},
{
type = "Link",
description = "V",
from = 20,
to = 6,
x = {
4680,
4680,
},
y = {
5120,
4920,
},
},
{
type = "Link",
description = "F",
from = 20,
to = 8,
x = {
4680,
4940,
},
y = {
5120,
5120,
},
},
{
type = "Link",
description =
"I"
,
from = 1
2
,
description =
nil
,
from = 1
4
,
to = 15,
x = {
3560,
3560,
},
y = {
4920,
4720,
},
},
{
type = "Link",
description = nil,
from = 15,
to = 3,
x = {
3560,
3840,
},
y = {
4720,
4920,
},
},
{
type = "Link",
description = nil,
from = 12,
to = 16,
x = {
4400,
4400,
...
...
@@ -539,22 +728,22 @@ Diagrams = {
{
type = "Link",
description = nil,
from = 1
4
,
to = 1
2
,
from = 1
3
,
to = 1
1
,
x = {
4
40
0,
4
12
0,
4400,
},
y = {
5120,
4920,
5120,
},
},
{
type = "Link",
description =
"V"
,
from = 1
5
,
to = 1
3
,
description =
nil
,
from = 1
6
,
to = 1
7
,
x = {
4400,
4400,
...
...
@@ -566,26 +755,26 @@ Diagrams = {
},
{
type = "Link",
description =
"F"
,
from = 1
2
,
to = 1
6
,
description =
nil
,
from = 1
7
,
to =
2
1,
x = {
4400,
4
68
0,
4
40
0,
},
y = {
4
9
20,
51
20,
4
5
20,
43
20,
},
},
{
type = "Link",
description =
"V"
,
from = 1
6
,
to =
6
,
description =
nil
,
from = 1
9
,
to =
3
,
x = {
468
0,
468
0,
384
0,
384
0,
},
y = {
5120,
...
...
@@ -594,16 +783,16 @@ Diagrams = {
},
{
type = "Link",
description =
"F"
,
from = 1
6
,
to = 8,
description =
nil
,
from =
2
1,
to =
1
8,
x = {
4
68
0,
4
9
40,
4
40
0,
44
0
0,
},
y = {
51
20,
5
120,
43
20,
4
120,
},
},
},
...
...
@@ -639,8 +828,8 @@ Diagrams = {
},
y = {
5220,
4
4
40,
4
4
40,
4
0
40,
4
0
40,
5220,
},
},
...
...
lib-ventgas-4_0.mpam
View file @
1267ddbb
...
...
@@ -1087,31 +1087,18 @@ class{ id = "mod_ventgas_ProtNavioApoio", name = "VentGas: Prot. Navio Apoio", g
de Mon. de Zona de Vent associada.
]],
},
{ id = "l_ind_risco_zona" , name = "Ind. Risco em Zona" , type = "BOOLEAN_POINT[]", access = "g",
description = [[
Lista de indicadores de risco de vent na direção de navio de apoio em zona.
O índice nessa lista deve corresponder aos índices utilizados na configuração
de início e fim de zona na Monitoração de Zona de Vent.
]],
},
{ id = "t_intervalo_s" , name = "Intervalo (s)" , type = "REAL", access = "g",
description = [[Intervalo entre execuções da monitoração.]],
},
},
methods = {
{ id = "eval_zonas_apoio", name = "Avaliar Zonas Navio de Apoio",
description = [[]],
parameters = {
},
results = {
{ name = "Zonas Apoio", type = "INTEGER[]" },
},
code = [===[ function(self)
local zonas_apoio = {}
local inds_navio = getattribute(self, 'l_ind_navio_apoio_zona')
for i, ind_navio in ipairs(inds_navio) do
if ind_navio:read() then
zonas_apoio[#zonas_apoio+1] = i
end
end
return zonas_apoio
end ]===]
},
},
}
lib-ventgas_tst-4_0.mpad
View file @
1267ddbb
...
...
@@ -4,7 +4,7 @@
-- Arquivo gerado pelo programa MPA
-- Verso: 6.6
-- Arquivo: lib-ventgas_tst.mpad
-- Data:
16
/08/2021 1
0:43:08
-- Data:
20
/08/2021 1
5:07:43
-- =============================================================================
MPA_5_0 = true
...
...
@@ -50,7 +50,7 @@ Diagrams = {
action = {
_switch = "LISTITERATION",
variable = "pt_ret_risco",
index =
nil
,
index =
"idx_ret_risco"
,
list = "l_rets_risco",
listtype = "INTEGER_POINT",
},
...
...
@@ -120,13 +120,6 @@ Diagrams = {
xmax = 4760,
ymax = 5780,
},
{
type = "Fork",
description = nil,
x = 4660,
y = 5340,
r = 40,
},
{
type = "Foreach",
description = nil,
...
...
@@ -137,17 +130,17 @@ Diagrams = {
list = "ret_vals",
listtype = "INTEGER",
},
xmin = 4
56
0,
ymin = 5
10
0,
xmax =
476
0,
ymax = 5
22
0,