private void DisplayCAT48I070Data()
{
if (MainASTERIXDataStorage.CAT48Message.Count > 0)
{
this.listBoxMainDataBox.Items.Add("Detailed view of: " + MainASTERIXDataStorage.CAT48Message[0].CAT48DataItems[CAT48.ItemIDToIndex("070")].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("070")].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);
CAT48I070Types.CAT48I070Mode3UserData MyData = (CAT48I070Types.CAT48I070Mode3UserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("070")].value;
this.listBoxMainDataBox.Items.Add("\t" + MyData.Code_Validated.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Code_Garbled.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Code_Smothed_Or_From_Transponder.ToString());
this.listBoxMainDataBox.Items.Add("\t" + MyData.Mode3A_Code.ToString());
this.listBoxMainDataBox.Items.Add(" ");
}
}
}
else
{
this.listBoxMainDataBox.Items.Add("No data of this CAT/Item was received !!!");
}
}