Beispiel #1
0

#############################################################
'''

base_path = '/home/nagatoyuki/Desktop/Thesis/Indriya/'
#folder = 'data-48224/'
folder = 'data-48413/'
filenames = ('25593.dat',)
'''

#############################################################

###########    Parsing Command line                  ########

result = command.main(sys.argv[1:])
FileDict, props = command.getfile(result)

#############################################################
CMsgs = FileDict['ConnectDebug']

statics = defaultdict(dict)
G = nx.Graph()
noderange = set()

bigrange = range(60, 140)

for node in bigrange:
	if node not in (70,71,72,74,76,77,78,79,80,81,82,83,84,85,135,132):
		noderange.add(node)
'''
Beispiel #2
0
from collections import deque, defaultdict
import sys
'''
props['Avg_Data_dc'] = Avg_Data_dc_ctp
	props['Avg_Idle_dc'] = Avg_Idle_dc_ctp
	props['Avg_Total_dc'] = Avg_Total_dc_ctp
	props['Avg_Hops'] = avg_hops_ctp
	props['Num_Init'] = num_init_ctp
	props['Num_Fwd'] = num_fwd_ctp
	props['Dir_Neig'] = dir_neig_ctp
	props['Relay'] = relay_ctp
	props['Leaf'] = leaf_ctp
	props['Num_Rcv'] = total_receive_ctp
	props['Fwd_Load'] = load_ctp
'''
result = command.main(sys.argv[1:])
FileDict, props = command.getfile(result)
time_ratio = props['timeratio']
SINK_ID = props['SINK_ID']
time_TH = props['time_TH']

################################section of CTP#########################
CtpDebugMsgs = FileDict['CtpDebug']
#Calibrate timestamp not needed?
'''for msg in CtpDebugMsgs:
	if msg.type == NET_DC_REPORT:
		dt = msg.dbg__b - msg.timestamp/time_ratio
		break'''

#store the packet as (src, seqNo)
#hist_ctp = deque(maxlen=12000)