diff --git a/.gitignore b/.gitignore index dacd793..561881f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ Icon *.lcl *.conf hblink.cfg +hb_routing_rules.py *.config *.json *.pickle diff --git a/hb_router.py b/hb_router.py index f84458e..70e8d02 100755 --- a/hb_router.py +++ b/hb_router.py @@ -72,7 +72,7 @@ class routerMASTER(HBMASTER): _target = rule['DST_NET'] if _target in RULES: systems[_target].send_system(_data) - logger.debug('(%s) Packet routed %s to system: %s', self._master, CONFIG['SYSTEMS'][_target]['MODE'], _target) + logger.debug('(%s) Packet routed to %s system: %s', self._master, CONFIG['SYSTEMS'][_target]['MODE'], _target) else: logger.debug('(%s) Packet router found no target for packet. Destination was: %s on target network %s', self._master, _dst_id, _target) diff --git a/hb_routing_rules-SAMPLE.py b/hb_routing_rules-SAMPLE.py new file mode 100644 index 0000000..164a495 --- /dev/null +++ b/hb_routing_rules-SAMPLE.py @@ -0,0 +1,28 @@ +RULES = { + 'MASTER-1': { + 'GROUP_HANGTIME': 5, + 'GROUP_VOICE': [ + {'NAME': 'STATEWIDE', 'ACTIVE': False, 'ON': [8,], 'OFF': [9,10], 'SRC_TS': 1, 'SRC_GROUP': 1, 'DST-TYPE': 'CLIENT', 'DST_NET': 'REPEATER-1', 'DST_TS': 2, 'DST_GROUP': 2}, + # When DMRD received on this MASTER, Time Slot 1, Talk Group 1; send to CLIENT-1 on Time Slot 2 Talk Group 2 + # This rule is NOT enabled by default + # This rule can be enabled by transmitting on TGID 8 + # This rule can be disabled by transmitting on TGID 9 or 10 + # Repeat the above line for as many rules for this IPSC network as you want. + ] + }, + 'REPEATER-1': { + 'GROUP_HANGTIME': 5, + 'GROUP_VOICE': [ + {'NAME': 'STATEWIDE', 'ACTIVE': False, 'ON': [8,], 'OFF': [9,10], 'SRC_TS': 1, 'SRC_GROUP': 1, 'DST-TYPE': 'MASTER', 'DST_NET': 'MASTER-1', 'DST_TS': 2, 'DST_GROUP': 2}, + # When DMRD received on this CLIENT, Time Slot 1, Talk Group 1; send to MASTER-1 on Time Slot 2 Talk Group 2 + # This rule is NOT enabled by default + # This rule can be enabled by transmitting on TGID 8 + # This rule can be disabled by transmitting on TGID 9 or 10 + # Repeat the above line for as many rules for this IPSC network as you want. + ] + }, +} + +if __name__ == '__main__': + from pprint import pprint + pprint(RULES) \ No newline at end of file