Skip to content

Commit

Permalink
Remove unneeded code.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed May 15, 2017
1 parent 68b8ba0 commit 3ab8bdf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
40 changes: 0 additions & 40 deletions DMRDataHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,46 +166,6 @@ unsigned int CDMRDataHeader::getBlocks() const
return m_blocks;
}

void CDMRDataHeader::getTerminator(unsigned char* bytes) const
{
assert(bytes != NULL);

unsigned char payload[12U];
::memset(payload, 0x00U, 12U);

payload[0U] = m_GI ? FLCO_GROUP : FLCO_USER_USER;

payload[1U] = FID_ETSI;

payload[2U] = (m_dstId >> 16) & 0xFFU;
payload[3U] = (m_dstId >> 8) & 0xFFU;
payload[4U] = (m_dstId >> 0) & 0xFFU;

payload[5U] = (m_srcId >> 16) & 0xFFU;
payload[6U] = (m_srcId >> 8) & 0xFFU;
payload[7U] = (m_srcId >> 0) & 0xFFU;

payload[8U] |= m_GI ? 0x80U : 0x00U;
payload[8U] |= m_A ? 0x40U : 0x00U;
payload[8U] |= m_F ? 0x20U : 0x00U;
payload[8U] |= m_S ? 0x08U : 0x00U;
payload[8U] |= m_Ns & 0x07U;

unsigned char parity[4U];
CRS129::encode(payload, 9U, parity);

payload[9U] = parity[2U] ^ TERMINATOR_WITH_LC_CRC_MASK[0U];
payload[10U] = parity[1U] ^ TERMINATOR_WITH_LC_CRC_MASK[1U];
payload[11U] = parity[0U] ^ TERMINATOR_WITH_LC_CRC_MASK[2U];

CUtils::dump(1U, "Data Terminator payload", payload, 12U);

CBPTC19696 bptc;
bptc.encode(payload, bytes);

CUtils::dump(1U, "Data Terminator bytes", bytes, DMR_FRAME_LENGTH_BYTES);
}

CDMRDataHeader& CDMRDataHeader::operator=(const CDMRDataHeader& header)
{
if (&header != this) {
Expand Down
4 changes: 1 addition & 3 deletions DMRDataHeader.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -29,8 +29,6 @@ class CDMRDataHeader

void get(unsigned char* bytes) const;

void getTerminator(unsigned char* bytes) const;

bool getGI() const;

unsigned int getSrcId() const;
Expand Down

0 comments on commit 3ab8bdf

Please sign in to comment.