Pass through new GPS and TA data.

This commit is contained in:
Jonathan Naylor
2017-05-17 18:58:46 +01:00
parent 5eff056ed0
commit 90f5e17be9
8 changed files with 115 additions and 6 deletions

View File

@@ -226,6 +226,38 @@ bool CDMRNetwork::write(const CDMRData& data)
return true;
}
bool CDMRNetwork::writePosition(const unsigned char* data, unsigned int length)
{
if (m_status != RUNNING)
return false;
unsigned char buffer[50U];
::memcpy(buffer + 0U, "DMRG", 4U);
::memcpy(buffer + 4U, m_id, 4U);
::memcpy(buffer + 8U, data + 8U, length - 8U);
return write(buffer, length);
}
bool CDMRNetwork::writeTalkerAlias(const unsigned char* data, unsigned int length)
{
if (m_status != RUNNING)
return false;
unsigned char buffer[50U];
::memcpy(buffer + 0U, "DMRA", 4U);
::memcpy(buffer + 4U, m_id, 4U);
::memcpy(buffer + 8U, data + 8U, length - 8U);
return write(buffer, length);
}
void CDMRNetwork::close()
{
LogMessage("%s, Closing DMR Network", m_name);