private void DisplayCAT01I020Data()
{
if (MainASTERIXDataStorage.CAT01Message.Count > 0)
{
this.listBoxMainDataBox.Items.Add("Detailed view of: " + MainASTERIXDataStorage.CAT01Message[0].CAT01DataItems[CAT01.ItemIDToIndex("020")].Description);
ASTERIX.SIC_SAC_Time SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)MainASTERIXDataStorage.CAT01Message[0].CAT01DataItems[CAT01.ItemIDToIndex("010")].value;
this.listBoxMainDataBox.Items.Add("SIC/SAC: " + SIC_SAC_TIME.SIC.ToString() + "/" + SIC_SAC_TIME.SAC.ToString());
this.listBoxMainDataBox.Items.Add(" ");
// Here determine the flag indicating what data is to be shown
foreach (MainASTERIXDataStorage.CAT01Data Msg in MainASTERIXDataStorage.CAT01Message)
{
if (Msg.CAT01DataItems[CAT01.ItemIDToIndex("020")].value != null)
{
SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)Msg.CAT01DataItems[CAT01.ItemIDToIndex("010")].value;
// Display time
string Time = SIC_SAC_TIME.TimeofReception.Hour.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Minute.ToString().PadLeft(2, '0') + ":" +
SIC_SAC_TIME.TimeofReception.Second.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Millisecond.ToString().PadLeft(3, '0');
this.listBoxMainDataBox.Items.Add("Rcvd Time: " + Time);
CAT01I020UserData MyData = (CAT01I020UserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("020")].value;
this.listBoxMainDataBox.Items.Add("\t" + MyData.Type_Of_Report.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Simulated_Or_Actual_Report.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Type_Of_Radar_Detection.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Antena_Source.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Special_Position_Ind.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Data_Is_From_FFT.ToString());
if (MyData.Next_Extension_1 == CAT01I020Types.Next_Extension_Type.Yes)
{
this.listBoxMainDataBox.Items.Add(" *** Extension fields *** ");
this.listBoxMainDataBox.Items.Add("\t" + MyData.Is_Test_Target_Indicator.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Special_SSR_Codes.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Is_Military_Emergency.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Is_Military_Identification.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Next_Extension_2.ToString());
}
this.listBoxMainDataBox.Items.Add(" ");
}
}
}
else
{
this.listBoxMainDataBox.Items.Add("No data of this CAT/Item was received !!!");
}
}