/*
 * evo_b1553_bite_strings.h
 *
 */

#ifndef EVO_B1553_BITE_STRINGS_H_
#define EVO_B1553_BITE_STRINGS_H_

#include "evo_b1553_bite_defines.h"

namespace icd1553
{

#define LCU_LOC_STR_0	"CHASSIS"
#define LCU_LOC_STR_1	"CTRL"
#define LCU_LOC_STR_2	"MOTOR"
#define LCU_LOC_STR_3	"FILTER",
#define LCU_LOC_STR_4	"AESA-S"
#define LCU_LOC_STR_5	"PPS-S"
#define LCU_LOC_STR_6	"PWRIN"
#define LCU_LOC_STR_7	"AIRIN"
#define LCU_LOC_STR_8	"AIROUT"

#define LCU_TR_STR_0	"BITE"
#define LCU_TR_STR_1	"HAZ"
#define LCU_TR_STR_2	"PHA"
#define LCU_TR_STR_3	"PHB"
#define LCU_TR_STR_4	"PHC"
#define LCU_TR_STR_5	"PHS"
#define LCU_TR_STR_6	"BOARD"
#define LCU_TR_STR_7	"LINK"
#define LCU_TR_STR_8	"MOTOR"
#define LCU_TR_STR_9	"M-HAZ"
#define LCU_TR_STR_10	"AESA-IN"
#define LCU_TR_STR_11	"AESA-OUT"
#define LCU_TR_STR_12	"TEMP-IN"
#define LCU_TR_STR_13	"TEMP-OUT"
#define LCU_TR_STR_14	"FILTER"
#define LCU_TR_STR_15	"AESA-S"

#define LCU_TR1_STR_0	"PRESS-S"
#define LCU_TR1_STR_1	"MSPEED-S"
#define LCU_TR1_STR_2	"MTEMP-S"
#define LCU_TR1_STR_3	"TAESA-S"
#define LCU_TR1_STR_4	"TPPS-S"
#define LCU_TR1_STR_5	"TCOMBO-S"
#define LCU_TR1_STR_6	"BOARD"
#define LCU_TR1_STR_7	"LINK"
#define LCU_TR1_STR_8	"MOTOR"
#define LCU_TR1_STR_9	"M-HAZ"
#define LCU_TR1_STR_10	"AESA-IN"
#define LCU_TR1_STR_11	"AESA-OUT"
#define LCU_TR1_STR_12	"TEMP-IN"
#define LCU_TR1_STR_13	"TEMP-OUT"
#define LCU_TR1_STR_14	"FILTER"
#define LCU_TR1_STR_15	"AESA-S"

struct bite_info_string_t
{
	const char* name;
	const char* description;
	const char* localization;
};
struct bite_info_string_set_t
{
    const char* lru_name;
    unsigned int lru_number;
	unsigned int loc_index;
	bite_info_string_t str[16];
    unsigned int tr_index[6];
    const char* tr_str[6];
    bite_info_string_t tr[6][16];
};

static const bite_info_string_set_t rep_loc_str=
{
        "REP", 2,
	b_loc_rep,
    {
	{"CHASSIS"},
	{"PSM", "Primary Power Supply"},
	{"EIF", "External Interface"},
	{"XIF1", "Extension Board 1"},
	{"XIF2", "Extension Board 2"},
	{"DFE", "Data Processor"},
	{"DC1", "Down Converter 1"},
	{"DC2", "Down Converter 2"},
	{"DC3", "Down Converter 3"},
        {"SYNT", "Synthesizer"},
        {"EXC", "Exciter"},
	{"PPS", "PPS Connection"},
	{"AESA", "AESA Connection"},
        {"1553", "1553 BUS"}
    },
    {b_tr_rep, b_tr_dsp, b_tr_psm_1, b_tr_psm_2, b_tr_rep_ext, b_tr_system},
    {"REP1","DSP", "PSM1", "PSM2", "REP2", "SYS"},
		{
			{
				{"UC-IF"},
				{"PSM-IF"},
				{"PPS-IF"},
				{"LCU-IF"},
				{"AESA-IF"},
				{"S1553"},
				{"TTAG"},
				{"BATCH"},
				{"SIG"},
				{"SRIO"},
                {"SWWD","Software watchdog"},
				{"CLNK-DC","Down Converters Control link"},
                {"CLNK-ES","Exciter Synch Control link"},
                {"WOW", "WoW Fail"},
                {0},
				{"CPU"}	
			},
			{//DSP
				{"UC-IF"},
				{0},
				{0},
				{0},
				{0},
				{0},
				{"TTAG"},
				{"BATCH"},
				{"SIGNAL"},
				{"SRIO"},
                                {0},
				{0},
                                {0},
                                {0},{0},
				{"CPU"}	
			},
        {//PSM1
                {"BITE", "CBIT fail"},
                {"WARN", "Overtemp warning"},
                {"HAZ", "Board overtemp hazard"},
                {"HAZ2", "Overtemp hazard"},
                {"DCOV", "DC Bus current overvoltage"},
                {"M15VOV", "M15V overvoltage"},
                {"M15VUV", "M15V undervoltage"},
                {"15VOV", "15V overvoltage"},
                {"15VUV", "15V undervoltage"},
                {"5VOV", "M15V overvoltage"},
                {"5VUV", "M15V undervoltage"},
                {"LCURDY", "LCU Ready Fail"},
                {"ACLOSS", "AC Loss"},				
                {"270UV", "250V Under voltage"},
                {"PWRERR", "Power Error"},
				{"RDRON", "Radar On fail"}
        },
        {//PSM2
                {"3V3OV", "3.3V overvoltage"},
                {"3V3UV", "3.3V undervoltage"},
                {"13VOV", "13V overvoltage"},
                {"13VUV", "13V undervoltage"},
                {"350VOV", "13V overvoltage"},
                {"350VUV", "13V undervoltage"},
                {"BLKO", "Blanking-Out Fail"},
                {"PhA"},
                {"PhB"},
                {"PhC"},
                {"EIFCOM", "Error communicaitn with EIF"},
                {0},
                {0},
                {0},{0},
                {0}
        },
        {//REP2
                {0, 0}
        },
		
        {//SYS
                {"STC", "STC Fail"},
                {"NAGC", "NAGC Fail"},
                {"CAL1"},
                {"CAL2", ""},
                {"CH1", "D Delta"},
                {"CH2", "Sum"},
                {"CH3", "A3"},
                {"CH4", "A2"},
                {"CH5", "Delta AZ"},
                {"CH6", "A4"},
                {"CH7", "A1"},
                {"CH8", "Delta EL"},
                {"CH9", "Guard (RX G)"},
                {"CHHR", "High resolution channel fail"}
        }
		}
};

static const bite_info_string_set_t rep_ext_loc_str=
{
        "REP+", 2,
	b_loc_rep_plus,
    {
        {"EIF-C", "EIF Carrier"},
        {"EIF-DSP"},
        {"EIF-ZYNQ"},
        {"XIF1-C", "Carrier Extension Board 1"},
        {"XIF1-DSP0"},
        {"XIF1-DSP1"},
        {"XIF2-C", "Carrier Extension Board 2"},
        {"XIF2-DSP0"},
        {"XIF2-DSP1"},
        {"DFE-C", "DFE Carrier"},
        {"DFE-X"},
        {"DFE-ZYNQ"},
    },
	{0, 0}
};

static const bite_info_string_set_t lcu_loc_str=
{
    "LCU", 4,
	b_loc_lcu,
    {
	{"CHASSIS"},
	{"CTRL", "Overall fail "},
	{"MOTOR", "Motor speed or temperature"},
	{"FILTER", "dirty filter warn or fail"},
	{"AESA-S", "AESA Stream"},
	{"PPS-S", "PPS Stream"},
	{"PWRIN", "Power Input"},
	{"AIRIN", "Inlet air"},
	{"AIROUT", "Outlet air"}
    },
        {b_tr_lcu_1, b_tr_lcu_2},
        {"LCU1","LCU2"},
		{
			{
				{"BITE", "CBIT", "Chassis"},
                {"HAZ", "Board Temperature Hazard", "Chassis"},
                {"PhA", "Phase A", "Power Input"},
                {"PhB", "Phase B", "Power Input"},
                {"PhC", "Phase C", "Power Input"},
				{"PhS", "Phase Sequence", "Power Input"},
                {"BOARD", "Control Board", "Control Board"},
                {"LINK", "RS485 Link", "Control Board"},
                {"MOTOR", "Motor", "Motor"},
                {"M-HAZ", "Motor Hazard", "Motor"},
                {"AESA-IN", "AESA Inlet flow", "AESA Streem"},
                {"PPS-IN", "PPS Inlet flow", "PPS Stream"},
                {"TEMP-IN", "Air temperature inlet"},
                {"TEMP-OUT", "Air temperature outlet"},
                {"FILTER", "Dirty Filter", "Filter"},
				{"ASEA-S", "AESA stream"}
			},
			{
				{"PRESS-S", "Pressure sensor"},
				{"MSPEED-S", "Motor Speed sensor", "Motor"},
				{"MTEMP-S", "Motor temp sensor", "Motor"},
				{"TAESA-S", "AESA inlet temperature sensor"},
				{"TPPS-S", "PPS inlet temperature sensor"},
                {"TCOMBO-S", "Combo inlet temperature sensor"},
				{"TOUT-S", "Outlet temperature sensor"},
				{"BYPASS", "By-Pass"}
			}
		}
};

static const bite_info_string_set_t pps_loc_str=
{
    "PPS", 3,

	b_loc_pps,
    {
	{"CHASSIS"},
	{"HUP","A2"},
        {"RX","A3"},
        {"INFILT","A4"},
	{"TX1", "A5"},
	{"TX2", "A6"},
	{"TX3", "A7"},
	{"EXT", "External I/F"},
	{"PWIN", "External Power"}
    },
        {b_tr_pps_1, b_tr_pps_2},
        {"PSM1","PSM2"},
		{
			{
				{"BITE", "CBIT Result (GO/NOGO)", "A2: RX"},
				{"WOW"},
				{"RXLNK", "RX Link Fail"},
				{"DC-IN", "RX Input DC Overcurrent Fail"},
				{"ACLOSS", "RX Rectified DC Under-Voltage Fail ac power loss", "Input-Filter + Chassis"},
				{"RXOV", "Output RX Over Voltage Fail"},
				{"RXUV", "Output RX Under Voltage Fail"},
				{"HAZ", "Over temperature Hazard"},
				{"LPUV", "HoldUp LP Under-Voltage Fail", "Input Filter"},
				{"HPUV", "HoldUp HP Under-Voltage Fail", "HOLD-UP"},
                {"PH1", "AC Power Unbalance Fail (Ph1)", "Input-Filter + Chassis"},
				{"PH2", "AC Power Unbalance Fail (Ph2)", "Input-Filter + Chassis"},
                {"PH3", "AC Power Unbalance Fail (Ph3)", "Input-Filter + Chassis"},
                {"TX1LNK", "TX1 Link Fail"},
                {"TX2LNK", "TX2 Link Fail"},
                {"TX3LNK", "TX3 Link Fail"}
			},
			{
				{"TX1DCOC"},
				{"TX1DCUV"},
				{"TX1OV"},
				{"TX1UV"},
				{"TX1HAZ"},
				
				{"TX2DCOC"},
				{"TX2DCUV"},
				{"TX2OV"},
				{"TX2UV"},
				{"TX2HAZ"},

				{"TX3DCOC"},
				{"TX3DCUV"},
				{"TX3OV"},
				{"TX3UV"},
				{"TX3HAZ"}				
			}
		}
};


static const bite_info_string_set_t aesa_loc_str=
{
    "AESA", 1,
        b_loc_aesa,
    {
        {"CHASSIS"},
        {"CTI"},
        {"AESA"},
        {"RFIF"},
        {"PLANK", "Any Plank"},
        {"TRC", "Any TRC"}
    },
        {b_tr_aesa_1, b_tr_aesa_2},
        {"TR1","TR2"},
                {
                        {
                                {"BITE", "AESA reported failure"},
                        },
                        {
                                {"?"},
                        }
                }
};

}//namespace icd1553

#endif /* EVO_B1553_BITE_STRINGS_H_ */
