Commit 713a6dee authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add script to demonstrate shared lib in combination with the GUI

parent 139b234d
......@@ -2,7 +2,7 @@
 
# Resource object code
#
# Created: Sun Oct 26 11:45:10 2014
# Created: Mon Nov 17 20:10:38 2014
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-11-11 10:36:42
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-11-17 20:10:40
import sys
from antlr3 import *
......
This diff is collapsed.
......@@ -23,6 +23,9 @@ dcl choice Mychoice;
dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
/* CIF ENDTEXT */
/* CIF PROCEDURE (1273, 175), (106, 35) */
PROCEDURE emptyproc;
ENDPROCEDURE;
/* CIF PROCEDURE (1306, 371), (91, 35) */
PROCEDURE numProc;
/* CIF START (161, 82), (70, 35) */
......@@ -34,15 +37,12 @@ dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
ENDDECISION;
/* CIF DECISION (135, 240), (122, 50) */
DECISION num(myenum);
/* CIF ANSWER (163, 250), (70, 23) */
/* CIF ANSWER (163, 235), (70, 23) */
else:
ENDDECISION;
/* CIF RETURN (178, 288), (35, 35) */
/* CIF RETURN (178, 273), (35, 35) */
RETURN ;
ENDPROCEDURE;
/* CIF PROCEDURE (1273, 175), (106, 35) */
PROCEDURE emptyproc;
ENDPROCEDURE;
/* CIF START (596, 224), (80, 36) */
START;
/* CIF TASK (564, 275), (144, 35) */
......@@ -58,106 +58,108 @@ dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
ENDDECISION;
/* CIF DECISION (575, 433), (122, 50) */
DECISION num(myenum);
/* CIF ANSWER (547, 488), (70, 23) */
/* CIF ANSWER (547, 473), (70, 23) */
(0):
/* CIF ANSWER (644, 488), (70, 23) */
/* CIF ANSWER (644, 473), (70, 23) */
else:
ENDDECISION;
/* CIF DECISION (586, 526), (99, 50) */
/* CIF DECISION (586, 511), (99, 50) */
DECISION 'informal'
/* CIF COMMENT (716, 506), (179, 53) */
/* CIF COMMENT (716, 476), (179, 53) */
COMMENT 'Informal decision -
check that it is ignored
by the code generator';
/* CIF ANSWER (543, 581), (70, 33) */
/* CIF ANSWER (543, 551), (70, 33) */
('a'):
/* CIF ANSWER (647, 581), (70, 33) */
/* CIF ANSWER (647, 551), (70, 33) */
('2'):
ENDDECISION;
/* CIF TASK (524, 629), (223, 38) */
/* CIF TASK (524, 599), (223, 38) */
TASK seqboolean := {true, false},
seqboolean := not {true, false};
/* CIF TASK (532, 682), (208, 83) */
/* CIF TASK (532, 652), (208, 83) */
TASK for x in seqen:
call writeln(num(x));
call writeln(num(myenum));
call writeln(num(myenum));
endfor
/* CIF COMMENT (760, 706), (174, 38) */
/* CIF COMMENT (760, 676), (174, 38) */
COMMENT 'Check that num is not
declared twice';
/* CIF TASK (554, 780), (164, 53) */
/* CIF TASK (554, 750), (164, 53) */
TASK for x in seqen2:
call writeln(num(x));
endfor;
/* CIF TASK (555, 848), (162, 53) */
/* CIF TASK (555, 818), (162, 53) */
TASK for x in seqboolean:
call writeln(x);
endfor
/* CIF COMMENT (737, 857), (168, 38) */
/* CIF COMMENT (737, 827), (168, 38) */
COMMENT 'FOR with a basic type';
/* CIF TASK (525, 916), (222, 35) */
/* CIF TASK (525, 886), (222, 35) */
TASK seqboolean := not seqboolean
/* CIF COMMENT (767, 916), (279, 35) */
/* CIF COMMENT (767, 886), (279, 35) */
COMMENT 'check NOT on a SEQUENCE of BOOLEAN';
/* CIF TASK (555, 966), (162, 53) */
/* CIF TASK (555, 936), (162, 53) */
TASK for x in seqboolean:
call writeln(x);
endfor;
/* CIF TASK (573, 1034), (126, 38) */
/* CIF TASK (573, 1004), (126, 38) */
TASK fixed := 'hello';
/* CIF TASK (561, 1087), (149, 35) */
/* CIF TASK (561, 1057), (149, 35) */
TASK variable := 'HELLO';
/* CIF PROCEDURECALL (548, 1137), (176, 35) */
/* CIF PROCEDURECALL (548, 1107), (176, 35) */
CALL writeln(variable // '!!!');
/* CIF PROCEDURECALL (500, 1187), (272, 35) */
/* CIF PROCEDURECALL (500, 1157), (272, 35) */
CALL writeln(variable // variable // variable);
/* CIF TASK (590, 1237), (91, 35) */
/* CIF TASK (590, 1207), (91, 35) */
TASK seq := {1};
/* CIF TASK (559, 1287), (153, 35) */
/* CIF TASK (559, 1257), (153, 35) */
TASK seq := {1} // {2} // {3};
/* CIF TASK (550, 1337), (172, 35) */
/* CIF TASK (550, 1307), (172, 35) */
TASK seq := seq // {2} // {1};
/* CIF DECISION (601, 1387), (70, 50) */
/* CIF DECISION (601, 1357), (70, 50) */
DECISION any;
/* CIF ANSWER (556, 1457), (70, 23) */
/* CIF ANSWER (556, 1427), (70, 23) */
('a'):
/* CIF ANSWER (646, 1457), (70, 23) */
/* CIF ANSWER (646, 1427), (70, 23) */
('b'):
ENDDECISION;
/* CIF DECISION (591, 1495), (89, 50) */
/* CIF DECISION (591, 1465), (89, 50) */
DECISION myenum
/* CIF COMMENT (700, 1502), (183, 35) */
/* CIF COMMENT (700, 1472), (183, 35) */
COMMENT 'Check case insensitivity';
/* CIF ANSWER (408, 1565), (70, 23) */
/* CIF ANSWER (408, 1535), (70, 23) */
(a):
/* CIF ANSWER (488, 1565), (70, 23) */
/* CIF ANSWER (488, 1535), (70, 23) */
(B):
/* CIF ANSWER (568, 1565), (70, 23) */
/* CIF ANSWER (568, 1535), (70, 23) */
(c):
/* CIF ANSWER (646, 1565), (70, 23) */
/* CIF ANSWER (646, 1535), (70, 23) */
(d):
/* CIF ANSWER (734, 1565), (70, 23) */
/* CIF ANSWER (734, 1535), (70, 23) */
(Ee):
ENDDECISION;
/* CIF DECISION (567, 1603), (138, 50) */
/* CIF DECISION (567, 1573), (138, 50) */
DECISION present(choice)
/* CIF COMMENT (724, 1610), (183, 35) */
/* CIF COMMENT (724, 1580), (183, 35) */
COMMENT 'Check case insensitivity';
/* CIF ANSWER (519, 1673), (70, 23) */
/* CIF ANSWER (519, 1643), (70, 23) */
(cde2):
/* CIF ANSWER (690, 1673), (70, 23) */
/* CIF ANSWER (690, 1643), (70, 23) */
ELSE:
ENDDECISION;
/* CIF NEXTSTATE (577, 1711), (116, 33) */
/* CIF NEXTSTATE (577, 1681), (116, 33) */
NEXTSTATE Wait_for_GUI;
/* CIF STATE (1063, 119), (116, 33) */
STATE Wait_for_GUI;
/* CIF INPUT (1056, 172), (130, 35) */
INPUT pulse(myenum);
/* CIF OUTPUT (1041, 222), (160, 35) */
/* CIF PROCEDURECALL (994, 222), (253, 35) */
CALL writeln('Got PULSE', num(myenum));
/* CIF OUTPUT (1041, 272), (160, 35) */
OUTPUT telemetry(myenum);
/* CIF NEXTSTATE (1086, 272), (70, 35) */
/* CIF NEXTSTATE (1086, 322), (70, 35) */
NEXTSTATE -;
ENDSTATE;
ENDPROCESS orchestrator;
\ No newline at end of file
#!/bin/sh
make test-python
rm -rf simu
mkdir -p simu
asn2aadlPlus.py dataview-uniq.asn simu/DataView.aadl
cp liborchestrator.so dataview-uniq.asn simu
mv *.aadl simu
cd simu
aadl2glueC.py DataView.aadl orchestrator_interface.aadl
asn2dataModel.py -toPython dataview-uniq.asn
make -f Makefile.python
echo "errCodes=$(python $(taste-config --prefix)/share/asn1-editor/errCode.py ./dataview-uniq.h)" >>datamodel.py
LD_LIBRARY_PATH=. taste_gui -l
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