@@ -103,18 +103,22 @@ def uuid(self):
103
103
def luos_statistics (self ):
104
104
self ._push_value ('luos_statistics' , "" )
105
105
time .sleep (0.3 )
106
- max_table = [self ._luos_statistics ["msg_stack" ], self ._luos_statistics ["luos_stack" ]]
107
- max_val = max (max_table )
108
- s = self .alias + " statistics :"
109
- s = s + "\n .luos allocated RAM occupation \t = " + repr (max_val )
110
- s = s + "%\n \t .Message stack \t \t = " + repr (self ._luos_statistics ["msg_stack" ])
111
- s = s + "%\n \t .Luos stack \t \t = " + repr (self ._luos_statistics ["luos_stack" ])
112
- s = s + "%\n .Dropped messages number \t = " + repr (self ._luos_statistics ["msg_drop" ])
113
- s = s + "\n .Max luos loop delay \t \t = " + repr (self ._luos_statistics ["loop_ms" ])
114
- s = s + "ms\n .Msg fail ratio \t \t = " + repr (self ._luos_statistics ["fail_ratio" ])
115
- s = s + "%\n .Nak msg max number \t \t = " + repr (self ._luos_statistics ["nak_max" ])
116
- s = s + "\n .Collision msg max number \t = " + repr (self ._luos_statistics ["collision_max" ])
117
- print (s )
106
+ try :
107
+ max_table = [self ._luos_statistics ["rx_msg_stack" ], self ._luos_statistics ["luos_stack" ], self ._luos_statistics ["tx_msg_stack" ], self ._luos_statistics ["buffer_occupation" ]]
108
+ max_val = max (max_table )
109
+ s = self .alias + " statistics :"
110
+ s = s + "\n .luos allocated RAM occupation \t = " + repr (max_val )
111
+ s = s + "%\n \t .RX message stack \t = " + repr (self ._luos_statistics ["rx_msg_stack" ])
112
+ s = s + "%\n \t .TX message stack \t = " + repr (self ._luos_statistics ["tx_msg_stack" ])
113
+ s = s + "%\n \t .Luos stack \t \t = " + repr (self ._luos_statistics ["luos_stack" ])
114
+ s = s + "%\n \t .Buffer occupation \t = " + repr (self ._luos_statistics ["buffer_occupation" ])
115
+ s = s + "%\n .Dropped messages number \t = " + repr (self ._luos_statistics ["msg_drop" ])
116
+ s = s + "\n .Max luos loop delay \t \t = " + repr (self ._luos_statistics ["loop_ms" ])
117
+ s = s + "ms\n .msg max retry number \t \t = " + repr (self ._luos_statistics ["max_retry" ])
118
+ s = s + "\n "
119
+ print (s )
120
+ except :
121
+ print (self .alias + " statistics collection failed.\n " )
118
122
119
123
def rename (self , name ):
120
124
# check if the string start with a number before sending
0 commit comments