Also set the OVCM bit in the two supported CSBKs: "Unit to Unit Voice Service Request CSBK" and "Unit to Unit Voice Service Answer Response CSBK"

This commit is contained in:
Patrick Maier 2019-10-18 19:15:08 +02:00 committed by Patrick Maier
parent 73bf04ad4b
commit 1993262c52
3 changed files with 35 additions and 0 deletions

View file

@ -149,6 +149,31 @@ unsigned char CDMRCSBK::getFID() const
return m_FID; return m_FID;
} }
bool CDMRCSBK::getOVCM() const
{
bool bOVCM = false;
// Service options informations are only available in
// "Unit to Unit Voice Service Request CSBK" and
// "Unit to Unit Voice Service Answer Response CSBK"
if (m_CSBKO == CSBKO_UUVREQ || m_CSBKO == CSBKO_UUANSRSP)
{
bOVCM = (m_data[2U] & 0x04U) == 0x04U;
}
return bOVCM;
}
void CDMRCSBK::setOVCM(bool ovcm)
{
// Set OVCM only in CSBKs having the service options information
if (m_CSBKO == CSBKO_UUVREQ || m_CSBKO == CSBKO_UUANSRSP)
{
if (ovcm)
m_data[2U] |= 0x04U;
else
m_data[2U] &= 0xFBU;
}
}
bool CDMRCSBK::getGI() const bool CDMRCSBK::getGI() const
{ {
return m_GI; return m_GI;

View file

@ -45,6 +45,10 @@ public:
CSBKO getCSBKO() const; CSBKO getCSBKO() const;
unsigned char getFID() const; unsigned char getFID() const;
// Set/Get the OVCM bit in the supported CSBKs
bool getOVCM() const;
void setOVCM(bool ovcm);
// For BS Dwn Act // For BS Dwn Act
unsigned int getBSId() const; unsigned int getBSId() const;

View file

@ -423,6 +423,9 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
if (csbko == CSBKO_BSDWNACT) if (csbko == CSBKO_BSDWNACT)
return false; return false;
// set the OVCM bit for the supported csbk
csbk.setOVCM(m_ovcm);
bool gi = csbk.getGI(); bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId(); unsigned int srcId = csbk.getSrcId();
unsigned int dstId = csbk.getDstId(); unsigned int dstId = csbk.getDstId();
@ -1549,6 +1552,9 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
if (csbko == CSBKO_BSDWNACT) if (csbko == CSBKO_BSDWNACT)
return; return;
// set the OVCM bit for the supported csbk
csbk.setOVCM(m_ovcm);
bool gi = csbk.getGI(); bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId(); unsigned int srcId = csbk.getSrcId();
unsigned int dstId = csbk.getDstId(); unsigned int dstId = csbk.getDstId();