private void DisplayCAT48I240Data()
{
if (MainASTERIXDataStorage.CAT48Message.Count > 0)
{
this.listBoxMainDataBox.Items.Add("Detailed view of: " + MainASTERIXDataStorage.CAT48Message[0].CAT48DataItems[CAT48.ItemIDToIndex("240")].Description);
ASTERIX.SIC_SAC_Time SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)MainASTERIXDataStorage.CAT48Message[0].CAT48DataItems[CAT48.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.CAT48Data Msg in MainASTERIXDataStorage.CAT48Message)
{
if (Msg.CAT48DataItems[CAT48.ItemIDToIndex("240")].value != null)
{
SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)Msg.CAT48DataItems[CAT48.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);
CAT48I240Types.CAT48I240ACID_Data ACID_String = (CAT48I240Types.CAT48I240ACID_Data)Msg.CAT48DataItems[CAT48.ItemIDToIndex("240")].value;
this.listBoxMainDataBox.Items.Add("\t" + "Callsign:" + ACID_String.ACID);
this.listBoxMainDataBox.Items.Add(" ");
}
}
}
else
{
this.listBoxMainDataBox.Items.Add("No data of this CAT/Item was received !!!");
}
}