def __init__(self, _name, _config, _logger, _bridges): IPSC.__init__(self, _name, _config, _logger) self.BRIDGES = _bridges if self.BRIDGES: self._logger.info('(%s) Initializing backup/polite bridging', self._system) self.BRIDGE = False else: self.BRIDGE = True self._logger.info('Initializing standard bridging') self.IPSC_STATUS = { 1: { 'RX_GROUP': '\x00', 'TX_GROUP': '\x00', 'RX_TIME': 0, 'TX_TIME': 0, 'RX_SRC_SUB': '\x00', 'TX_SRC_SUB': '\x00' }, 2: { 'RX_GROUP': '\x00', 'TX_GROUP': '\x00', 'RX_TIME': 0, 'TX_TIME': 0, 'RX_SRC_SUB': '\x00', 'TX_SRC_SUB': '\x00' } } self.last_seq_id = '\x00' self.call_start = 0
def __init__(self, *args, **kwargs): IPSC.__init__(self, *args, **kwargs) self.CALL_DATA = [] # # Define default values for operation. These will be overridden by the .cfg file if found # self._currentTG = self._no_tg self._sequenceNr = 0 self.readConfigFile(self._configFile) print('DMRLink ambe server') # # Open output sincs # if self._outToFile == True: f = open('ambe.bin', 'wb') print('Opening output file: ambe.bin') if self._outToUDP == True: self._sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) print('Send UDP frames to DMR gateway {}:{}'.format(self._gateway, self._gateway_port)) try: thread.start_new_thread( self.remote_control, (self._remote_control_port, ) ) except: traceback.print_exc() print( "Error: unable to start thread" )
def __init__(self, _name, _config, _logger): IPSC.__init__(self, _name, _config, _logger) self.CALL_DATA = [] # # Define default values for operation. These will be overridden by the .cfg file if found # self._currentTG = self._no_tg self._currentNetwork = str(_name) self.readConfigFile(self._configFile, None, self._currentNetwork) logger.info('DMRLink ambe server') if self._gateway_dmr_id == 0: sys.exit( "Error: gatewayDmrId must be set (greater than zero)" ) # # Open output sincs # if self._outToFile == True: self._f = open('ambe.bin', 'wb') logger.info('Opening output file: ambe.bin') if self._outToUDP == True: self._sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) logger.info('Send UDP frames to DMR gateway {}:{}'.format(self._gateway, self._gateway_port)) ###### DEBUGDEBUGDEBUG #self._d = open('recordData.bin', 'wb') ###### DEBUGDEBUGDEBUG try: thread.start_new_thread( self.remote_control, (self._remote_control_port, ) ) # Listen for remote control commands thread.start_new_thread( self.launchUDP, (_name, ) ) # Package AMBE into IPSC frames and send to all peers except: traceback.print_exc() logger.error( "Error: unable to start thread" )
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.STATUS = { 1: {'RX_TGID':'\x00', 'TX_TGID':'\x00', 'RX_TIME':0, 'TX_TIME':0, 'RX_SRC_SUB':'\x00', 'TX_SRC_SUB':'\x00'}, 2: {'RX_TGID':'\x00', 'TX_TGID':'\x00', 'RX_TIME':0, 'TX_TIME':0, 'RX_SRC_SUB':'\x00', 'TX_SRC_SUB':'\x00'} } self.last_seq_id = '\x00' self.call_start = 0
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.CALL_DATA = [] if GROUP_SRC_SUB: self._logger.info('Playback: USING SUBSCRIBER ID: %s FOR GROUP REPEAT', GROUP_SRC_SUB) self.GROUP_SRC_SUB = hex_str_3(GROUP_SRC_SUB) if GROUP_REPEAT: self._logger.info('Playback: GROUP REPEAT ENABLED') if PRIVATE_REPEAT: self._logger.info('Playback: PRIVATE REPEAT ENABLED')
def __init__(self, *args, **kwargs): IPSC.__init__(self, *args, **kwargs) if BRIDGES: logger.info('Initializing backup/polite bridging') self.BRIDGE = False else: self.BRIDGE = True logger.info('Initializing standard bridging') self.IPSC_STATUS = { 'TS1': {'RX_GROUP':'\x00', 'TX_GROUP':'\x00', 'RX_TIME':0, 'TX_TIME':0, 'RX_SRC_SUB':'\x00', 'TX_SRC_SUB':'\x00'}, 'TS2': {'RX_GROUP':'\x00', 'TX_GROUP':'\x00', 'RX_TIME':0, 'TX_TIME':0, 'RX_SRC_SUB':'\x00', 'TX_SRC_SUB':'\x00'} }
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.CALL_DATA = [] if GROUP_SRC_SUB: self._logger.info( 'Playback: USING SUBSCRIBER ID: %s FOR GROUP REPEAT', GROUP_SRC_SUB) self.GROUP_SRC_SUB = hex_str_3(GROUP_SRC_SUB) if GROUP_REPEAT: self._logger.info('Playback: GROUP REPEAT ENABLED') if PRIVATE_REPEAT: self._logger.info('Playback: PRIVATE REPEAT ENABLED')
def __init__(self, _name, _config, _logger, report): IPSC.__init__(self, _name, _config, _logger, report) self.BRIDGES = BRIDGES if self.BRIDGES: self._logger.info('(%s) Initializing backup/polite bridging', self._system) self.BRIDGE = False else: self.BRIDGE = True self._logger.info('Initializing standard bridging') self.IPSC_STATUS = { 1: {'RX_GROUP':'\x00', 'TX_GROUP':'\x00', 'RX_TIME':0, 'TX_TIME':0, 'RX_SRC_SUB':'\x00', 'TX_SRC_SUB':'\x00'}, 2: {'RX_GROUP':'\x00', 'TX_GROUP':'\x00', 'RX_TIME':0, 'TX_TIME':0, 'RX_SRC_SUB':'\x00', 'TX_SRC_SUB':'\x00'} } self.last_seq_id = '\x00' self.call_start = 0
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.CALL_DATA = [] # # Define default values for operation. These will be overridden by the .cfg file if found # self._currentTG = self._no_tg self._currentNetwork = str(_name) self.readConfigFile(self._configFile, None, self._currentNetwork) logger.info('DMRLink ambe server') if self._gateway_dmr_id == 0: sys.exit("Error: gatewayDmrId must be set (greater than zero)") # # Open output sincs # if self._outToFile == True: self._f = open('ambe.bin', 'wb') logger.info('Opening output file: ambe.bin') if self._outToUDP == True: self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) logger.info('Send UDP frames to DMR gateway {}:{}'.format( self._gateway, self._gateway_port)) ###### DEBUGDEBUGDEBUG #self._d = open('recordData.bin', 'wb') ###### DEBUGDEBUGDEBUG try: thread.start_new_thread(self.remote_control, (self._remote_control_port, )) # Listen for remote control commands thread.start_new_thread( self.launchUDP, (_name, )) # Package AMBE into IPSC frames and send to all peers except: traceback.print_exc() logger.error("Error: unable to start thread")
def __init__(self, _name, _config, _bridge_config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self._busy_slots = [ 0, 0, 0 ] # Keep track of activity on each slot. Make sure app is polite self.cc = 1 self._tlvPort = 31003 # Port to listen on for TLV frames to transmit to all peers self._gateway = "127.0.0.1" # IP address of bridge app self._gateway_port = 31000 # Port bridge is listening on for TLV frames to decode # # Define default values for operation. These will be overridden by the .cfg file if found # self._currentNetwork = str(_name) self.readConfigFile(_bridge_config, None, self._currentNetwork) logger.info('DMRLink IPSC Bridge') self.tlv_ipsc = tlvIPSC(self, _name, _config, _logger, self._tlvPort)
def __init__(self, *args, **kwargs): IPSC.__init__(self, *args, **kwargs) self.CALL_DATA = []
def __init__(self, *args, **kwargs): IPSC.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): IPSC.__init__(self, *args, **kwargs) self.ACTIVE_CALLS = []
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.ACTIVE_CALLS = []
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.CALL_DATA = []
def __init__(self, _name, _config, _logger, report): IPSC.__init__(self, _name, _config, _logger, report) self.last_seq_id = '\x00' self.call_start = 0
def __init__(self, _name, _config, _logger): IPSC.__init__(self, _name, _config, _logger)
def __init__(self, _name, _config, _logger): IPSC.__init__(self, _name, _config, _logger) self.CALL_DATA = []
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report)
def startProtocol(self): IPSC.startProtocol(self) self._bridge_presence = task.LoopingCall(self.bridge_presence_loop) self._bridge_presence_loop = self._bridge_presence.start(self._local['ALIVE_TIMER'])
def __init__(self, _name, _config, _logger): IPSC.__init__(self, _name, _config, _logger) self.ACTIVE_CALLS = []
def __init__(self, _name, _config, _logger): IPSC.__init__(self, _name, _config, _logger) self.CALL_DATA = [] self.event_id = 1
def __init__(self, _name, _config, _logger, _report): IPSC.__init__(self, _name, _config, _logger, _report) self.CALL_DATA = [] self.event_id = 1
def __init__(self, *args, **kwargs): IPSC.__init__(self, *args, **kwargs) self.BRIDGE = False self.ACTIVE_CALLS = [] logger.info('(%s) Initializing bridge status as: %s', self._network, self.BRIDGE)
def startProtocol(self): IPSC.startProtocol(self) if self.BRIDGES: self._bridge_presence = task.LoopingCall(self.bridge_presence_loop) self._bridge_presence_loop = self._bridge_presence.start( self._local['ALIVE_TIMER'])