Esempio n. 1
0
     positions=ModeFilteredByteOffset(
         {MODE_ENG: lut.get_ds_lut(EMF_COLS, [20, 52]), MODE_SCI: lut.get_ds_lut(SCI_COLS, [20, 52])}
     ),
 ),
 Element("CMDCNT1x", positions=SubcomByteOffset(DIGITAL_SUBCOM, [20, 52])),
 Element(
     "CMDCNT2",
     positions=ModeFilteredByteOffset(
         {MODE_ENG: lut.get_ds_lut(EMF_COLS, [21, 53]), MODE_SCI: lut.get_ds_lut(SCI_COLS, [21, 53])}
     ),
 ),
 Element("CMDCNT2x", positions=SubcomByteOffset(DIGITAL_SUBCOM, [21, 53])),
 Element(
     "CMDCNT2b",
     positions=SubcomBitOffset(
         DIGITAL_SUBCOM, [utils.num_range(21 * 8, 21 * 8 + 7), utils.num_range(53 * 8, 53 * 8 + 7)]
     ),
 ),
 # Element('CMDCNT2txt', positions=_gen_lut_with_emf_lut(_EMF_LUT, [21, 53])),
 # Element('CMDCNT12', positions=get_ds_lut(17, 64, [[20, 21], [52,53]])),
 Element("SYNC0", positions=[utils.num_range(123, 127)], formatter=HexFormatter()),
 # 	Element('SYNC1', positions=ByteOffset(offsets=[utils.num_range(123,127)], lut=gen_lut_fn), formatter=BinaryFormatter()),
 # 	Element('SYNC2', positions=BitOffset(offsets=[utils.num_range(123*8,127*8+7)], lut=gen_lut_fn), formatter=BinaryFormatter()),
 # Element('PREV', positions=[[60, -(128-60)]]),	# FIXME
 # Element('BITS', bits={6: [range(400,404)]}),
 Element("spacecraft_clock", positions=[utils.num_range(61, 63)], parser=FixedWordParser(0)),
 Element("address_dec_a", positions=[63], parser=FixedWordParser(2, 6)),
 Element("address_dec_b", positions=[63], parser=FixedWordParser(2, 7)),
 Element("parity_dec_a", positions=[63], parser=FixedWordParser(2, 4)),
 Element("parity_dec_b", positions=[63], parser=FixedWordParser(2, 5)),
 Element("data_present_dec_a", positions=[63], parser=FixedWordParser(2, 2)),
Esempio n. 2
0
from elems_shared import *

#gen_lut_fn = lambda x: lut.gen_lut_dict(x[0], NUM_MINOR_FRAMES, True)

lock_option_text = ['unlocked', 'locked']

_tlm_elements = [
	Element('FRMCNT', name='Frame counter', desc='Index of minor frame', positions=[60]),
	
	Element('CMDCNT1',  positions=ModeFilteredByteOffset({MODE_ENG: lut.get_ds_lut(EMF_COLS, [20, 52]), MODE_SCI: lut.get_ds_lut(SCI_COLS, [20, 52])})),
	Element('CMDCNT1x', positions=SubcomByteOffset(DIGITAL_SUBCOM, [20, 52])),
	
	Element('CMDCNT2',  positions=ModeFilteredByteOffset({MODE_ENG: lut.get_ds_lut(EMF_COLS, [21, 53]), MODE_SCI: lut.get_ds_lut(SCI_COLS, [21, 53])})),
	Element('CMDCNT2x', positions=SubcomByteOffset(DIGITAL_SUBCOM, [21, 53])),
	
	Element('CMDCNT2b', positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(21*8,21*8+7), utils.num_range(53*8,53*8+7)])),
	
	#Element('CMDCNT2txt', positions=_gen_lut_with_emf_lut(_EMF_LUT, [21, 53])),
	#Element('CMDCNT12', positions=get_ds_lut(17, 64, [[20, 21], [52,53]])),
	
	Element('SYNC0', positions=[utils.num_range(123,127)], formatter=HexFormatter()),
#	Element('SYNC1', positions=ByteOffset(offsets=[utils.num_range(123,127)], lut=gen_lut_fn), formatter=BinaryFormatter()),
#	Element('SYNC2', positions=BitOffset(offsets=[utils.num_range(123*8,127*8+7)], lut=gen_lut_fn), formatter=BinaryFormatter()),
	
	#Element('PREV', positions=[[60, -(128-60)]]),	# FIXME
	#Element('BITS', bits={6: [range(400,404)]}),
	Element('spacecraft_clock',       positions=[utils.num_range(61,63)], parser=FixedWordParser(0)),
	Element('address_dec_a',          positions=[63], parser=FixedWordParser(2, 6)),
	Element('address_dec_b',          positions=[63], parser=FixedWordParser(2, 7)),
	Element('parity_dec_a',           positions=[63], parser=FixedWordParser(2, 4)),
	Element('parity_dec_b',           positions=[63], parser=FixedWordParser(2, 5)),
Esempio n. 3
0
on_option_text				= ['off', 'on']
complete_option_text		= ['incomplete', 'complete']
four_level_text				= ['off', 'low', 'medium', 'high']

