add some commenting around newly brought to light information;

3.0-rcon_maint 2023-02-25
Bryan Biedenkapp 3 years ago
parent fed2e66d4f
commit 5c0003a240

@ -73,7 +73,8 @@ namespace p25
const uint32_t P25_DFSI_TSBK_FRAME_LENGTH_BYTES = 25U;
const uint8_t P25_DFSI_STATUS = 0x02U; //
const uint8_t P25_DFSI_STATUS_NO_ERROR = 0x00U; //
const uint8_t P25_DFSI_STATUS_ERASE = 0x02U; //
const uint8_t P25_DFSI_RT_ENABLED = 0x02U; //
const uint8_t P25_DFSI_RT_DISABLED = 0x04U; //

@ -434,7 +434,7 @@ void LC::encodeLDU1(uint8_t* data, const uint8_t* imbe)
dfsiFrame[2U] = m_control->getMFId(); // MFId
dfsiFrame[3U] = serviceOptions; // Service Options
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU1_VOICE4:
@ -444,7 +444,7 @@ void LC::encodeLDU1(uint8_t* data, const uint8_t* imbe)
dfsiFrame[2U] = (dstId >> 8) & 0xFFU;
dfsiFrame[3U] = (dstId >> 0) & 0xFFU;
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU1_VOICE5:
@ -454,25 +454,34 @@ void LC::encodeLDU1(uint8_t* data, const uint8_t* imbe)
dfsiFrame[2U] = (srcId >> 8) & 0xFFU;
dfsiFrame[3U] = (srcId >> 0) & 0xFFU;
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU1_VOICE6:
{
// first 3 bytes of frame are supposed to be
// part of the RS(24, 12, 13) of the VOICE3, 4, and 5 control
// bytes
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU1_VOICE7:
{
// first 3 bytes of frame are supposed to be
// part of the RS(24, 12, 13) of the VOICE3, 4, and 5 control
// bytes
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU1_VOICE8:
{
// first 3 bytes of frame are supposed to be
// part of the RS(24, 12, 13) of the VOICE3, 4, and 5 control
// bytes
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU1_VOICE9:
@ -664,7 +673,7 @@ void LC::encodeLDU2(uint8_t* data, const uint8_t* imbe)
case P25_DFSI_LDU2_VOICE11:
{
::memcpy(dfsiFrame + 1U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[12U] = P25_DFSI_STATUS; // Status
dfsiFrame[12U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE12:
@ -673,7 +682,7 @@ void LC::encodeLDU2(uint8_t* data, const uint8_t* imbe)
dfsiFrame[2U] = mi[1U];
dfsiFrame[3U] = mi[2U];
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE13:
@ -682,7 +691,7 @@ void LC::encodeLDU2(uint8_t* data, const uint8_t* imbe)
dfsiFrame[2U] = mi[4U];
dfsiFrame[3U] = mi[5U];
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE14:
@ -691,29 +700,35 @@ void LC::encodeLDU2(uint8_t* data, const uint8_t* imbe)
dfsiFrame[2U] = mi[7U];
dfsiFrame[3U] = mi[8U];
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE15:
{
dfsiFrame[1U] = m_control->getAlgId(); // Algorithm ID
dfsiFrame[1U] = m_control->getAlgId(); // Algorithm ID
uint32_t kid = m_control->getKId();
dfsiFrame[2U] = (kid >> 8) & 0xFFU; // Key ID
dfsiFrame[3U] = (kid >> 0) & 0xFFU;
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE16:
{
// first 3 bytes of frame are supposed to be
// part of the RS(24, 16, 9) of the VOICE12, 13, 14, 15
// control bytes
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE17:
{
// first 3 bytes of frame are supposed to be
// part of the RS(24, 16, 9) of the VOICE12, 13, 14, 15
// control bytes
::memcpy(dfsiFrame + 5U, imbe, P25_RAW_IMBE_LENGTH_BYTES); // IMBE
dfsiFrame[16U] = P25_DFSI_STATUS; // Status
dfsiFrame[16U] = P25_DFSI_STATUS_ERASE; // Status
}
break;
case P25_DFSI_LDU2_VOICE18:

Loading…
Cancel
Save

Powered by TurnKey Linux.