mirror of
https://github.com/nostar/urfd.git
synced 2026-11-08 12:26:46 +00:00
rename {Get,Set}Module
This commit is contained in:
1 parent
7f81e70233
commit
da6404535e
21 files changed
+79
-79
No files matched your search
@@ -226,7 +226,7 @@ void CDcsProtocol::HandleQueue(void)
|
||||
auto packet = m_Queue.pop();
|
||||
|
||||
// get our sender's id
|
||||
const auto module = packet->GetModule();
|
||||
const auto module = packet->GetPacketModule();
|
||||
|
||||
// check if it's header and update cache
|
||||
if ( packet->IsDvHeader() )
|
||||
@@ -330,7 +330,7 @@ bool CDcsProtocol::IsValidConnectPacket(const CBuffer &Buffer, CCallsign *callsi
|
||||
if ( Buffer.size() == 519 )
|
||||
{
|
||||
callsign->SetCallsign(Buffer.data(), 8);
|
||||
callsign->SetModule(Buffer.data()[8]);
|
||||
callsign->SetCSModule(Buffer.data()[8]);
|
||||
*reflectormodule = Buffer.data()[9];
|
||||
valid = (callsign->IsValid() && IsLetter(*reflectormodule));
|
||||
}
|
||||
@@ -343,13 +343,13 @@ bool CDcsProtocol::IsValidDisconnectPacket(const CBuffer &Buffer, CCallsign *cal
|
||||
if ((Buffer.size() == 11) && (Buffer.data()[9] == ' '))
|
||||
{
|
||||
callsign->SetCallsign(Buffer.data(), 8);
|
||||
callsign->SetModule(Buffer.data()[8]);
|
||||
callsign->SetCSModule(Buffer.data()[8]);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
else if ((Buffer.size() == 19) && (Buffer.data()[9] == ' ') && (Buffer.data()[10] == 0x00))
|
||||
{
|
||||
callsign->SetCallsign(Buffer.data(), 8);
|
||||
callsign->SetModule(Buffer.data()[8]);
|
||||
callsign->SetCSModule(Buffer.data()[8]);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
return valid;
|
||||
@@ -411,8 +411,8 @@ void CDcsProtocol::EncodeKeepAlivePacket(CBuffer *Buffer, std::shared_ptr<CClien
|
||||
Buffer->Append((uint8_t)Client->GetReflectorModule());
|
||||
Buffer->Append((uint8_t)' ');
|
||||
Buffer->Append((uint8_t *)(const char *)Client->GetCallsign(), CALLSIGN_LEN-1);
|
||||
Buffer->Append((uint8_t)Client->GetModule());
|
||||
Buffer->Append((uint8_t)Client->GetModule());
|
||||
Buffer->Append((uint8_t)Client->GetCSModule());
|
||||
Buffer->Append((uint8_t)Client->GetCSModule());
|
||||
Buffer->Append(tag, sizeof(tag));
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ void CDcsProtocol::EncodeConnectAckPacket(const CCallsign &Callsign, char Reflec
|
||||
Callsign.GetCallsign(cs);
|
||||
Buffer->Set(cs, CALLSIGN_LEN-1);
|
||||
Buffer->Append((uint8_t)' ');
|
||||
Buffer->Append((uint8_t)Callsign.GetModule());
|
||||
Buffer->Append((uint8_t)Callsign.GetCSModule());
|
||||
Buffer->Append((uint8_t)ReflectorModule);
|
||||
Buffer->Append(tag, sizeof(tag));
|
||||
}
|
||||
@@ -437,7 +437,7 @@ void CDcsProtocol::EncodeConnectNackPacket(const CCallsign &Callsign, char Refle
|
||||
Callsign.GetCallsign(cs);
|
||||
Buffer->Set(cs, CALLSIGN_LEN-1);
|
||||
Buffer->Append((uint8_t)' ');
|
||||
Buffer->Append((uint8_t)Callsign.GetModule());
|
||||
Buffer->Append((uint8_t)Callsign.GetCSModule());
|
||||
Buffer->Append((uint8_t)ReflectorModule);
|
||||
Buffer->Append(tag, sizeof(tag));
|
||||
}
|
||||
@@ -446,7 +446,7 @@ void CDcsProtocol::EncodeDisconnectPacket(CBuffer *Buffer, std::shared_ptr<CClie
|
||||
{
|
||||
Buffer->Set((uint8_t *)(const char *)Client->GetCallsign(), CALLSIGN_LEN-1);
|
||||
Buffer->Append((uint8_t)' ');
|
||||
Buffer->Append((uint8_t)Client->GetModule());
|
||||
Buffer->Append((uint8_t)Client->GetCSModule());
|
||||
Buffer->Append((uint8_t)0x00);
|
||||
Buffer->Append((uint8_t *)(const char *)GetReflectorCallsign(), CALLSIGN_LEN-1);
|
||||
Buffer->Append((uint8_t)' ');
|
||||
|
||||
Reference in new issue
Block a user