Pseudo code pour le code esterel de la procedure robot
- NOMENMAJUSCULE : partie a remplacer via generation de code, sauf pour
BF, START, STARTED, USERSTART, T2, L_T2, T3
-
__foreach xxxxx__
traitement a faire en boucle via generation de code
- Exemples de Fichier genere
- https://sed-wiki.inrialpes.fr/pub/Platforms/Misc/CodeStrlProcedureRobot/Bordel.strl
- Caracteristiques :
- Nom Procedure Robot : Bordel
- Liste des Robot Tasks composant cette Procedure Robot
- InitCycab
- JoystickDrv
- ParkDrv
- SearchDrv
- Liste des events de type T2 definies par les Robot Tasks :
- PbMotorE (definie dans InitCycab, JoystickDrv, ParkDrv)
- NoParkE (definie dans SearchDrv)
- Liste des event signal definis par l'utilisateur pour la Procedure Robot :
- Code de la Procedure Robot fourni par l'utilisateur :
Fichier ProcNOMPROCEDUREROBOT.strl
module ProcNOMPROCEDUREROBOT:
type orcStrlPtr ;
output
BF_ProcNOMPROCEDUREROBOT,
STARTED_ProcNOMPROCEDUREROBOT,
GoodEnd_ProcNOMPROCEDUREROBOT,
Abort_ProcNOMPROCEDUREROBOT,
T3_ProcNOMPROCEDUREROBOT;
input
START_ProcNOMPROCEDUREROBOT,
Abort_Local_ProcNOMPROCEDUREROBOT;
>>foreach robottask defined for NOMPROCEDUREROBOT do :
output
START_NOMROBOTTASK,
Abort_Local_NOMROBOTTASK;
input
NOMROBOTTASK_Start : orcStrlPtr,
BF_NOMROBOTTASK,
USERSTART_NOMROBOTTASK,
T3_NOMROBOTTASK;
procedure
NOMROBOTTASK_controler()(orcStrlPtr),
NOMROBOTTASK_fileparameter()(orcStrlPtr, string),
NOMROBOTTASK_parameter()(orcStrlPtr);
>> foreach T2event defined in robottask (if any)
input
T2_NOMT2EVENT,
-->last T2event should be set as : T2_NOMT2EVENT;
<<
<<
>>foreach event signal defined by user for NOMPROCEDUREROBOT do :
input
NOMSIGNAL;
<<
relation
START_ProcNOMPROCEDUREROBOT#
BF_ProcNOMPROCEDUREROBOT#
>>foreach robottask defined for NOMPROCEDUREROBOT do:
T3_NOMROBOTTASK#
>>foreach T2event defined by robottask do
T2_NOMT2EVENT#
<<
<<
>>foreach event signal defined by user for NOMPROCEDUREROBOT do :
NOMSIGNAL#
<<
Abort_Local_ProcNOMROBOTTASK;
signal
<< foreach T2event defined in each robottask composing NOMPROCEDUREROBOT do
L_T2_NOMT2EVENT,
<<
dummylocalsignal in
await immediate START_ProcNOMROBOTPROCEDURE;
emit STARTED_ProcNOMROBOTPROCEDURE;
trap Abort in
trap T3_controle_ProcNOMPROCEDUREROBOT in
trap BF_controle_ProcNOMPROCEDUREROBOT in
[
[
>>Add code specified by user__<<
; exit BF_controle_ProcNOMPROCEDUREROBOT
]
||
[
await Abort_Local_ProcNOMPROCEDUREROBOT;
emit Abort_ProcNOMPROCEDUREROBOT;
>>foreach robottask defined for NOMPROCEDUROBOT do:
emit Abort_Local_NOMROBOTTASK;
<<
exit Abort;
]
]
; exit BF_controle_ProcNOMPROCEDUREROBOT
handle BF_controle_ProcNOMPROCEDUREROBOT do
emit BF_ProcNOMPROCEDUREROBOT;
emit GoodEnd_ProcNOMPROCEDUREROBOT
end trap
handle T3_controle_ProcNOMPROCEDUREROBOT do
emit T3_ProcNOMPROCEDUREROBOT
end trap
end trap
end signal
-- Main.SorayaArias - 07 Apr 2010