mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
INetwork builds up the ATIS as it is received, line-by-line, keeping this implementation detail more encapsulated
refs #81
This commit is contained in:
@@ -594,7 +594,18 @@ namespace BlackCore
|
||||
|
||||
void CNetworkVatlib::onAtisReplyReceived(Cvatlib_Network *, const char *callsign, Cvatlib_Network::atisLineType lineType, const char *data, void *cbvar)
|
||||
{
|
||||
emit cbvar_cast(cbvar)->atisQueryReplyReceived(cbvar_cast(cbvar)->fromFSD(callsign), cbvar_cast(cbvar)->fromFSD(data));
|
||||
auto &atis = cbvar_cast(cbvar)->m_atisParts[cbvar_cast(cbvar)->fromFSD(callsign)];
|
||||
|
||||
if (lineType == Cvatlib_Network::atisLineType_LineCount)
|
||||
{
|
||||
atis.setType(CInformationMessage::ATIS);
|
||||
emit cbvar_cast(cbvar)->atisQueryReplyReceived(cbvar_cast(cbvar)->fromFSD(callsign), atis);
|
||||
cbvar_cast(cbvar)->m_atisParts.remove(cbvar_cast(cbvar)->fromFSD(callsign));
|
||||
}
|
||||
else
|
||||
{
|
||||
atis.appendMessage("\n" + cbvar_cast(cbvar)->fromFSD(data));
|
||||
}
|
||||
}
|
||||
|
||||
void CNetworkVatlib::onTemperatureDataReceived(Cvatlib_Network *, Cvatlib_Network::TempLayer /** layers **/ [4], INT /** pressure **/, void * /** cbvar **/)
|
||||
|
||||
Reference in New Issue
Block a user