-
Notifications
You must be signed in to change notification settings - Fork 0
/
teste.py
91 lines (81 loc) · 1.88 KB
/
teste.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
a = 'pmu'
configuration_frame = [{
"MAIN":
{
'SYNC': 3,
'FRAMESIZE': 0,
'IDCODE': 0,
'SOC': 0,
'FRACSEC': 0,
'TIME_BASE': 0,
'NUM_PMU': 0
},
"TERMINALS": {
a: {
'STN': 2,
'IDCODE': 0,
'PHNMR': 0,
'ANNMR': 0,
'DGNMR': 0,
'PHUNIT': 0,
'FNOM': 0,
'CFGCNT': 0
}
}
}]
teste = {
'STN': 10,
'IDCODE': 0,
'PHNMR': 0,
'ANNMR': 0,
'DGNMR': 0,
'PHUNIT': 0,
'FNOM': 0,
'CFGCNT': 0
}
configuration_frame[0]['TERMINALS'].update({'fabio': teste})
print('configuration_frame: ', configuration_frame)
data_frame_rec = {
"MAIN":
{
'SYNC': None,
'FRAMESIZE': None,
'IDCODE': None,
'SOC': None,
'FRACSEC': None
},
"TERMINALS": [{
'STAT': None,
'PHASORS': {
'MOD_A': 5,
},
'FREQ': None,
'DFREQ': None
},{
'STAT': None,
'PHASORS': {
'MOD_A': 10,
},
'FREQ': None,
'DFREQ': None
},{
'STAT': None,
'PHASORS': {
'MOD_A': 695,
},
'FREQ': None,
'DFREQ': None
}]
}
teste = {
'STAT': None,
'PHASORS': {
'MOD_A': 543,
},
'FREQ': None,
'DFREQ': None
}
#print('terminals: ', data_frame_rec["TERMINALS"])
data_frame_rec["TERMINALS"].append(teste)
#print('terminals após append: ', data_frame_rec["TERMINALS"])
#data_frame_rec["TERMINALS"][0]["PHASORS"][0]["MOD_A"] = 5