1
0
Fork 0

Reset outgoing DG-IDs to zero for compatibility reasons.

ycs232-kbc
Jonathan Naylor 4 years ago
parent 70f956a0df
commit e6a196f3a7

@ -370,8 +370,13 @@ int CDGIdGateway::run()
if (currentDGId != 0U && dgIdNetwork[currentDGId] != NULL) { if (currentDGId != 0U && dgIdNetwork[currentDGId] != NULL) {
// Only allow the wanted modes through // Only allow the wanted modes through
if ((dgIdNetwork[currentDGId]->m_modes & dt) != 0U) if ((dgIdNetwork[currentDGId]->m_modes & dt) != 0U) {
dgIdNetwork[currentDGId]->write(currentDGId, buffer); // Set the DG-ID to zero for compatibility
fich.setDGId(0U);
fich.encode(buffer + 35U);
dgIdNetwork[currentDGId]->write(currentDGId, dt, buffer);
}
inactivityTimer.setTimeout(dgIdNetwork[currentDGId]->m_rfHangTime); inactivityTimer.setTimeout(dgIdNetwork[currentDGId]->m_rfHangTime);
inactivityTimer.start(); inactivityTimer.start();
@ -396,7 +401,7 @@ int CDGIdGateway::run()
fich.setDGId(i); fich.setDGId(i);
fich.encode(buffer + 35U); fich.encode(buffer + 35U);
rptNetwork.write(0U, buffer); rptNetwork.write(0U, 0U, buffer);
inactivityTimer.setTimeout(dgIdNetwork[i]->m_netHangTime); inactivityTimer.setTimeout(dgIdNetwork[i]->m_netHangTime);
inactivityTimer.start(); inactivityTimer.start();

@ -28,7 +28,7 @@ public:
virtual void link() = 0; virtual void link() = 0;
virtual void write(unsigned int dgId, const unsigned char* data) = 0; virtual void write(unsigned int dgId, unsigned char dt, const unsigned char* data) = 0;
virtual unsigned int read(unsigned int dgid, unsigned char* data) = 0; virtual unsigned int read(unsigned int dgid, unsigned char* data) = 0;

@ -81,7 +81,7 @@ bool CFCSNetwork::open()
return m_socket.open(); return m_socket.open();
} }
void CFCSNetwork::write(unsigned int dgid, const unsigned char* data) void CFCSNetwork::write(unsigned int dgid, unsigned char dt, const unsigned char* data)
{ {
assert(data != NULL); assert(data != NULL);

@ -44,7 +44,7 @@ public:
virtual void link(); virtual void link();
virtual void write(unsigned int dgId, const unsigned char* data); virtual void write(unsigned int dgId, unsigned char dt, const unsigned char* data);
virtual unsigned int read(unsigned int dgId, unsigned char* data); virtual unsigned int read(unsigned int dgId, unsigned char* data);

@ -55,7 +55,7 @@ bool CIMRSNetwork::open()
return m_socket.open(); return m_socket.open();
} }
void CIMRSNetwork::write(unsigned int dgId, const unsigned char* data) void CIMRSNetwork::write(unsigned int dgId, unsigned char dt, const unsigned char* data)
{ {
assert(data != NULL); assert(data != NULL);

@ -58,7 +58,7 @@ public:
virtual void link(); virtual void link();
virtual void write(unsigned int dgId, const unsigned char* data); virtual void write(unsigned int dgId, unsigned char dt, const unsigned char* data);
virtual unsigned int read(unsigned int dgId, unsigned char* data); virtual unsigned int read(unsigned int dgId, unsigned char* data);

@ -19,6 +19,6 @@
#if !defined(VERSION_H) #if !defined(VERSION_H)
#define VERSION_H #define VERSION_H
const char* VERSION = "20200819"; const char* VERSION = "20200820";
#endif #endif

@ -93,7 +93,7 @@ bool CYSFNetwork::open()
return m_socket.open(); return m_socket.open();
} }
void CYSFNetwork::write(unsigned int dgid, const unsigned char* data) void CYSFNetwork::write(unsigned int dgid, unsigned char dt, const unsigned char* data)
{ {
assert(data != NULL); assert(data != NULL);

@ -38,7 +38,7 @@ public:
virtual void link(); virtual void link();
virtual void write(unsigned int dgId, const unsigned char* data); virtual void write(unsigned int dgId, unsigned char dt, const unsigned char* data);
virtual unsigned int read(unsigned int dgId, unsigned char* data); virtual unsigned int read(unsigned int dgId, unsigned char* data);

Loading…
Cancel
Save