_tlm_elements = [
	Element('frame counter',         name='Frame counter', desc='Index of minor frame', positions=[60]),
	Element('cmd_ctr_b',             positions=SubcomByteOffset(DIGITAL_SUBCOM, [20, 52])),
	Element('cmd_ctr_a',             positions=SubcomByteOffset(DIGITAL_SUBCOM, [21, 53])),
	
	Element('non_ess_current',       positions=ModeFilteredByteOffset({MODE_ENG: lut.combine_lut_dicts(lut.gen_lut_dict(85,  NUM_MINOR_FRAMES), lut.get_as2_lut(EMF_COLS, 44)), MODE_SCI: lut.get_as2_lut(SCI_COLS, 44)}), formatter=CurveFormatterValidator(curve=res.get_curve(32)), unit='A'),
	Element('28v_bus',               positions=ModeFilteredByteOffset({MODE_ENG: lut.combine_lut_dicts(lut.gen_lut_dict(86,  NUM_MINOR_FRAMES), lut.get_as2_lut(EMF_COLS, 43)), MODE_SCI: lut.get_as2_lut(SCI_COLS, 43)}), formatter=CurveFormatterValidator(curve=res.get_curve(41)), unit='V'),
	Element('ess_current',           positions=ModeFilteredByteOffset({MODE_ENG: lut.combine_lut_dicts(lut.gen_lut_dict(87,  NUM_MINOR_FRAMES), lut.get_as2_lut(EMF_COLS, 45)), MODE_SCI: lut.get_as2_lut(SCI_COLS, 45)}), formatter=CurveFormatterValidator(curve=res.get_curve(31)), unit='A'),
	Element('sa_current',            positions=ModeFilteredByteOffset({MODE_ENG: lut.combine_lut_dicts(lut.gen_lut_dict(101, NUM_MINOR_FRAMES), lut.get_as2_lut(EMF_COLS, 46)), MODE_SCI: lut.get_as2_lut(SCI_COLS, 46)}), formatter=CurveFormatterValidator(curve=res.get_curve(33)), unit='A'),
	Element('shunt_dump_current',    positions=SubcomByteOffset(ANALOG_SUBCOM_2, [47]),                                                                 formatter=CurveFormatterValidator(curve=res.get_curve(32)), unit='A'),
	
	Element('hps_1_thruster_select', positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(80,91)]), formatter=BinaryFormatter(fill=12)),
	Element('hps_1_sector_initiate', positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(92,101)])),
	Element('hps_1_sector_width',    positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(102,103)]), formatter=OptionFormatter(firing_width_option_text)),
	Element('hps_1_num_pulses',      positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(104,110)]), parser=PulseCountParser()),
	Element('hps_1_firing_ratio',    positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(111,114)])),
	Element('hps_1_ratio_select',    positions=SubcomBitOffset(DIGITAL_SUBCOM, [115]), formatter=OptionFormatter(enabled_option_text)),
	Element('hps_1_logic_pwr',       positions=SubcomBitOffset(DIGITAL_SUBCOM, [116]), formatter=OptionFormatter(on_option_text)),
	Element('hps_1_init_term',       positions=SubcomBitOffset(DIGITAL_SUBCOM, [117])),	#, formatter=OptionFormatter(binary_status_text)
	Element('hps_1_complete',        positions=SubcomBitOffset(DIGITAL_SUBCOM, [118]), formatter=OptionFormatter(complete_option_text)),
	Element('hps_1_28v_on',          positions=SubcomBitOffset(DIGITAL_SUBCOM, [119]), formatter=OptionFormatter(on_option_text)),
	
	Element('hps_2_thruster_select', positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(120,131)]), formatter=BinaryFormatter(fill=12)),
	Element('hps_2_sector_initiate', positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(132,141)])),
	Element('hps_2_sector_width',    positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(142,143)]), formatter=OptionFormatter(firing_width_option_text)),
	Element('hps_2_num_pulses',      positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(144,150)]), parser=PulseCountParser()),
	Element('hps_2_firing_ratio',    positions=SubcomBitOffset(DIGITAL_SUBCOM, [utils.num_range(151,154)])),
Esempio n. 4
0
         positions=ModeFilteredByteOffset({
             MODE_ENG:
             lut.combine_lut_dicts(lut.gen_lut_dict(101, NUM_MINOR_FRAMES),
                                   lut.get_as2_lut(EMF_COLS, 46)),
             MODE_SCI:
             lut.get_as2_lut(SCI_COLS, 46)
         }),
         formatter=CurveFormatterValidator(curve=res.get_curve(33)),
         unit='A'),
 Element('shunt_dump_current',
         positions=SubcomByteOffset(ANALOG_SUBCOM_2, [47]),
         formatter=CurveFormatterValidator(curve=res.get_curve(32)),
         unit='A'),
 Element('hps_1_thruster_select',
         positions=SubcomBitOffset(DIGITAL_SUBCOM,
                                   [utils.num_range(80, 91)]),
         formatter=BinaryFormatter(fill=12)),
 Element('hps_1_sector_initiate',
         positions=SubcomBitOffset(DIGITAL_SUBCOM,
                                   [utils.num_range(92, 101)])),
 Element('hps_1_sector_width',
         positions=SubcomBitOffset(DIGITAL_SUBCOM,
                                   [utils.num_range(102, 103)]),
         formatter=OptionFormatter(firing_width_option_text)),
 Element('hps_1_num_pulses',
         positions=SubcomBitOffset(DIGITAL_SUBCOM,
                                   [utils.num_range(104, 110)]),
         parser=PulseCountParser()),
 Element('hps_1_firing_ratio',
         positions=SubcomBitOffset(DIGITAL_SUBCOM,
                                   [utils.num_range(111, 114)])),