smallneuron 1.1.2__tar.gz → 1.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {smallneuron-1.1.2/src/smallneuron.egg-info → smallneuron-1.1.6}/PKG-INFO +1 -1
- {smallneuron-1.1.2 → smallneuron-1.1.6}/pyproject.toml +1 -1
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/smallneuron.py +10 -3
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/snserial.py +1 -1
- {smallneuron-1.1.2 → smallneuron-1.1.6/src/smallneuron.egg-info}/PKG-INFO +1 -1
- {smallneuron-1.1.2 → smallneuron-1.1.6}/.gitignore +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/LICENSE +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/README.md +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/example.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/setup.cfg +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/__init__.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/build +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/gpio_h3.c +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/gpio_h3.h +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/gpio_h3.so +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/logger.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/snapi.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sndummy.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sngpio.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sninput.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/snmqtt.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sntimer.py +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron.egg-info/SOURCES.txt +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron.egg-info/dependency_links.txt +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron.egg-info/top_level.txt +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/PKG-INFO +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/SOURCES.txt +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/dependency_links.txt +0 -0
- {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from time import sleep
|
|
1
|
+
from time import sleep, time
|
|
2
2
|
import threading
|
|
3
3
|
import queue
|
|
4
4
|
import re
|
|
@@ -72,6 +72,7 @@ class EventManager:
|
|
|
72
72
|
self.count = 0 # state count
|
|
73
73
|
self.graph_n = 0
|
|
74
74
|
self.events = queue.SimpleQueue()
|
|
75
|
+
self.prev_time=time()
|
|
75
76
|
self.net = (
|
|
76
77
|
{}
|
|
77
78
|
) # estructura es { "evento1": { "estado Origen1" : (nodoDestino1, "event_desc1" ), "estadoOrigen2": (nodoDestino2, "event_desc2") }, "evento2"...
|
|
@@ -94,8 +95,12 @@ class EventManager:
|
|
|
94
95
|
watcher=SnWatcher(self,event,event_args, event_pattern)
|
|
95
96
|
watcher.run(bridge,bridge_args,mode,period)
|
|
96
97
|
return watcher
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
|
|
99
|
+
def timeMark(self, text):
|
|
100
|
+
t=time()
|
|
101
|
+
print(text, t-self.prev_time, t)
|
|
102
|
+
self.prev_time=t
|
|
103
|
+
|
|
99
104
|
def linkEdge(self, event, nodeFrom: Node, nodeTo: Node, desc=""):
|
|
100
105
|
if event in self.cmds:
|
|
101
106
|
print("Error event already in cmds ", event)
|
|
@@ -223,7 +228,9 @@ class EventManager:
|
|
|
223
228
|
self.printGraph()
|
|
224
229
|
while True:
|
|
225
230
|
log.notice("[",self.count,"] State:", self.currentState)
|
|
231
|
+
self.timeMark("event end:")
|
|
226
232
|
eventTuple = self.events.get()
|
|
233
|
+
self.timeMark("event start:")
|
|
227
234
|
event = eventTuple[0] # text del evento
|
|
228
235
|
params = eventTuple[1] # argumentos del evento
|
|
229
236
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|