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)), Element("data_present_dec_b", positions=[63], parser=FixedWordParser(2, 3)), Element("cmd_drivers_dec_a", positions=[63], parser=FixedWordParser(2, 0)), Element("cmd_drivers_dec_b", positions=[63], parser=FixedWordParser(2, 1)), Element( "xpdr_a_lock", positions=[62], parser=FixedWordParser(2, 4), formatter=OptionFormatter(lock_option_text) ), # Docs are wrong, this is correct Element( "xpdr_b_lock", positions=[62], parser=FixedWordParser(2, 5), formatter=OptionFormatter(lock_option_text) ), # Docs are wrong, this is correct Element( "xpdr_a_signal_str", positions=SubcomByteOffset(ANALOG_SUBCOM_2, [58]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit="dBm", ), Element( "xpdr_b_signal_str", positions=SubcomByteOffset(ANALOG_SUBCOM_2, [49]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit="dBm", ), Element( "xpdr_a_static_phase_err", positions=SubcomByteOffset(ANALOG_SUBCOM_2, [50]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit="kHz", ), Element(
# 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)), Element('data_present_dec_b', positions=[63], parser=FixedWordParser(2, 3)), Element('cmd_drivers_dec_a', positions=[63], parser=FixedWordParser(2, 0)), Element('cmd_drivers_dec_b', positions=[63], parser=FixedWordParser(2, 1)), Element('xpdr_a_lock', positions=[62], parser=FixedWordParser(2, 4), formatter=OptionFormatter(lock_option_text)), # Docs are wrong, this is correct Element('xpdr_b_lock', positions=[62], parser=FixedWordParser(2, 5), formatter=OptionFormatter(lock_option_text)), # Docs are wrong, this is correct Element('xpdr_a_signal_str', positions=SubcomByteOffset(ANALOG_SUBCOM_2, [58]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit='dBm'), Element('xpdr_b_signal_str', positions=SubcomByteOffset(ANALOG_SUBCOM_2, [49]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit='dBm'), Element('xpdr_a_static_phase_err',positions=SubcomByteOffset(ANALOG_SUBCOM_2, [50]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit='kHz'), Element('xpdr_b_static_phase_err',positions=SubcomByteOffset(ANALOG_SUBCOM_2, [51]), formatter=CurveFormatterValidator(curve=res.get_curve(36)), unit='kHz'), ] def get_elements(): return _tlm_elements def main(): return 0 if __name__ == '__main__': main()
return (True, self.fn(*val)) except Exception, e: return (True, e) firing_width_option_text = ['invalid', '45 deg', '22.5 deg', '360 deg']; enabled_option_text = ['disabled', 'enabled'] 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)),
_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),