Word on data reporting options
in the process of adding several ways to dump the data structure from each IPSC for processing by some external program.
This commit is contained in:
parent
ec9c20d5ee
commit
10a21ed118
11
dmrlink.py
11
dmrlink.py
|
@ -79,6 +79,7 @@ try:
|
|||
REPORTS = {
|
||||
'REPORT_NETWORKS': config.get(section, 'REPORT_NETWORKS'),
|
||||
'REPORT_INTERVAL': config.getint(section, 'REPORT_INTERVAL'),
|
||||
'REPORT_PATH': config.get(section, 'REPORT_PATH'),
|
||||
'PRINT_PEERS_INC_MODE': config.getboolean(section, 'PRINT_PEERS_INC_MODE'),
|
||||
'PRINT_PEERS_INC_FLAGS': config.getboolean(section, 'PRINT_PEERS_INC_FLAGS')
|
||||
}
|
||||
|
@ -973,15 +974,19 @@ class IPSC(DatagramProtocol):
|
|||
# REPORT BASED ON THE TYPE SELECTED IN THE MAIN CONFIG FILE
|
||||
if REPORTS['REPORT_NETWORKS'] == 'PICKLE':
|
||||
def reporting_loop(self):
|
||||
logger.debug('(%s) Periodic Reporting Loop Started', self._network)
|
||||
logger.debug('(%s) Periodic Reporting Loop Started (PICKLE)', self._network)
|
||||
|
||||
elif REPORTS['REPORT_NETWORKS'] == 'JSON':
|
||||
def reporting_loop(self):
|
||||
logger.debug('(%s) Periodic Reporting Loop Started', self._network)
|
||||
logger.debug('(%s) Periodic Reporting Loop Started (JSON)', self._network)
|
||||
|
||||
elif REPORTS['REPORT_NETWORKS'] == 'REDIS':
|
||||
def reporting_loop(self):
|
||||
logger.debug('(%s) Periodic Reporting Loop Started (REDIS)', self._network)
|
||||
|
||||
elif REPORTS['REPORT_NETWORKS'] == 'PRINT':
|
||||
def reporting_loop(self):
|
||||
logger.debug('(%s) Periodic Reporting Loop Started', self._network)
|
||||
logger.debug('(%s) Periodic Reporting Loop Started (PRINT)', self._network)
|
||||
print_master(self._network)
|
||||
print_peer_list(self._network)
|
||||
|
||||
|
|
|
@ -15,10 +15,16 @@ PATH: /absolute/path/to/DMRlink
|
|||
# for "REPORT_NETWORKS" are:
|
||||
# PICKLE - a Python pickle file of the network's data structure
|
||||
# JSON - a JSON file of the network's data structure
|
||||
# PRINT - a pretty print (STOUT) of the data structure
|
||||
# REDIS - send JSON format data structure to a local|remote
|
||||
# redis server
|
||||
# PRINT - a pretty print (STDOUT) of the data structure
|
||||
# "PRINT_PEERS_INC_MODE" - Boolean to include mode bits
|
||||
# "PRINT_PEERS_INC_FLAGS" - Boolean to include flag bits
|
||||
#
|
||||
# PRINT is the odd man out because it sends prettily formatted stuff
|
||||
# to STDOUT. The others send the internal data structure of the IPSC
|
||||
# instance and let some program on the other end sort it out.
|
||||
#
|
||||
[REPORTS]
|
||||
REPORT_NETWORKS:
|
||||
REPORT_INTERVAL: 60
|
||||
|
|
Loading…
Reference in New Issue