2013-11-17 19:13:59 -05:00
|
|
|
'''
|
|
|
|
The following is an example for your bridge_rules file. Note, all bridging is ONE-WAY!
|
|
|
|
Rules for an IPSC network indicate destination IPSC network for the Group ID specified
|
|
|
|
(allowing transcoding of the Group ID to a different value). Group IDs are specified
|
|
|
|
as hex strings.
|
|
|
|
|
|
|
|
The IPSC name must match an IPSC name from dmrlink.cfg.
|
|
|
|
|
|
|
|
The example below cross-patches TGID 1 on an IPSC network named "IPSC_FOO" with TGID 2
|
|
|
|
on an IPSC network named "IPSC_BAR".
|
|
|
|
|
|
|
|
THIS EXAMPLE WILL NOT WORK AS IT IS - YOU MUST SPECIFY NAMES AND GROUP IDS!!!
|
2013-12-15 14:17:14 -05:00
|
|
|
|
|
|
|
NOTE: Timeslot transcoding does not yet work (SRC_TS) and (DST_TS) are ignored
|
2013-11-17 19:13:59 -05:00
|
|
|
'''
|
|
|
|
|
2014-04-10 23:15:44 -04:00
|
|
|
def id(_id):
|
|
|
|
# Create a 3 byte TGID or UID from an integer
|
|
|
|
return hex(_id)[2:].rjust(6,'0').decode('hex')
|
|
|
|
|
2013-11-17 19:13:59 -05:00
|
|
|
RULES = {
|
|
|
|
'IPSC_FOO': {
|
|
|
|
'GROUP_VOICE': [
|
2014-04-10 23:15:44 -04:00
|
|
|
{'SRC_GROUP': id(1), 'SRC_TS': 1, 'DST_NET': 'IPSC_BAR', 'DST_GROUP': id(2), 'DST_TS': 1},
|
2013-11-17 19:13:59 -05:00
|
|
|
# Repeat the above line for as many rules for this IPSC network as you want.
|
|
|
|
],
|
|
|
|
'PRIVATE_VOICE': [
|
|
|
|
],
|
|
|
|
'GROUP_DATA': [
|
|
|
|
],
|
|
|
|
'PRIVATE_DATA': [
|
|
|
|
]
|
|
|
|
},
|
|
|
|
'IPSC_BAR:' {
|
|
|
|
'GROUP_VOICE': [
|
2014-04-10 23:15:44 -04:00
|
|
|
{'SRC_GROUP': id(2), 'SRC_TS': 1, 'DST_NET': 'IPSC_FOO', 'DST_GROUP': id(1), 'DST_TS': 1},
|
2013-11-17 19:13:59 -05:00
|
|
|
# Repeat the above line for as many rules for this IPSC network as you want.
|
|
|
|
],
|
|
|
|
'PRIVATE_VOICE': [
|
|
|
|
],
|
|
|
|
'GROUP_DATA': [
|
|
|
|
],
|
|
|
|
'PRIVATE_DATA': [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|