mirror of
https://github.com/ShaYmez/xlxd.git
synced 2024-11-16 05:01:49 -05:00
Make DMRmmdvm and DMRplus node module Id configurable
This commit is contained in:
parent
e7b9123409
commit
c909cfbea8
@ -511,7 +511,7 @@ bool CDmrmmdvmProtocol::IsValidKeepAlivePacket(const CBuffer &Buffer, CCallsign
|
||||
{
|
||||
uint32 uiRptrId = MAKEDWORD(MAKEWORD(Buffer.data()[10],Buffer.data()[9]),MAKEWORD(Buffer.data()[8],Buffer.data()[7]));
|
||||
callsign->SetDmrid(uiRptrId, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(MMDVM_MODULE_ID);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
return valid;
|
||||
@ -526,7 +526,7 @@ bool CDmrmmdvmProtocol::IsValidConnectPacket(const CBuffer &Buffer, CCallsign *c
|
||||
{
|
||||
uint32 uiRptrId = MAKEDWORD(MAKEWORD(Buffer.data()[7],Buffer.data()[6]),MAKEWORD(Buffer.data()[5],Buffer.data()[4]));
|
||||
callsign->SetDmrid(uiRptrId, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(MMDVM_MODULE_ID);
|
||||
valid = callsign->IsValid();
|
||||
if ( !valid)
|
||||
{
|
||||
@ -545,7 +545,7 @@ bool CDmrmmdvmProtocol::IsValidAuthenticationPacket(const CBuffer &Buffer, CCall
|
||||
{
|
||||
uint32 uiRptrId = MAKEDWORD(MAKEWORD(Buffer.data()[7],Buffer.data()[6]),MAKEWORD(Buffer.data()[5],Buffer.data()[4]));
|
||||
callsign->SetDmrid(uiRptrId, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(MMDVM_MODULE_ID);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
return valid;
|
||||
@ -560,7 +560,7 @@ bool CDmrmmdvmProtocol::IsValidDisconnectPacket(const CBuffer &Buffer, CCallsign
|
||||
{
|
||||
uint32 uiRptrId = MAKEDWORD(MAKEWORD(Buffer.data()[7],Buffer.data()[6]),MAKEWORD(Buffer.data()[5],Buffer.data()[4]));
|
||||
callsign->SetDmrid(uiRptrId, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(MMDVM_MODULE_ID);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
return valid;
|
||||
@ -575,7 +575,7 @@ bool CDmrmmdvmProtocol::IsValidConfigPacket(const CBuffer &Buffer, CCallsign *ca
|
||||
{
|
||||
uint32 uiRptrId = MAKEDWORD(MAKEWORD(Buffer.data()[7],Buffer.data()[6]),MAKEWORD(Buffer.data()[5],Buffer.data()[4]));
|
||||
callsign->SetDmrid(uiRptrId, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(MMDVM_MODULE_ID);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
return valid;
|
||||
@ -590,7 +590,7 @@ bool CDmrmmdvmProtocol::IsValidOptionPacket(const CBuffer &Buffer, CCallsign *ca
|
||||
{
|
||||
uint32 uiRptrId = MAKEDWORD(MAKEWORD(Buffer.data()[7],Buffer.data()[6]),MAKEWORD(Buffer.data()[5],Buffer.data()[4]));
|
||||
callsign->SetDmrid(uiRptrId, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(MMDVM_MODULE_ID);
|
||||
valid = callsign->IsValid();
|
||||
}
|
||||
return valid;
|
||||
@ -673,7 +673,7 @@ bool CDmrmmdvmProtocol::IsValidDvHeaderPacket(const CBuffer &Buffer, CDvHeaderPa
|
||||
// build DVHeader
|
||||
CCallsign csMY = CCallsign("", uiSrcId);
|
||||
CCallsign rpt1 = CCallsign("", uiRptrId);
|
||||
rpt1.SetModule('B');
|
||||
rpt1.SetModule(MMDVM_MODULE_ID);
|
||||
CCallsign rpt2 = m_ReflectorCallsign;
|
||||
rpt2.SetModule(DmrDstIdToModule(uiDstId));
|
||||
|
||||
|
@ -43,6 +43,9 @@
|
||||
#define MMDVM_SLOTTYPE_HEADER 1
|
||||
#define MMDVM_SLOTTYPE_TERMINATOR 2
|
||||
|
||||
// DMRMMDVM Module ID
|
||||
#define MMDVM_MODULE_ID "B"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class
|
||||
|
||||
|
@ -414,7 +414,7 @@ bool CDmrplusProtocol::IsValidConnectPacket(const CBuffer &Buffer, CCallsign *ca
|
||||
sz[8] = 0;
|
||||
uint32 dmrid = atoi(sz);
|
||||
callsign->SetDmrid(dmrid, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(DMRPLUS_MODULE_ID);
|
||||
::memcpy(sz, &Buffer.data()[8], 4);
|
||||
sz[4] = 0;
|
||||
*reflectormodule = DmrDstIdToModule(atoi(sz));
|
||||
@ -437,7 +437,7 @@ bool CDmrplusProtocol::IsValidDisconnectPacket(const CBuffer &Buffer, CCallsign
|
||||
sz[8] = 0;
|
||||
uint32 dmrid = atoi(sz);
|
||||
callsign->SetDmrid(dmrid, true);
|
||||
callsign->SetModule('B');
|
||||
callsign->SetModule(DMRPLUS_MODULE_ID);
|
||||
*reflectormodule = Buffer.data()[11] - '0' + 'A';
|
||||
valid = (callsign->IsValid() && std::isupper(*reflectormodule));
|
||||
}
|
||||
@ -467,7 +467,7 @@ bool CDmrplusProtocol::IsValidDvHeaderPacket(const CIp &Ip, const CBuffer &Buffe
|
||||
// build DVHeader
|
||||
CCallsign csMY = CCallsign("", uiSrcId);
|
||||
CCallsign rpt1 = CCallsign("", uiSrcId);
|
||||
rpt1.SetModule('B');
|
||||
rpt1.SetModule(DMRPLUS_MODULE_ID);
|
||||
CCallsign rpt2 = m_ReflectorCallsign;
|
||||
rpt2.SetModule(DmrDstIdToModule(uiDstId));
|
||||
uint32 uiStreamId = IpToStreamId(Ip);
|
||||
|
@ -34,6 +34,9 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// define
|
||||
|
||||
// DMR Plus Module ID
|
||||
#define DMRPLUS_MODULE_ID "B"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// class
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user