;+
; Project     : SOLAR-B - EIS
;
; Name        : EIS_CPT_MSSL_COMMANDS
;
; Purpose     : Sets up MSSL command values.
;
; Explanation : This provides a translation between MSSL command BC1 hex values and MSSL command mnemonics and
;               gives the length of each command and any fixed command BC values.
;               It only includes those commands that may be run from within a sequence table.
;               It is used for translation of hex sequence tables into MSSL command mnemonics.
;               The source for the data used is the perl EGSE routine seq_translate5.pl.
;               The MSSL commands are returned as a structure of type MSSL_command with tags :
;                 mnemonic : STRING MSSL command mnemonic
;                 bc1      : BYTE BC1 value
;                 length   : INT no. of BC values in command
;                 fixed    : STRING any fixed BC2-n values given in ASCII hex
;                                   '' if none.
;
; Use         : < eis_cpt_mssl_commands, commands>
;
; Inputs      : None.
;
; Opt. Inputs : None.
;
; Outputs     : commands : STRUCTURE ARRAY of type MSSL commands.
;
; Opt. Outputs: None.
;
; Keywords    : None.
;
; Calls       : None.
;
; Common      : None.
;
; Restrictions: None.
;
; Side effects: None.
;
; Category    : EIS_CPT.
;
; Prev. Hist. : None.
;
; Written     : Martin Carter RAL 19/04/05
;
; Modified    : Version 0.0, 19/04/05, MKC
;               Version 0.1, 30/01/08, MKC
;                 Added RESOLV commands.
;
; Version     : 0.1, 30/01/08
;-
;**********************************************************

