;+NAME/ONE LINE DESCRIPTION OF ROUTINE: ; EPS_STR creates a data structure to store encapsulated postscript ; state of health telemetry data. ; ;======================================================================== ; Name: ; eps_str - creates data structure to store eps SOH telemetry data ; ; Synopsis: ; eps = eps_str( nrec ) ; ; Inputs: ; nrec - number of records desired ; ; Outputs: ; eps - data structure with nrec records ; ; Author: ; BA Franz, General Sciences Corp., 29 January 96 ; ; Note: ; Additional compexity was required due to limitations on the ; number of structure fields allowed in IDL. ; ;======================================================================== function batt_struct, nstruct common batt_str_cmn, defined if ( n_elements(defined) ne 1 ) then begin rec = { batt_struct , $ ; bat1_volt1: 0B , $ ; bat1_dischg_cur: 0B , $ ; bat1_chg_cur: 0B , $ ; bat1_pres1: 0B , $ ; bat1_pres2: 0B , $ ; bat1_temp1: 0B , $ ; bat1_temp2: 0B , $ ; bat2_volt1: 0B , $ ; bat2_dischg_cur: 0B , $ ; bat2_chg_cur: 0B , $ ; bat2_pres1: 0B , $ ; bat2_pres2: 0B , $ ; bat2_temp1: 0B , $ ; bat2_temp2: 0B , $ ; bat1_dod: 0B , $ ; bat2_dod: 0B } defined = 1 endif if ( n_elements(nstruct) ne 1 ) then nstruct = 1 return, replicate( { batt_struct }, nstruct ) end function pm_struct, nstruct common eps_str_cmn, defined if ( n_elements(defined) ne 1 ) then begin rec = { pm_struct , $ ; pm_fet_rail_temp: 0B , $ ; pm_input_volt: 0B , $ ; pm_input_cur: 0B , $ ; pm_output_bus_volt: 0B } defined = 1 endif if ( n_elements(nstruct) ne 1 ) then nstruct = 1 return, replicate( { pm_struct }, nstruct ) end function eps_str, nstruct common eps_str_cmn, defined if ( n_elements(defined) ne 1 ) then begin rec = batt_struct(1) rec = pm_struct(1) rec = { eps_struct , $ ; Structure Name frame_length: 0 , $ ; frame_header: bytarr(8) , $ ; length: 0 , $ ; dest_addr: 0 , $ ; source_addr: 0 , $ ; control: 0B , $ ; sequence: 0B , $ ; func: 0B , $ ; subfunc: 0B , $ ; task_status: 0B , $ ; task_error: 0B , $ ; stack_pointer: 0 , $ ; main_loop_cnt_MSB: 0B , $ ; main_loop_cnt_LSW: 0 , $ ; cmds_exe: 0 , $ ; cmds_rej: 0 , $ ; good_fcs_pck_rcvd: 0 , $ ; bad_fcs_pck_rcvd: 0 , $ ; recon_vector: 0 , $ ; B cfg_byte_last_init: 0B , $ ; cfg_byte_crd_port: 0B , $ ; app_code_checksum: 0 , $ ; p0_shed_dlay: 0 , $ ; eps_msg: 0B , $ ; ld_shed: 0L , $ ; dod_shed_thold: bytarr(2) , $ ; ave_bat_dod: 0B , $ ; pm_relay_repick_cntr: 0B , $ ; ichg_compensation: bytarr(2) , $ ; temp_comp_100_dod_pres: 0B , $ ; lcm1_cur_sens_temp: bytarr(4) , $ ; lcm1_cur_5v_ref_volt: 0B , $ ; lcm2_cur_sens_temp: bytarr(4) , $ ; lcm2_cur_5v_ref_volt: 0B , $ ; sa_cur: bytarr(5) , $ ; sa_temp: bytarr(4) , $ ; B batt: {batt_struct}, $ ; phoen_mode_flag: 0B , $ ; sa_output_volt: 0B , $ ; bcr_cur_sen_temp: 0B , $ ; pm: {pm_struct} , $ ; lcm_1_total_load_cur: 0B , $ ; lcm_2_total_load_cur: 0B , $ ; bcr_pwm0_val: 0B , $ ; bcr_pwm1_val: 0B , $ ; bcr_mode: 0B , $ ; bcr_swreg: 0B , $ ; max_chg_rate: 0B , $ ; trickle_chg_rate: 0B , $ ; bat1_full_chg_pres_set: 0B , $ ; bat2_full_chg_pres_set: 0B , $ ; A battery_map: bytarr(4) , $ ; recon_status: 0B , $ ; batt_raw_status: bytarr(4) , $ ; temp_sen_failure_count: 0 , $ ; batt_htr_status: bytarr(4) , $ ; pm_htr_status: 0B , $ ; crd_a_status: 0B , $ ; crd_a_ld_cur: 0B , $ ; fdr_a_status: 0B , $ ; fdr_a_ld_cur: 0B , $ ; gps_a_status: 0B , $ ; gps_a_ld_cur: 0B , $ ; b1p1_sg_coef: 0 , $ ; scc_a_status: 0B , $ ; scc_a_ld_cur: 0B , $ ; rxs_a_status: 0B , $ ; rxs_a_ld_cur: 0B , $ ; ace_a_status: 0B , $ ; ace_a_ld_cur: 0B , $ ; b1p2_sg_coef: 0 , $ ; txl_a_status: 0B , $ ; txl_a_ld_cur: 0B , $ ; txs_a_status: 0B , $ ; txs_a_ld_cur: 0B , $ ; sw_crit_a_status: 0B , $ ; sw_crit_a_ld_cur: 0B , $ ; sw_ncrit_a_status: 0B , $ ; sw_ncrit_a_ld_cur: 0B , $ ; smu_loads_a_status: 0B , $ ; smu_loads_a_ld_cur: 0B , $ ; siu_sib_a_status: 0B , $ ; siu_sib_a_ld_cur: 0B , $ ; smu_elec_a_status: 0B , $ ; smu_elec_a_ld_cur: 0B , $ ; b2p1_sg_coef: 0 , $ ; crd_b_status: 0B , $ ; crd_b_ld_cur: 0B , $ ; fdr_b_status: 0B , $ ; fdr_b_ld_cur: 0B , $ ; gps_b_status: 0B , $ ; gps_b_ld_cur: 0B , $ ; b2p2_sg_coef: 0 , $ ; scc_b_status: 0B , $ ; scc_b_ld_cur: 0B , $ ; rxs_b_status: 0B , $ ; rxs_b_ld_cur: 0B , $ ; ace_b_status: 0B , $ ; ace_b_ld_cur: 0B , $ ; spare_1: 0 , $ ; txl_b_status: 0B , $ ; txl_b_ld_cur: 0B , $ ; txs_b_status: 0B , $ ; txs_b_ld_cur: 0B , $ ; sw_crit_b_status: 0B , $ ; sw_crit_b_ld_cur: 0B , $ ; sw_ncrit_b_status: 0B , $ ; sw_ncrit_b_ld_cur: 0B , $ ; smu_loads_b_status: 0B , $ ; smu_loads_b_ld_cur: 0B , $ ; siu_sib_b_status: 0B , $ ; siu_sib_b_ld_cur: 0B , $ ; smu_elec_b_status: 0B , $ ; smu_elec_b_ld_cur: 0B , $ ; batt_taper_chrg_ceil: bytarr(2) , $ ; batt_temp_compd_full: bytarr(2) , $ ; batt_ltc_temp_coef: intarr(2) , $ ; fcs_1: 0 , $ ; pkt_year: 0B , $ ; pkt_month: 0B , $ ; pkt_day: 0B , $ ; pkt_hour: 0B , $ ; pkt_minute: 0B , $ ; pkt_second: 0B , $ ; pad: 0 , $ ; crc: 0 } defined = 1 endif if ( n_elements(nstruct) ne 1 ) then nstruct = 1 return, replicate( { eps_struct }, nstruct ) end