|
|
|
|
@ -1930,16 +1930,8 @@ class routerHBP(HBSYSTEM):
|
|
|
|
|
_tmp_bits = _bits ^ 1 << 7
|
|
|
|
|
else:
|
|
|
|
|
_tmp_bits = _bits
|
|
|
|
|
#Assemble transmit HBP packet header
|
|
|
|
|
#_tmp_data = b''.join([_data[:15], _tmp_bits.to_bytes(1, 'big'), _data[16:20]])
|
|
|
|
|
#_tmp_data = b''.join([_tmp_data, dmrpkt])
|
|
|
|
|
#systems[_d_system].send_system(_tmp_data)
|
|
|
|
|
#logger.info('(%s) UNIT Data Bridged to HBP on slot 1: %s DST_ID: %s',self._system,_d_system,_int_dst_id)
|
|
|
|
|
#if CONFIG['REPORTS']['REPORT']:
|
|
|
|
|
#systems[_d_system]._report.send_bridgeEvent('UNIT DATA,START,TX,{},{},{},{},{},{}'.format(_d_system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), 1, _int_dst_id).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
|
self.sendDataToHBP(_d_system,_d_slot,_dst_id,_tmp_bits,_data,dmrpkt,_rf_src)
|
|
|
|
|
|
|
|
|
|
#_dst_slot['TX_TIME'] = pkt_time
|
|
|
|
|
else:
|
|
|
|
|
logger.info('(%s) UNIT Data not bridged to HBP on slot 1 - target busy: %s DST_ID: %s',self._system,_d_system,_int_dst_id)
|
|
|
|
|
|
|
|
|
|
@ -1953,18 +1945,10 @@ class routerHBP(HBSYSTEM):
|
|
|
|
|
if (_dst_slot['RX_TYPE'] == HBPF_SLT_VTERM) and (_dst_slot['TX_TYPE'] == HBPF_SLT_VTERM) and (time() - _dst_slot['TX_TIME'] > CONFIG['SYSTEMS'][_d_system]['GROUP_HANGTIME']):
|
|
|
|
|
#We will allow the system to use both slots
|
|
|
|
|
_tmp_bits = _bits
|
|
|
|
|
#Assemble transmit HBP packet header
|
|
|
|
|
#_tmp_data = b''.join([_data[:15], _tmp_bits.to_bytes(1, 'big'), _data[16:20]])
|
|
|
|
|
#_tmp_data = b''.join([_tmp_data, dmrpkt])
|
|
|
|
|
#systems[_d_system].send_system(_tmp_data)
|
|
|
|
|
#logger.info('(%s) UNIT Data Bridged to HBP on slot: %s DST_ID: %s',self._system,_d_system,_int_dst_id)
|
|
|
|
|
#if CONFIG['REPORTS']['REPORT']:
|
|
|
|
|
#systems[_d_system]._report.send_bridgeEvent('UNIT DATA,START,TX,{},{},{},{},{},{}'.format(_d_system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), 1, _int_dst_id).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
|
self.sendDataToHBP(_d_system,_d_slot,_dst_id,_tmp_bits,_data,dmrpkt,_rf_src)
|
|
|
|
|
|
|
|
|
|
#_dst_slot['TX_TIME'] = pkt_time
|
|
|
|
|
else:
|
|
|
|
|
logger.info('(%s) UNIT Data not bridged to HBP on slot 1 - target busy: %s DST_ID: %s',self._system,_d_system,_int_dst_id)
|
|
|
|
|
logger.info('(%s) UNIT Data not bridged to HBP on slot %s - target busy: %s DST_ID: %s',self._system,_d_slot,_d_system,_int_dst_id)
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
#If destination ID is logged in as a hotspot
|
|
|
|
|
@ -1974,7 +1958,7 @@ class routerHBP(HBSYSTEM):
|
|
|
|
|
_int_to_peer = int_id(_to_peer)
|
|
|
|
|
if (str(_int_to_peer)[:7] == str(_int_dst_id)[:7]):
|
|
|
|
|
#(_d_system,_d_slot,_d_time) = SUB_MAP[_dst_id]
|
|
|
|
|
_d_slot = _slot
|
|
|
|
|
_d_slot = 2
|
|
|
|
|
_dst_slot = systems[_d_system].STATUS[_d_slot]
|
|
|
|
|
logger.info('(%s) User Peer Hotspot ID matched, System: %s Slot: %s',self._system, _d_system,_d_slot)
|
|
|
|
|
#If slot is idle for RX and TX
|
|
|
|
|
@ -1986,17 +1970,10 @@ class routerHBP(HBSYSTEM):
|
|
|
|
|
_tmp_bits = _bits ^ 1 << 7
|
|
|
|
|
else:
|
|
|
|
|
_tmp_bits = _bits
|
|
|
|
|
#Assemble transmit HBP packet header
|
|
|
|
|
#_tmp_data = b''.join([_data[:15], _tmp_bits.to_bytes(1, 'big'), _data[16:20]])
|
|
|
|
|
#_tmp_data = b''.join([_tmp_data, dmrpkt])
|
|
|
|
|
#systems[_d_system].send_system(_tmp_data)
|
|
|
|
|
#logger.info('(%s) UNIT Data Bridged to HBP on slot: %s DST_ID: %s',self._system,_d_system,_int_dst_id)
|
|
|
|
|
#if CONFIG['REPORTS']['REPORT']:
|
|
|
|
|
#systems[_d_system]._report.send_bridgeEvent('UNIT DATA,START,TX,{},{},{},{},{},{}'.format(_d_system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), 1, _int_dst_id).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
|
self.sendDataToHBP(_d_system,_d_slot,_dst_id,_tmp_bits,_data,dmrpkt,_rf_src)
|
|
|
|
|
#_dst_slot['TX_TIME'] = pkt_time
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
logger.info('(%s) UNIT Data not bridged to HBP on slot 1 - target busy: %s DST_ID: %s',self._system,_d_system,_int_dst_id)
|
|
|
|
|
logger.info('(%s) UNIT Data not bridged to HBP on slot %s - target busy: %s DST_ID: %s',self._system,_d_slot,_d_system,_int_dst_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|