add support for firmware CACH AT ignore command; properly set DMR site data to require registration of SUs;

2.0-maint
Bryan Biedenkapp 3 years ago
parent cbd3895490
commit fd898994d4

@ -541,6 +541,9 @@ void Slot::setTSCC(bool enable, bool dedicated)
{
m_enableTSCC = enable;
m_dedicatedTSCC = dedicated;
if (m_enableTSCC) {
m_modem->setDMRIgnoreCACH_AT(m_slotNo);
}
}
/// <summary>
@ -622,7 +625,7 @@ void Slot::init(uint32_t colorCode, SiteData siteData, bool embeddedLCOnly, bool
/// <param name="channelNo">Channel Number.</param>
void Slot::setSiteData(uint32_t netId, uint8_t siteId, uint8_t channelId, uint32_t channelNo)
{
m_siteData = SiteData(SITE_MODEL_SMALL, netId, siteId, 3U, false);
m_siteData = SiteData(SITE_MODEL_SMALL, netId, siteId, 3U, true);
m_channelNo = channelNo;
std::vector<lookups::IdenTable> entries = m_idenTable->list();

@ -1651,6 +1651,36 @@ bool Modem::writeDMRAbort(uint32_t slotNo)
#endif // defined(ENABLE_DMR)
}
/// <summary>
/// Sets the ignore flags for setting the CACH Access Type bit on the air interface modem.
/// </summary>
/// <param name="slotNo">DMR slot to set ignore CACH AT flag for.</param>
/// <returns>True, if set flag is written, otherwise false.</returns>
bool Modem::setDMRIgnoreCACH_AT(uint8_t slotNo)
{
#if defined(ENABLE_DMR)
uint8_t buffer[4U];
buffer[0U] = DVM_FRAME_START;
buffer[1U] = 4U;
buffer[2U] = CMD_DMR_CACH_AT_CTRL;
buffer[3U] = slotNo;
// are we on a protocol version 3 firmware?
if (m_protoVer >= 3U) {
#if DEBUG_MODEM
Utils::dump(1U, "Modem::setDMRIgnoreCACH_AT(), Written", buffer, 4U);
#endif
return write(buffer, 4U) == 4;
} else {
LogWarning(LOG_MODEM, "Modem::setDMRIgnoreCACH_AT(), ignoring CACH AT for slot %u is not supported on this modem!", slotNo);
return false;
}
#else
return false;
#endif // defined(ENABLE_DMR)
}
/// <summary>
/// Writes raw data to the air interface modem.
/// </summary>

@ -117,6 +117,7 @@ namespace modem
CMD_DMR_SHORTLC = 0x1CU,
CMD_DMR_START = 0x1DU,
CMD_DMR_ABORT = 0x1EU,
CMD_DMR_CACH_AT_CTRL = 0x1FU,
CMD_P25_DATA = 0x31U,
CMD_P25_LOST = 0x32U,
@ -328,6 +329,8 @@ namespace modem
bool writeDMRShortLC(const uint8_t* lc);
/// <summary>Writes a DMR abort message for the given slot to the air interface modem.</summary>
bool writeDMRAbort(uint32_t slotNo);
/// <summary>Sets the ignore flags for setting the CACH Access Type bit on the air interface modem.</summary>
bool setDMRIgnoreCACH_AT(uint8_t slotNo);
/// <summary>Writes raw data to the air interface modem.</summary>
int write(const uint8_t* data, uint32_t length);

Loading…
Cancel
Save

Powered by TurnKey Linux.