Skip to content

Commit

Permalink
Emergency call CSBK support.
Browse files Browse the repository at this point in the history
  • Loading branch information
rick51231 committed Dec 15, 2022
1 parent e812e90 commit ecf21f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DMRCSBK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ bool CDMRCSBK::put(const unsigned char* bytes)
m_CBF = 0U;
break;

case CSBKO_CALL_EMERGENCY:
m_GI = true;
m_dstId = m_data[4U] << 16 | m_data[5U] << 8 | m_data[6U];
m_srcId = m_data[7U] << 16 | m_data[8U] << 8 | m_data[9U];
m_dataContent = false;
m_CBF = 0U;
CUtils::dump(1U, "Call Emergency CSBK", m_data, 12U);
break;

default:
m_GI = false;
m_srcId = 0U;
Expand Down
1 change: 1 addition & 0 deletions DMRCSBK.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum CSBKO {
CSBKO_CALL_ALERT_ACK = 0x20,
CSBKO_RADIO_CHECK = 0x24,
CSBKO_NACKRSP = 0x26,
CSBKO_CALL_EMERGENCY = 0x27,
CSBKO_BSDWNACT = 0x38,
CSBKO_PRECCSBK = 0x3D
};
Expand Down
3 changes: 3 additions & 0 deletions DMRSlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
case CSBKO_RADIO_CHECK:
LogMessage("DMR Slot %u, received RF Radio Check %s CSBK from %s to %s%s", m_slotNo, /* TBD */ 1 ? "Req" : "Ack", src.c_str(), gi ? "TG " : "", dst.c_str());
break;
case CSBKO_CALL_EMERGENCY:
LogMessage("DMR Slot %u, received RF Call Emergency CSBK from %s to %s%s", m_slotNo, src.c_str(), gi ? "TG " : "", dst.c_str());
break;
default:
LogWarning("DMR Slot %u, unhandled RF CSBK type - 0x%02X", m_slotNo, csbko);
break;
Expand Down

0 comments on commit ecf21f9

Please sign in to comment.