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.
Files changed (29) hide show
  1. {smallneuron-1.1.2/src/smallneuron.egg-info → smallneuron-1.1.6}/PKG-INFO +1 -1
  2. {smallneuron-1.1.2 → smallneuron-1.1.6}/pyproject.toml +1 -1
  3. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/smallneuron.py +10 -3
  4. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/snserial.py +1 -1
  5. {smallneuron-1.1.2 → smallneuron-1.1.6/src/smallneuron.egg-info}/PKG-INFO +1 -1
  6. {smallneuron-1.1.2 → smallneuron-1.1.6}/.gitignore +0 -0
  7. {smallneuron-1.1.2 → smallneuron-1.1.6}/LICENSE +0 -0
  8. {smallneuron-1.1.2 → smallneuron-1.1.6}/README.md +0 -0
  9. {smallneuron-1.1.2 → smallneuron-1.1.6}/example.py +0 -0
  10. {smallneuron-1.1.2 → smallneuron-1.1.6}/setup.cfg +0 -0
  11. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/__init__.py +0 -0
  12. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/build +0 -0
  13. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/gpio_h3.c +0 -0
  14. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/gpio_h3.h +0 -0
  15. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/gpio_h3.so +0 -0
  16. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/logger.py +0 -0
  17. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/snapi.py +0 -0
  18. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sndummy.py +0 -0
  19. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sngpio.py +0 -0
  20. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sninput.py +0 -0
  21. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/snmqtt.py +0 -0
  22. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron/sntimer.py +0 -0
  23. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron.egg-info/SOURCES.txt +0 -0
  24. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron.egg-info/dependency_links.txt +0 -0
  25. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron.egg-info/top_level.txt +0 -0
  26. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/PKG-INFO +0 -0
  27. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/SOURCES.txt +0 -0
  28. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/dependency_links.txt +0 -0
  29. {smallneuron-1.1.2 → smallneuron-1.1.6}/src/smallneuron_pelainux.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smallneuron
3
- Version: 1.1.2
3
+ Version: 1.1.6
4
4
  Summary: Small Neuron Workflow
5
5
  Author-email: Andres Artigas <andres@artigas.cl>
6
6
  Project-URL: Homepage, https://github.com/pypa/sampleproject
@@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools-scm"]
3
3
 
4
4
  [project]
5
5
  name = "smallneuron"
6
- version = "1.1.2"
6
+ version = "1.1.6"
7
7
  authors = [
8
8
  { name="Andres Artigas", email="andres@artigas.cl" },
9
9
  ]
@@ -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
 
@@ -37,7 +37,7 @@ def eventWait(snserial):
37
37
  fails=fails+1
38
38
  if fails > 10:
39
39
  raise("Falla multiples veces lectura serial "+str(fails))
40
- log.error("Reintentamos lectura "+str(e) )
40
+ log.warn("Reintentamos lectura "+str(e) )
41
41
  time.sleep(1)
42
42
  snserial.close()
43
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smallneuron
3
- Version: 1.1.2
3
+ Version: 1.1.6
4
4
  Summary: Small Neuron Workflow
5
5
  Author-email: Andres Artigas <andres@artigas.cl>
6
6
  Project-URL: Homepage, https://github.com/pypa/sampleproject
File without changes
File without changes
File without changes
File without changes
File without changes