commit
524e5442d1
12
hblink.py
12
hblink.py
@ -84,7 +84,7 @@ def handler(_signal, _frame):
|
||||
if CONFIG['SYSTEMS'][system]['MODE'] == 'MASTER':
|
||||
for client in CONFIG['SYSTEMS'][system]['CLIENTS']:
|
||||
this_system.send_client(client, 'MSTCL'+client)
|
||||
logger.info('(%s) Sending De-Registration to Client: %s', system, CONFIG['SYSTEMS'][system]['CLIENTS'][client]['RADIO_ID'])
|
||||
logger.info('(%s) Sending De-Registration to Client: %s (%s)', system, CONFIG['SYSTEMS'][system]['CLIENTS'][client]['CALLSIGN'], CONFIG['SYSTEMS'][system]['CLIENTS'][client]['RADIO_ID'])
|
||||
elif CONFIG['SYSTEMS'][system]['MODE'] == 'CLIENT':
|
||||
this_system.send_master('RPTCL'+CONFIG['SYSTEMS'][system]['RADIO_ID'])
|
||||
logger.info('(%s) De-Registering From the Master', system)
|
||||
@ -183,7 +183,7 @@ class HBMASTER(DatagramProtocol):
|
||||
_this_client = self._clients[client]
|
||||
# Check to see if any of the clients have been quiet (no ping) longer than allowed
|
||||
if _this_client['LAST_PING']+CONFIG['GLOBAL']['PING_TIME']*CONFIG['GLOBAL']['MAX_MISSED'] < time():
|
||||
logger.info('(%s) Client %s has timed out', self._master, _this_client['RADIO_ID'])
|
||||
logger.info('(%s) Client %s (%s) has timed out', self._master, _this_client['CALLSIGN'], _this_client['RADIO_ID'])
|
||||
# Remove any timed out clients from the configuration
|
||||
del CONFIG['SYSTEMS'][self._master]['CLIENTS'][client]
|
||||
|
||||
@ -246,7 +246,7 @@ class HBMASTER(DatagramProtocol):
|
||||
for _client in self._clients:
|
||||
if _client != _radio_id:
|
||||
self.send_client(_client, _data)
|
||||
logger.debug('(%s) Packet repeated to client: %s', self._master, int_id(_client))
|
||||
logger.debug('(%s) Packet repeated to client: %s (%s)', self._master, self._clients[_client]['CALLSIGN'], int_id(_client))
|
||||
|
||||
# Userland actions -- typically this is the function you subclass for an application
|
||||
self.dmrd_received(_radio_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _stream_id, _data)
|
||||
@ -316,7 +316,7 @@ class HBMASTER(DatagramProtocol):
|
||||
and self._clients[_radio_id]['CONNECTION'] == 'YES' \
|
||||
and self._clients[_radio_id]['IP'] == _host \
|
||||
and self._clients[_radio_id]['PORT'] == _port:
|
||||
logger.info('(%s) Client is closing down: %s', self._master, int_id(_radio_id))
|
||||
logger.info('(%s) Client is closing down: %s (%s)', self._master, self._clients[_radio_id]['CALLSIGN'], int_id(_radio_id))
|
||||
self.transport.write('MSTNAK'+_radio_id, (_host, _port))
|
||||
del self._clients[_radio_id]
|
||||
else:
|
||||
@ -344,7 +344,7 @@ class HBMASTER(DatagramProtocol):
|
||||
_this_client['PACKAGE_ID'] = _data[264:304]
|
||||
|
||||
self.send_client(_radio_id, 'RPTACK'+_radio_id)
|
||||
logger.info('(%s) Client %s has sent repeater configuration', self._master, _this_client['RADIO_ID'])
|
||||
logger.info('(%s) Client %s (%s) has sent repeater configuration', self._master, _this_client['CALLSIGN'], _this_client['RADIO_ID'])
|
||||
else:
|
||||
self.transport.write('MSTNAK'+_radio_id, (_host, _port))
|
||||
logger.warning('(%s) Client info from Radio ID that has not logged in: %s', self._master, int_id(_radio_id))
|
||||
@ -357,7 +357,7 @@ class HBMASTER(DatagramProtocol):
|
||||
and self._clients[_radio_id]['PORT'] == _port:
|
||||
self._clients[_radio_id]['LAST_PING'] = time()
|
||||
self.send_client(_radio_id, 'MSTPONG'+_radio_id)
|
||||
logger.debug('(%s) Received and answered RPTPING from client %s', self._master, int_id(_radio_id))
|
||||
logger.debug('(%s) Received and answered RPTPING from client %s (%s)', self._master, self._clients[_radio_id]['CALLSIGN'], int_id(_radio_id))
|
||||
else:
|
||||
self.transport.write('MSTNAK'+_radio_id, (_host, _port))
|
||||
logger.warning('(%s) Client info from Radio ID that has not logged in: %s', self._master, int_id(_radio_id))
|
||||
|
Loading…
Reference in New Issue
Block a user