Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
97cdbf82
Commit
97cdbf82
authored
Dec 05, 2015
by
Maxime Perrotin
Browse files
Fix name in helper
parent
c8badabd
Changes
3
Hide whitespace changes
Inline
Side-by-side
opengeode/Helper.py
View file @
97cdbf82
...
@@ -207,7 +207,7 @@ def flatten(process, sep=u'_'):
...
@@ -207,7 +207,7 @@ def flatten(process, sep=u'_'):
for
each
in
state
.
cs_mapping
.
viewvalues
():
for
each
in
state
.
cs_mapping
.
viewvalues
():
# Update transition indices of continuous signals
# Update transition indices of continuous signals
# XXX shouldn't we do it also for CONNECT parts?
# XXX shouldn't we do it also for CONNECT parts?
values
.
extend
(
value
)
values
.
extend
(
each
)
for
inp
in
set
(
values
):
for
inp
in
set
(
values
):
# values may contain duplicate entries if an input corresponds
# values may contain duplicate entries if an input corresponds
...
...
tests/regression/test-provided2/dataview-uniq.asn
View file @
97cdbf82
TASTE-Dataview DEFINITIONS ::=
TASTE-Dataview DEFINITIONS ::=
BEGIN
BEGIN
T-Uint32 ::= INTEGER (0..100000000)
TC-Type ::= SEQUENCE {
TC-Type ::= SEQUENCE {
apid INTEGER (0..100),
apid INTEGER (0..100),
content CHOICE {
content CHOICE {
...
...
tests/regression/test-provided2/og.pr
View file @
97cdbf82
...
@@ -18,38 +18,38 @@ signal telemetry(tm_type);
...
@@ -18,38 +18,38 @@ signal telemetry(tm_type);
PROCESS og;
PROCESS og;
STATE AGGREGATION wait;
STATE AGGREGATION wait;
SUBSTRUCTURE
SUBSTRUCTURE
STATE
generic_tc
_handler
_1
;
STATE
exception
_handler;
SUBSTRUCTURE
SUBSTRUCTURE
/* CIF TEXT (131, 91), (323, 140) */
/* CIF START (264, 78), (70, 35) */
-- Model a generic TC handler. The content of this
-- state can be copied several times, to manage
-- several TC in parallel.
/* CIF ENDTEXT */
/* CIF START (490, 84), (70, 35) */
START;
START;
/* CIF NEXTSTATE (
472
, 1
34
), (106, 35) */
/* CIF NEXTSTATE (
246
, 1
28
), (106, 35) */
NEXTSTATE wait_for_tc;
NEXTSTATE wait_for_tc;
/* CIF STATE (
472
, 1
34
), (106, 35) */
/* CIF STATE (
246
, 1
28
), (106, 35) */
STATE wait_for_tc;
STATE wait_for_tc;
/* CIF PROVIDED (
485
, 18
9
), (
7
9, 3
5
) */
/* CIF PROVIDED (
252
, 18
3
), (9
3
, 3
8
) */
PROVIDED got_tc;
PROVIDED got_tc;
/* CIF TASK (462, 239), (126, 35) */
/* CIF PROCEDURECALL (117, 236), (363, 35) */
TASK got_tc := false;
CALL writeln('ERROR, all TC handlers are busy - discarding');
/* CIF PROCEDURECALL (428, 289), (194, 35) */
/* CIF TASK (225, 286), (147, 35) */
CALL writeln('Processing TC 1');
TASK failure := true;
/* CIF PROCEDURECALL (433, 339), (184, 35) */
/* CIF NEXTSTATE (263, 336), (70, 35) */
CALL set_timer(5000, timer1);
NEXTSTATE -;
/* CIF NEXTSTATE (462, 389), (126, 35) */
NEXTSTATE Processing_TC;
ENDSTATE;
ENDSTATE;
/* CIF STATE (667, 182), (123, 35) */
ENDSUBSTRUCTURE;
STATE Processing_tc;
STATE tc_router;
/* CIF INPUT (689, 237), (78, 35) */
SUBSTRUCTURE
INPUT timer1;
/* CIF START (144, 56), (70, 35) */
/* CIF PROCEDURECALL (632, 287), (193, 35) */
START;
CALL writeln('TC1 completed');
/* CIF NEXTSTATE (116, 106), (126, 35) */
/* CIF NEXTSTATE (675, 337), (106, 35) */
NEXTSTATE wait_for_tc;
NEXTSTATE wait_for_tc;
/* CIF STATE (116, 106), (126, 35) */
STATE wait_for_tc;
/* CIF INPUT (93, 161), (175, 35) */
INPUT telecommand(tc);
/* CIF TASK (107, 211), (146, 35) */
TASK got_tc := true;
/* CIF NEXTSTATE (145, 261), (70, 35) */
NEXTSTATE -;
ENDSTATE;
ENDSTATE;
ENDSUBSTRUCTURE;
ENDSUBSTRUCTURE;
STATE generic_tc_handler_2;
STATE generic_tc_handler_2;
...
@@ -67,71 +67,70 @@ signal telemetry(tm_type);
...
@@ -67,71 +67,70 @@ signal telemetry(tm_type);
STATE Processing_tc;
STATE Processing_tc;
/* CIF INPUT (850, 219), (85, 35) */
/* CIF INPUT (850, 219), (85, 35) */
INPUT timer2;
INPUT timer2;
/* CIF PROCEDURECALL (79
3
, 269), (200, 35) */
/* CIF PROCEDURECALL (79
2
, 269), (200, 35) */
CALL writeln('TC2 completed');
CALL writeln('TC2 completed');
/* CIF NEXTSTATE (8
40
, 319), (106, 35) */
/* CIF NEXTSTATE (8
39
, 319), (106, 35) */
NEXTSTATE wait_for_tc;
NEXTSTATE wait_for_tc;
ENDSTATE;
ENDSTATE;
/* CIF STATE (494, 134), (106, 35) */
/* CIF STATE (494, 134), (106, 35) */
STATE wait_for_tc;
STATE wait_for_tc;
/* CIF PROVIDED (507, 189), (79, 35) */
/* CIF PROVIDED (507, 189), (79, 35) */
PROVIDED got_tc;
PROVIDED got_tc;
/* CIF TASK (48
4
, 239), (126, 35) */
/* CIF TASK (48
3
, 239), (126, 35) */
TASK got_tc := false;
TASK got_tc := false;
/* CIF PROCEDURECALL (446, 289), (201, 35) */
/* CIF PROCEDURECALL (446, 289), (201, 35) */
CALL writeln('Processing TC 2');
CALL writeln('Processing TC 2');
/* CIF PROCEDURECALL (45
5
, 339), (184, 35) */
/* CIF PROCEDURECALL (45
4
, 339), (184, 35) */
CALL set_timer(5000, timer2);
CALL set_timer(5000, timer2);
/* CIF NEXTSTATE (48
4
, 389), (126, 35) */
/* CIF NEXTSTATE (48
3
, 389), (126, 35) */
NEXTSTATE Processing_TC;
NEXTSTATE Processing_TC;
ENDSTATE;
ENDSTATE;
ENDSUBSTRUCTURE;
ENDSUBSTRUCTURE;
STATE
tc_router
;
STATE
generic_tc_handler_1
;
SUBSTRUCTURE
SUBSTRUCTURE
/* CIF START (144, 56), (70, 35) */
/* CIF TEXT (131, 91), (323, 140) */
-- Model a generic TC handler. The content of this
-- state can be copied several times, to manage
-- several TC in parallel.
/* CIF ENDTEXT */
/* CIF START (490, 84), (70, 35) */
START;
START;
/* CIF NEXTSTATE (
116
, 1
06
), (1
2
6, 35) */
/* CIF NEXTSTATE (
472
, 1
34
), (1
0
6, 35) */
NEXTSTATE wait_for_tc;
NEXTSTATE wait_for_tc;
/* CIF STATE (
116
, 1
06
), (12
6
, 35) */
/* CIF STATE (
667
, 1
82
), (12
3
, 35) */
STATE
wait_for
_tc;
STATE
Processing
_tc;
/* CIF INPUT (
93, 161
), (
175
, 35) */
/* CIF INPUT (
689, 237
), (
78
, 35) */
INPUT t
elecommand(tc)
;
INPUT t
imer1
;
/* CIF
TASK (107
, 2
11
), (1
46
, 35) */
/* CIF
PROCEDURECALL (631
, 2
87
), (1
93
, 35) */
TASK got_tc := true
;
CALL writeln('TC1 completed')
;
/* CIF NEXTSTATE (
14
5,
261
), (
70
, 35) */
/* CIF NEXTSTATE (
67
5,
337
), (
106
, 35) */
NEXTSTATE
-
;
NEXTSTATE
wait_for_tc
;
ENDSTATE;
ENDSTATE;
ENDSUBSTRUCTURE;
/* CIF STATE (472, 134), (106, 35) */
STATE exception_handler;
SUBSTRUCTURE
/* CIF START (264, 78), (70, 35) */
START;
/* CIF NEXTSTATE (246, 128), (106, 35) */
NEXTSTATE wait_for_tc;
/* CIF STATE (246, 128), (106, 35) */
STATE wait_for_tc;
STATE wait_for_tc;
/* CIF PROVIDED (
252
, 18
3
), (9
3
, 3
8
) */
/* CIF PROVIDED (
485
, 18
9
), (
7
9, 3
5
) */
PROVIDED got_tc;
PROVIDED got_tc;
priority 2;
/* CIF TASK (461, 239), (126, 35) */
/* CIF PROCEDURECALL (117, 236), (363, 35) */
TASK got_tc := false;
CALL writeln('ERROR, all TC handlers are busy - discarding');
/* CIF PROCEDURECALL (427, 289), (194, 35) */
/* CIF TASK (225, 286), (147, 35) */
CALL writeln('Processing TC 1');
TASK exception := true;
/* CIF PROCEDURECALL (432, 339), (184, 35) */
/* CIF NEXTSTATE (264, 336), (70, 35) */
CALL set_timer(5000, timer1);
NEXTSTATE -;
/* CIF NEXTSTATE (461, 389), (126, 35) */
NEXTSTATE Processing_TC;
ENDSTATE;
ENDSTATE;
ENDSUBSTRUCTURE;
ENDSUBSTRUCTURE;
/* CIF STATE (443, 507), (153, 35) */
/* CIF STATE (370, 168), (182, 35) */
STATE exception_handler;
STATE generic_tc_handler_1;
ENDSTATE;
/* CIF STATE (476, 0), (113, 35) */
STATE tc_router;
ENDSTATE;
ENDSTATE;
/* CIF STATE (381, 338), (169, 35) */
/* CIF STATE (381, 338), (169, 35) */
STATE generic_tc_handler_2;
STATE generic_tc_handler_2;
ENDSTATE;
ENDSTATE;
/* CIF STATE (370, 168), (182, 35) */
/* CIF STATE (476, 0), (113, 35) */
STATE generic_tc_handler_1;
STATE tc_router;
ENDSTATE;
/* CIF STATE (443, 507), (153, 35) */
STATE exception_handler;
ENDSTATE;
ENDSTATE;
ENDSUBSTRUCTURE;
ENDSUBSTRUCTURE;
/* CIF TEXT (0, 310), (327, 208) */
/* CIF TEXT (0, 310), (327, 208) */
...
@@ -144,7 +143,7 @@ dcl tm TM_type;
...
@@ -144,7 +143,7 @@ dcl tm TM_type;
dcl got_tc Boolean_type;
dcl got_tc Boolean_type;
dcl
exception
boolean_Type := false;
dcl
failure
boolean_Type := false;
timer timer1, timer2;
timer timer1, timer2;
/* CIF ENDTEXT */
/* CIF ENDTEXT */
...
@@ -152,18 +151,18 @@ timer timer1, timer2;
...
@@ -152,18 +151,18 @@ timer timer1, timer2;
START;
START;
/* CIF NEXTSTATE (354, 348), (63, 35) */
/* CIF NEXTSTATE (354, 348), (63, 35) */
NEXTSTATE wait;
NEXTSTATE wait;
/* CIF STATE (347, 583), (70, 35) */
STATE safe;
ENDSTATE;
/* CIF STATE (485, 344), (99, 35) */
/* CIF STATE (485, 344), (99, 35) */
STATE wait;
STATE wait;
/* CIF PROVIDED (4
81
, 399), (
106
, 35) */
/* CIF PROVIDED (4
95
, 399), (
77
, 35) */
PROVIDED
exception
;
PROVIDED
failure
;
/* CIF PROCEDURECALL (402, 449), (264, 35) */
/* CIF PROCEDURECALL (402, 449), (264, 35) */
CALL writeln('Going to SAFE mode');
CALL writeln('Going to SAFE mode');
/* CIF NEXTSTATE (499, 499), (70, 35) */
/* CIF NEXTSTATE (499, 499), (70, 35) */
NEXTSTATE safe;
NEXTSTATE safe;
ENDSTATE;
ENDSTATE;
/* CIF STATE (347, 583), (70, 35) */
STATE safe;
ENDSTATE;
ENDPROCESS og;
ENDPROCESS og;
ENDBLOCK;
ENDBLOCK;
ENDSYSTEM;
ENDSYSTEM;
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment