Pass DMR interrupt packets through.

This commit is contained in:
Jonathan Naylor
2019-03-22 09:29:07 +00:00
parent 1491658e8d
commit a07e002c2b
6 changed files with 64 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
* Copyright (C) 2015-2019 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
@@ -276,6 +276,22 @@ bool CDMRNetwork::writeHomePosition(const unsigned char* data, unsigned int leng
return write(buffer, length);
}
bool CDMRNetwork::writeInterrupt(const unsigned char* data, unsigned int length)
{
if (m_status != RUNNING)
return false;
unsigned char buffer[50U];
::memcpy(buffer + 0U, "RPTINTR", 7U);
::memcpy(buffer + 7U, m_id, 4U);
::memcpy(buffer + 11U, data + 11U, length - 11U);
return write(buffer, length);
}
bool CDMRNetwork::isConnected() const
{
return m_status == RUNNING;