# anim.yml - task animation sequences
#
# Format: YAML (YAML Ain't Markup Language; http://www.yaml.org)
#
#  Movies:
#    -
#      base:            x     # basename of output movie file
#      title:           x     # title text for movie
#      movies:          x     # movies to incorporate (in a Composite)
#    ...
#    -
#      add:             x     # add-on for basename (eg, '_dl')
#      title:           x     # title text for movie
#      seq:             x     # sequence add-on (eg, 'tFO_dl')
#    ...
#
#  Sequences:
#    <sequence_tag>:
#      - s1:            x     # seq. of edge/node names (eg, 'A B C')
#      - 0:             x     # set  of edge/node names to "turn off"
#      - 1:             x     # set  of edge/node names to "turn on"
#
#
# Notes:
#
#  The "origin" DOT file is named "<base>.dot" or "<base><add>.dot".
#  The "seq" tags refer to items in the Sequences hash.
#  The "movies" tags refer to items in a Movies hash (constructed from
#  items in the Movies list and keyed by their base and/or add values).
#
# Written by Rich Morin, rdm@slac.stanford.edu

#DDF    - patt:     'e_idf/anim'
#DDF      desc:     'task animation'
#DDF      exts:     'yml'

  Movies:

    # Miscellany

    - base:     'misc_Event_Assembly'
      title:    'Event Assembly (Composite)'
      movies:   '_ti  4  _ta'

    - add:      '_ta'
      title:    'Trigger Accept'
      seq:      'm_EA_ta'

    - add:      '_ti'
      title:    'Trigger Information'
      seq:      'm_EA_ti'

    - base:     'misc_ITC'
      title:    'Inter-Task Communication (Composite)'
      movies:   |
                _te0_te0  4  _te0_ts   4  _te0_sc   4  _te0_ssr  8
                _ts_ts    4  _ts_te0   4  _ts_sc    4  _ts_ssr   8
                _li_te0   8  _sc_ts

    - add:      '_te0_te0'
      title:    'Source (EPU 0) to Dest. (EPU 0)'
      seq:      'm_ITC_te0_te0'

    - add:      '_te0_ts'
      title:    'Source (EPU 0) to Dest. (SIU)'
      seq:      'm_ITC_te0_ts'

    - add:      '_te0_sc'
      title:    'Source (EPU 0) to Spacecraft'
      seq:      'm_ITC_te0_sc'

    - add:      '_te0_ssr'
      title:    'Source (EPU 0) to SSR'
      seq:      'm_ITC_te0_ssr'

    - add:      '_ts_ts'
      title:    'Source (SIU) to Dest. (SIU)'
      seq:      'm_ITC_ts_ts'

    - add:      '_ts_te0'
      title:    'Source (SIU) to Dest. (EPU 0)'
      seq:      'm_ITC_ts_te0'

    - add:      '_ts_sc'
      title:    'Source (SIU) to Spacecraft'
      seq:      'm_ITC_ts_sc'

    - add:      '_ts_ssr'
      title:    'Source (SIU) to SSR'
      seq:      'm_ITC_ts_ssr'

    - add:      '_li_te0'
      title:    'LAT Instrument to Dest. (EPU 0)'
      seq:      'm_ITC_li_te0'

    - add:      '_sc_ts'
      title:    'Spacecraft to Dest. (SIU)'
      seq:      'm_ITC_sc_ts'

    - base:     'misc_Testbed'
      title:    'Testbed Operation (Composite)'
      movies:   '_p  4  _i  4  _o  4  _a'

    - add:      '_a'
      title:    'Analysis'
      seq:      'm_T_a'

    - add:      '_i'
      title:    'Initiation'
      seq:      'm_T_i'

    - add:      '_o'
      title:    'Operation'
      seq:      'm_T_o'

    - add:      '_p'
      title:    'Preparation'
      seq:      'm_T_p'

    # Tasks

    - base:     'task_1553_Receive_Service'
      title:    'Telecommand Packet from Spacecraft'
      seq:      't_1RS'

    - base:     'task_1553_Transmit_Service'
      title:    'Telemetry Packet to Spacecraft'
      seq:      't_1TS'

    - base:     'task_File_Object'
      title:    'File-related Commands (Composite)'
      movies:   '_ul  4  _dl'

    - add:      '_dl'
      title:    'File Download (etc.) Command'
      seq:      't_FO_dl'

    - add:      '_ul'
      title:    'File Upload Command'
      seq:      't_FO_ul'

    - base:     'task_GBM_Interrupt'
      title:    'Interrupt from GBM'
      seq:      't_GI'

    - base:     'task_Housekeeping'
      title:    'Housekeeping (Composite)'
      movies:   |
                _sl  4           _ml  8
                _sl  4  _cfs1 4  _ml  8
                _sl  4  _cfs2 4  _ml

    - add:      '_cfs1'
      title:    'Command from Spacecraft'
      seq:      't_H_cfs1'

    - add:      '_cfs2'
      title:    'Command from Spacecraft (involving LAT)'
      seq:      't_H_cfs2'

    - add:      '_ml'
      title:    'Master Loop'
      seq:      't_H_ml'

    - add:      '_sl'
      title:    'Slave Loop'
      seq:      't_H_sl'

    - base:     'task_IP_calibration'
      title:    'Command and Event handling (Composite)'
      movies:   '_sc2m  4  _m2s  4  _m2l  4  _ev'

    - add:      '_sc2m'
      title:    'Command packet from Spacecraft'
      seq:      't_I_cal_sc2m'

    - add:      '_m2s'
      title:    'Command forwarding to Slaves'
      seq:      't_I_cal_m2s'

    - add:      '_m2l'
      title:    'Command forwarding to LAT'
      seq:      't_I_cal_m2l'

    - add:      '_ev'
      title:    'Event handling'
      seq:      't_I_cal_ev'

    - base:     'task_IP_configuration'
      title:    'Configuration Mode (Composite)'
      movies:   '_sc2m  4  _m2s   4  _m2l'

    - add:      '_sc2m'
      title:    'Command packet from Spacecraft'
      seq:      't_I_con_sc2m'

    - add:      '_m2s'
      title:    'Command forwarding to Slaves'
      seq:      't_I_con_m2s'

    - add:      '_m2l'
      title:    'Command forwarding to LAT'
      seq:      't_I_con_m2l'

    - base:     'task_IP_diagnostic'
      title:    'Diagnostic Mode (Composite)'
      movies:   |
                _sc2m   4  _m2s    4  _s2l    4
                _ev     4  _s2ssr  4  _s2m    4 _m2ssr

    - add:      '_ev'
      title:    'Events from LAT to Slaves'
      seq:      't_I_dia_ev'

    - add:      '_m2s'
      title:    'Command forwarding to Slaves'
      seq:      't_I_dia_m2s'

    - add:      '_m2ssr'
      title:    'Summary packets to Solid State Recorder'
      seq:      't_I_dia_m2ssr'

    - add:      '_s2l'
      title:    'Configuration messages to LAT'
      seq:      't_I_dia_s2l'

    - add:      '_s2m'
      title:    'Event metrics from Slaves to Master'
      seq:      't_I_dia_s2m'

    - add:      '_s2ssr'
      title:    'Data from Slaves to Solid State Recorder'
      seq:      't_I_dia_s2ssr'

    - add:      '_sc2m'
      title:    'Command packet from Spacecraft'
      seq:      't_I_dia_sc2m'

    - base:     'task_IP_event_taking'
      title:    'Event-Taking Mode (Composite)'
      movies:   |
                _l2s    4  _s2ssr  4  _s2m1  4  _m2ssr  4  _s2m2  4
                _g2m    4  _m2sc   4  _m2s   4  _s2l

    - add:      '_l2s'
      title:    'LAT sends Events to Slaves'
      seq:      't_I_et_l2s'

    - add:      '_s2ssr'
      title:    'Slaves send data to Solid State Recorder'
      seq:      't_I_et_s2ssr'

    - add:      '_s2m1'
      title:    'Slaves send Event metrics to Master'
      seq:      't_I_et_s2m1'

    - add:      '_m2ssr'
      title:    'Master sends Summaries to Solid State Recorder'
      seq:      't_I_et_m2ssr'

    - add:      '_s2m2'
      title:    'Slaves send GRC to Master'
      seq:      't_I_et_s2m2'

    - add:      '_g2m'
      title:    'GBM sends Notification to Master'
      seq:      't_I_et_g2m'

    - add:      '_m2sc'
      title:    'Master sends Alert/Repoint Command to Spacecraft'
      seq:      't_I_et_m2sc'

    - add:      '_m2s'
      title:    'Master sends Command to Slaves'
      seq:      't_I_et_m2s'

    - add:      '_s2l'
      title:    'Slave sends reconfiguration commands to LAT Instrument'
      seq:      't_I_et_s2l'

    - base:     'task_LCB_Receive_Service'
      title:    'LCB Receive Service (Composite)'
      movies:   '_st  4  _li'

    - add:      '_li'
      title:    'LCB Receive Service (LAT Instrument)'
      seq:      't_LCB_li'

    - add:      '_st'
      title:    'LCB Receive Service (Source Task)'
      seq:      't_LCB_st'

    - base:     'task_LCB_Transmit_Service'
      title:    'LCB Transmit Service (Composite)'
      movies:   '_dt  4  _ssr'

    - add:      '_dt'
      title:    'LCB Transmit Service (Dest. Task)'
      seq:      't_LCB_dt'

    - add:      '_ssr'
      title:    'LCB Transmit Service (SSR)'
      seq:      't_LCB_ssr'

    - base:     'task_MSG'
      title:    'Message Packet to Spacecraft'
      seq:      't_MSG'

    - base:     'task_Primitive'
      title:    'Spacecraft and Task (Composite)'
      movies:   '_sc  4  _t'

    - add:      '_sc'
      title:    'Primitive (Spacecraft)'
      seq:      't_P_sc'

    - add:      '_t'
      title:    'Primitive (Task)'
      seq:      't_P_t'

    - base:     'task_Spacecraft_Attitude_Time'
      title:    'Ancillary, Attitude, and Time (Composite)'
      movies:   |
                _att  4  _tone  8
                _att  4  _hack  8
                _att  4  _anc   8
                _att            8
                _att

    - add:      '_anc'
      title:    'Ancillary Message from Spacecraft'
      seq:      't_SAT_anc'

    - add:      '_att'
      title:    'Attitude Message from Spacecraft'
      seq:      't_SAT_att'

    - add:      '_hack'
      title:    'Time Hack from Spacecraft'
      seq:      't_SAT_hack'

    - add:      '_tone'
      title:    'Time Tone Message from Spacecraft'
      seq:      't_SAT_tone'

    - base:     'task_Thermal_Control_System'
      title:    'Master Loop, Spacecraft Command (Composite)'
      movies:   '_ml  4  _sc'

    - add:      '_ml'
      title:    'Master Loop'
      seq:      't_TCS_ml'

    - add:      '_sc'
      title:    'Spacecraft Command'
      seq:      't_TCS_sc'

    - base:     'task_Watchdog'
      title:    'Slave Loop, Spacecraft Command (Composite)'
      movies:   '_sl  4  _sc'

    - add:      '_sl'
      title:    'Watchdog (Slave Loop)'
      seq:      't_W_sl'

    - add:      '_sc'
      title:    'Watchdog (Spacecraft Command)'
      seq:      't_W_sc'


  Sequences:

    # Miscellany

    # misc_Event_Assembly

    m_EA_ta:
      - 1: 'GEM'
      - 1: 'GEM->TA1        GEM->TA2        GEM->TA3'
      - 1: '     TA1             TA2             TA3'
      - 0: 'GEM'
      - 0: 'GEM->TA1        GEM->TA2        GEM->TA3'
      - 1: '     TA1->AEM        TA2->TEMs       TA3->GEM'
      - 1: '          AEM             TEMs            GEM'
      - 0: '     TA1             TA2             TA3'
      - 0: '     TA1->AEM        TA2->TEMs       TA3->GEM'
      - 1: '          AEM->EF1        TEMs->EF2       GEM->EF3'
      - 1: '               EF1              EF2            EF3'
      - 0: '          AEM             TEMs            GEM'
      - 0: '          AEM->EF1        TEMs->EF2       GEM->EF3'
      - 1: '               EF1->EBM         EF2->EBM       EF3->EBM'
      - 1: '                    EBM'
      - 0: '               EF1              EF2            EF3'
      - 0: '               EF1->EBM         EF2->EBM       EF3->EBM'
      - 1: '                    EBM->EPU'
      - 1: '                         EPU'
      - 0: '                    EBM'
      - 0: '                    EBM->EPU'
      - 0: '                         EPU'

    m_EA_ti:
      - 1: 'AEM            TEMs'
      - 1: 'AEM->TI1       TEMs->TI2'
      - 1: '     TI1             TI2'
      - 0: 'AEM            TEMs'
      - 0: 'AEM->TI1       TEMs->TI2'
      - 1: '     TI1->GEM        TI2->GEM'
      - 1: '          GEM             GEM'
      - 0: '     TI1             TI2'
      - 0: '     TI1->GEM        TI2->GEM'
      - 0: '          GEM             GEM'

    # misc_ITC

    m_ITC_te0_te0:
      - s1: 'STe0  DTe0'

    m_ITC_te0_ts:
      - s1: 'STe0  uLCSe0  dLCBe0  LCBe0  EB  LCBs  dLCBs  DTs'

    m_ITC_te0_sc:
      - s1: 'STe0  uLCSe0  dLCBe0  LCBe0  EB  LCBs  dLCBs  uCTS  uRT  SC'

    m_ITC_te0_ssr:
      - s1: 'STe0  uLCSe0  dLCBe0  LCBe0  EB  SSR'

    m_ITC_ts_ts:
      - s1: 'STs  DTs'

    m_ITC_ts_te0:
      - s1: 'STs  uLCSs  dLCBs  LCBs  EB  LCBe0  dLCBe0  DTe0'

    m_ITC_ts_sc:
      - s1: 'STs  uCTS  uRT  SC'

    m_ITC_ts_ssr:
      - s1: 'STs  uLCSs  dLCBs  LCBs  EB  SSR'

    m_ITC_li_te0:
      - s1: 'LI  EB  LCBe0  dLCBe0  DTe0'

    m_ITC_sc_ts:
      - s1: 'SC  uRT  DTs'

    # misc_Testbed

    m_T_a:
      - s1: 'DE,SE,TL  TA'

    m_T_i:
      - s1: 'TS  SC  SIU  GASU  EPUs'
      - s1: 'TS  SC  SIU  GASU  FES'

    m_T_o:
      - s1: 'SE FES AEM,TEMs GASU EPUs'

    m_T_p:
      - s1: 'MC  SE'

    # Tasks

    # task_1553_Receive_Service

    t_1RS:
      - s1: 'SC  Rx_Tc  Rx  MT_Tc  MT'

    # task_1553_Transmit_Service

    t_1TS:
      - s1: 'Task  Tx_tm  Tx  SSR_tm  SSR'

    # task_File_Object

    t_FO_ul:
      - s1: 'SC  FOM_command  FOM  FOS_command  FOS  EES'

    t_FO_dl:
      - s1: |
            SC  FOM_command  FOM  FOS_command  FOS  EES  FOS
            FOM_download  FOM  SSR_download  SSR

    # task_GBM_Interrupt

    t_GI:
      - s1: 'GBM_dev  GBM_int  GBM  IPM_notify  IPM'

    # task_Housekeeping

    t_H_cfs1:
      - s1: 'SC  HM_command  HM  SC_report  SC'

    t_H_cfs2:
      - s1: 'SC  HM_command  HM  LI_inquiry  LI  HM_response  HM  SC_report  SC'

    t_H_ml:
      - s1: 'HM  SC_report  SC'

    t_H_sl:
      - s1: 'HS  HM_metric  HM'

    # task_IP_calibration

    t_I_cal_sc2m:
      - s1: 'SC  IPM_command  IPM'

    t_I_cal_m2s:
      - s1: 'IPM  IPS_command  IPS'

    t_I_cal_m2l:
      - s1: 'IPM  LI_command  LI'

    t_I_cal_ev:
      - s1: 'LI  IPS_event  IPS  IPM_calib  IPM  SSR_summary  SSR'

    # task_IP_configuration

    t_I_con_sc2m:
      - s1: 'SC  IPM_command  IPM'

    t_I_con_m2s:
      - s1: 'IPM  IPS_command  IPS'

    t_I_con_m2l:
      - s1: 'IPM  LI_command  LI  IPM_config  IPM'

    # task_IP_diagnostic
 
    t_I_dia_sc2m:
      - s1: 'SC  IPM_command  IPM'

    t_I_dia_m2s:
      - s1: 'IPM  IPS_command  IPS'

    t_I_dia_m2ssr:
      - s1: 'IPM  SSR_summary  SSR'
 
    t_I_dia_s2l:
      - s1: 'IPS  LI_command  LI'

    t_I_dia_ev:
      - s1: 'LI  IPS_event  IPS'

    t_I_dia_s2ssr:
      - s1: 'IPS  SSR_data  SSR'

    t_I_dia_s2m:
      - s1: 'IPS  IPM_metric  IPM'

    # task_IP_event_taking

    t_I_et_l2s:
      - s1: 'LI  IPS_event  IPS'

    t_I_et_s2ssr:
      - s1: 'IPS  SSR_asst  SSR'

    t_I_et_s2m1:
      - s1: 'IPS  IPM_metric  IPM'

    t_I_et_m2ssr:
      - s1: 'IPM  SSR_summary  SSR'

    t_I_et_s2m2:
      - s1: 'IPS  IPM_grc  IPM'

    t_I_et_g2m:
      - s1: 'GBM  IPM_notify  IPM'

    t_I_et_m2sc:
      - s1: 'IPM  SC_arc  SC'

    t_I_et_m2s:
      - s1: 'IPM  IPS_command  IPS'

    t_I_et_s2l:
      - s1: 'IPS  LI_command  LI'

    # task_LCB_Receive_Service

    t_LCB_st:
      - s1: 'ST  LT  LCB1  EB  LCB2  LR  DT'

    t_LCB_li:
      - s1: 'LI  EB  LCB2  LR  DT'

    # task_LCB_Transmit_Service

    t_LCB_dt:
      - s1: 'ST  LT  LCB1  EB  LCB2  LR  DT'

    t_LCB_ssr:
      - s1: 'ST  LT  LCB1  EB  SSR'

    # task_MSG

    t_MSG:
      - s1: 'Task  MSG_message  MSG  SC_message  SC'

    # task_Primitive

    t_P_sc:
      - s1: 'SC  P_command  P  LI_command  LI  P_response  P  SC_response  SC'

    t_P_t:
      - s1: 'T P_command P  LI_command  LI  P_response  P  T_response  T'

    # task_Spacecraft_Attitude_Time

    t_SAT_anc:
      - s1: 'SC  ATM_ancillary  ATM  ATS_ancillary  ATS'

    t_SAT_att:
      - s1: 'SC  ATM_attitude  ATM  ATS_attitude  ATS  ATS_att_table'

    t_SAT_hack:
      - s1: 'SC  OPI_time_hack  OPI  ATS_time_table'

    t_SAT_tone:
      - s1: 'SC  ATM_time_tone  ATM  ATS_time_tone  ATS  ATS_time_table'

    # task_Thermal_Control_System

    t_TCS_ml:
      - s1: 'TCS  LI_inquiry  LI  TCS_response  TCS  SIB'

    t_TCS_sc:
      - s1: |
            SC  TCS_command  TCS  LI_inquiry  LI  TCS_response  TCS
            SSR_diagnostic  SSR

    # task_Watchdog

    t_W_sl:
      - s1: |
            WDS  RAM_diagnostic  RAM  RAM_diagnostic
            WDS  RT_inquiry  RT  WDS_response
            WDS  HWW_message  HWW

    t_W_sc:
      - s1: 'SC  WDM_command  WDM  WDS_command  WDS'
