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

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
Topic attachments
I Attachment Action Size Date Who Comment
Bordel.kstrlkstrl Bordel.kstrl manage 1 K 08 Apr 2010 - 09:36 SorayaArias Code Esterel fourni par l'utilisateur pour la Procedure Robot
Bordel.strlstrl Bordel.strl manage 3 K 08 Apr 2010 - 09:26 SorayaArias Code Esterel pour un procedure robot
Topic revision: r3 - 28 Apr 2010, RogerPissard
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding SedWiki? Send feedback