PRO eis_cpt_mssl_commands, commands

  commands = REPLICATE({MSSL_COMMAND, mnemonic:'', bc1:0B, length:0, fixed:''}, 33)

  commands[ 0].mnemonic = 'eis_cam_reset'
  commands[ 1].mnemonic = 'eis_cam_exit_default'
  commands[ 2].mnemonic = 'eis_cam_prog_csg_win'
  commands[ 3].mnemonic = 'eis_cam_setup_ae'
  commands[ 4].mnemonic = 'eis_cam_csg_abort'
  commands[ 5].mnemonic = 'eis_shut_cls'
  commands[ 6].mnemonic = 'eis_mhc_motor_enable'
  commands[ 7].mnemonic = 'eis_mhc_find_shut_index'
  commands[ 8].mnemonic = 'eis_mhc_autosafe'
  commands[ 9].mnemonic = 'eis_mhc_mir_f_auto'
  commands[10].mnemonic = 'eis_mhc_cal_source_ctrl'
  commands[11].mnemonic = 'eis_mhc_cal_power'
  commands[12].mnemonic = 'eis_mhc_heater_off'
  commands[13].mnemonic = 'eis_mhc_heater_on'
  commands[14].mnemonic = 'eis_mhc_mir_c_auto'
  commands[15].mnemonic = 'eis_mhc_mir_c_manual'
  commands[16].mnemonic = 'eis_mhc_mir_f_manual'
  commands[17].mnemonic = 'eis_mhc_parameter_set'
  commands[18].mnemonic = 'eis_mhc_qcm_control'
  commands[19].mnemonic = 'eis_mhc_qcm_htr'
  commands[20].mnemonic = 'eis_mhc_slit_slot_auto'
  commands[21].mnemonic = 'eis_mhc_slit_slot_manual'
  commands[22].mnemonic = 'eis_mhc_watchdog'
  commands[23].mnemonic = 'eis_stop_seq'
  commands[24].mnemonic = 'eis_call_seq'
  commands[25].mnemonic = 'eis_flush_ccd'
  commands[26].mnemonic = 'eis_run_raster'
  commands[27].mnemonic = 'eis_set_mhc_op_parm'
  commands[28].mnemonic = 'eis_set_seq_loop'
  commands[29].mnemonic = 'eis_delay'
  commands[30].mnemonic = 'eis_start_exp'
  commands[31].mnemonic = 'eis_flat_field'
  commands[32].mnemonic = 'eis_resolv'

  commands[ 0].bc1 = '40'XB
  commands[ 1].bc1 = '41'XB
  commands[ 2].bc1 = '44'XB
  commands[ 3].bc1 = '45'XB
  commands[ 4].bc1 = '48'XB
  commands[ 5].bc1 = '53'XB
  commands[ 6].bc1 = '54'XB
  commands[ 7].bc1 = '5A'XB
  commands[ 8].bc1 = '5F'XB
  commands[ 9].bc1 = '62'XB
  commands[10].bc1 = '65'XB
  commands[11].bc1 = '66'XB
  commands[12].bc1 = '69'XB
  commands[13].bc1 = '6A'XB
  commands[14].bc1 = '6C'XB
  commands[15].bc1 = '6D'XB
  commands[16].bc1 = '6E'XB
  commands[17].bc1 = '6F'XB
  commands[18].bc1 = '70'XB
  commands[19].bc1 = '71'XB
  commands[20].bc1 = '73'XB
  commands[21].bc1 = '74'XB
  commands[22].bc1 = '76'XB
  commands[23].bc1 = '81'XB
  commands[24].bc1 = '82'XB
  commands[25].bc1 = '85'XB
  commands[26].bc1 = '86'XB
  commands[27].bc1 = '87'XB
  commands[28].bc1 = '89'XB
  commands[29].bc1 = '8A'XB
  commands[30].bc1 = '8D'XB
  commands[31].bc1 = '8E'XB
  commands[32].bc1 = '72'XB

  commands[ 0].length = 1
  commands[ 1].length = 1
  commands[ 2].length = 5
  commands[ 3].length = 9
  commands[ 4].length = 2
  commands[ 5].length = 3
  commands[ 6].length = 3
  commands[ 7].length = 3
  commands[ 8].length = 7
  commands[ 9].length = 7
  commands[10].length = 7
  commands[11].length = 7
  commands[12].length = 7
  commands[13].length = 7
  commands[14].length = 7
  commands[15].length = 9
  commands[16].length = 9
  commands[17].length = 9
  commands[18].length = 9
  commands[19].length = 7
  commands[20].length = 9
  commands[21].length = 9
  commands[22].length = 7
  commands[23].length = 2
  commands[24].length = 2
  commands[25].length = 3
  commands[26].length = 23
  commands[27].length = 11
  commands[28].length = 2
  commands[29].length = 3
  commands[30].length = 3
  commands[31].length = 4
  commands[32].length = 7

  commands[ 0].fixed = ''
  commands[ 1].fixed = ''
  commands[ 2].fixed = ''
  commands[ 3].fixed = ''
  commands[ 4].fixed = ''
  commands[ 5].fixed = 'A09C'
  commands[ 6].fixed = 'E88E'
  commands[ 7].fixed = '6009'
  commands[ 8].fixed = 'C09A0002'
  commands[ 9].fixed = 'A0930002'
  commands[10].fixed = '60060002'
  commands[11].fixed = '00A50002'
  commands[12].fixed = 'C00C0002'
  commands[13].fixed = '288D0002'
  commands[14].fixed = '28270002'
  commands[15].fixed = '48120004'
  commands[16].fixed = '28140004'
  commands[17].fixed = 'C0950004'
  commands[18].fixed = '00960004'
  commands[19].fixed = 'E8170002'
  commands[20].fixed = '609F0004'
  commands[21].fixed = 'A0A00004'
  commands[22].fixed = 'C0A90002'
  commands[23].fixed = ''
  commands[24].fixed = ''
  commands[25].fixed = ''
  commands[26].fixed = ''
  commands[27].fixed = ''
  commands[28].fixed = ''
  commands[29].fixed = ''
  commands[30].fixed = ''
  commands[31].fixed = ''
  commands[32].fixed = '0099000200'

END





