mirror of
https://github.com/ShaYmez/hblink3.git
synced 2024-11-21 15:41:49 -05:00
Updates
This commit is contained in:
parent
8585b75dc0
commit
2860ec6847
1
.gitignore
vendored
1
.gitignore
vendored
@ -92,3 +92,4 @@ ENV/
|
|||||||
hblink.cfg
|
hblink.cfg
|
||||||
*.config
|
*.config
|
||||||
*.bak
|
*.bak
|
||||||
|
rules.py
|
||||||
|
@ -209,7 +209,7 @@ class routerOBP(OPENBRIDGE):
|
|||||||
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
|
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
|
||||||
pkt_time = time()
|
pkt_time = time()
|
||||||
dmrpkt = _data[20:53]
|
dmrpkt = _data[20:53]
|
||||||
_bits = int_id(_data[15])
|
_bits = _data[15]
|
||||||
|
|
||||||
if _call_type == 'group':
|
if _call_type == 'group':
|
||||||
# Is this a new call stream?
|
# Is this a new call stream?
|
||||||
@ -468,7 +468,7 @@ class routerHBP(HBSYSTEM):
|
|||||||
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
|
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
|
||||||
pkt_time = time()
|
pkt_time = time()
|
||||||
dmrpkt = _data[20:53]
|
dmrpkt = _data[20:53]
|
||||||
_bits = int_id(_data[15])
|
_bits = _data[15]
|
||||||
|
|
||||||
if _call_type == 'group':
|
if _call_type == 'group':
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ class HBSYSTEM(DatagramProtocol):
|
|||||||
_seq = _data[4]
|
_seq = _data[4]
|
||||||
_rf_src = _data[5:8]
|
_rf_src = _data[5:8]
|
||||||
_dst_id = _data[8:11]
|
_dst_id = _data[8:11]
|
||||||
_bits = int_id(_data[15])
|
_bits = _data[15]
|
||||||
_slot = 2 if (_bits & 0x80) else 1
|
_slot = 2 if (_bits & 0x80) else 1
|
||||||
#_call_type = 'unit' if (_bits & 0x40) else 'group'
|
#_call_type = 'unit' if (_bits & 0x40) else 'group'
|
||||||
if _bits & 0x40:
|
if _bits & 0x40:
|
||||||
@ -374,7 +374,7 @@ class HBSYSTEM(DatagramProtocol):
|
|||||||
for _peer in self._peers:
|
for _peer in self._peers:
|
||||||
if _peer != _peer_id:
|
if _peer != _peer_id:
|
||||||
pkt[1] = _peer
|
pkt[1] = _peer
|
||||||
self.transport.write(''.join(pkt), self._peers[_peer]['SOCKADDR'])
|
self.transport.write(b''.join(pkt), self._peers[_peer]['SOCKADDR'])
|
||||||
#logger.debug('(%s) Packet on TS%s from %s (%s) for destination ID %s repeated to peer: %s (%s) [Stream ID: %s]', self._system, _slot, self._peers[_peer_id]['CALLSIGN'], int_id(_peer_id), int_id(_dst_id), self._peers[_peer]['CALLSIGN'], int_id(_peer), int_id(_stream_id))
|
#logger.debug('(%s) Packet on TS%s from %s (%s) for destination ID %s repeated to peer: %s (%s) [Stream ID: %s]', self._system, _slot, self._peers[_peer_id]['CALLSIGN'], int_id(_peer_id), int_id(_dst_id), self._peers[_peer]['CALLSIGN'], int_id(_peer), int_id(_stream_id))
|
||||||
|
|
||||||
|
|
||||||
@ -708,7 +708,7 @@ class reportFactory(Factory):
|
|||||||
client.sendString(_message)
|
client.sendString(_message)
|
||||||
|
|
||||||
def send_config(self):
|
def send_config(self):
|
||||||
serialized = pickle.dumps(self._config['SYSTEMS'], protocol=pickle.HIGHEST_PROTOCOL)
|
serialized = pickle.dumps(self._config['SYSTEMS'], protocol=2) #pickle.HIGHEST_PROTOCOL)
|
||||||
self.send_clients(REPORT_OPCODES['CONFIG_SND']+serialized)
|
self.send_clients(REPORT_OPCODES['CONFIG_SND']+serialized)
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
# Opcodes for the network-based reporting protocol
|
# Opcodes for the network-based reporting protocol
|
||||||
|
|
||||||
REPORT_OPCODES = {
|
REPORT_OPCODES = {
|
||||||
'CONFIG_REQ': b'\x00',
|
'CONFIG_REQ': '\x00',
|
||||||
'CONFIG_SND': b'\x01',
|
'CONFIG_SND': '\x01',
|
||||||
'BRIDGE_REQ': b'\x02',
|
'BRIDGE_REQ': '\x02',
|
||||||
'BRIDGE_SND': b'\x03',
|
'BRIDGE_SND': '\x03',
|
||||||
'CONFIG_UPD': b'\x04',
|
'CONFIG_UPD': '\x04',
|
||||||
'BRIDGE_UPD': b'\x05',
|
'BRIDGE_UPD': '\x05',
|
||||||
'LINK_EVENT': b'\x06',
|
'LINK_EVENT': '\x06',
|
||||||
'BRDG_EVENT': b'\x07',
|
'BRDG_EVENT': '\x07',
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user