Exemplo n.º 1
0
 def step_no_periodic(self):
     calvinsys.read(self.timer)  # Ack
     if self.count == self.start + 2:
         # now continue with periodic timer events
         calvinsys.close(self.timer)
         self.timer = calvinsys.open(self, 'sys.timer.repeating')
     calvinsys.can_write(self.timer)  # Dummy read
     calvinsys.write(self.timer, self.sleep)
     self.count += 1
     return (self.count - 1, )
Exemplo n.º 2
0
 def step_no_periodic(self):
     calvinsys.read(self.timer) # Ack
     if self.count == self.start + 2:
         # now continue with periodic timer events
         calvinsys.close(self.timer)
         self.timer = calvinsys.open(self, 'sys.timer.repeating')
     calvinsys.can_write(self.timer) # Dummy read
     calvinsys.write(self.timer, self.sleep)
     self.count += 1
     return (self.count - 1, )
Exemplo n.º 3
0
 def open_file(self, filename):
     obj = calvinsys.open(self, "io.filesize", filename=filename)
     if calvinsys.can_read(obj):
         self.filelen = calvinsys.read(obj)
         calvinsys.close(obj)
         self.file = calvinsys.open(self,
                                    "io.filereader",
                                    filename=filename)
     if self.file is None:
         self.file_not_found = True
Exemplo n.º 4
0
 def send_data(self):
     param = calvinsys.read(self.source)
     return (param, )
Exemplo n.º 5
0
 def read_card(self):
     result = calvinsys.read(self.rfid)
     result['timestamp'] = self.time.timestamp()
     return (result,)
Exemplo n.º 6
0
 def read(self, _):
     attr = calvinsys.read(self.registry)
     return (attr,)
Exemplo n.º 7
0
 def finish_forecast(self):
     forecast = calvinsys.read(self._service)
     return (forecast,)
Exemplo n.º 8
0
 def timeout(self):
     item = self.timers.pop(0)
     calvinsys.read(item['timer'])
     calvinsys.close(item['timer'])
     return (item['token'], )
Exemplo n.º 9
0
 def send_result(self):
     result = calvinsys.read(self.command)
     return (result.get("status"), result.get("headers"),
             result.get("body"))
Exemplo n.º 10
0
 def start_measurement(self):
     # ack timer
     calvinsys.read(self.timer)
     # start measurement
     calvinsys.write(self.temperature, True)
Exemplo n.º 11
0
 def trigger(self):
     return (calvinsys.read(self.button),)
Exemplo n.º 12
0
 def read(self):
     data = calvinsys.read(self.file)
     self.totalread += len(data)
     return (data, )
Exemplo n.º 13
0
 def send_data(self):
     param = calvinsys.read(self.source)
     return (param, )
 def read_measurement(self):
     data = calvinsys.read(self.temperature)
     return (data,)
Exemplo n.º 15
0
 def send_result(self):
     result = calvinsys.read(self.command)
     return (result.get("status"), result.get("headers"), result.get("body"))
Exemplo n.º 16
0
 def deliver(self):
     humidity = calvinsys.read(self.relhum)
     return (humidity,)
Exemplo n.º 17
0
 def step_periodic(self):
     calvinsys.read(self.timer)  # Ack
     self.count += 1
     return (self.count - 1, )
Exemplo n.º 18
0
 def read(self, _):
     attribute = calvinsys.read(self.registry)
     return (attribute, )
Exemplo n.º 19
0
 def read_measurement(self):
     value = calvinsys.read(self.temperature)
     # reset timer
     calvinsys.write(self.timer, self.period)
     return (value,)
Exemplo n.º 20
0
 def receive(self):
     data = calvinsys.read(self.cc)
     return (data,)
Exemplo n.º 21
0
 def start_measurement(self):
     # ack timer
     calvinsys.read(self.timer)
     # start measurement
     calvinsys.write(self.temperature, True)
Exemplo n.º 22
0
 def report(self):
     objects = calvinsys.read(self._object_counter)
     return (objects, )
 def read_measurement(self):
     data = calvinsys.read(self.pressure)
     return (data,)
Exemplo n.º 24
0
 def read_measurement(self):
     level = calvinsys.read(self.level)
     return (level, )
Exemplo n.º 25
0
 def initial_action(self):
     calvinsys.read(self.schedule)  # ack
     calvinsys.close(self.schedule)
     self.schedule = None
     return (self.data, )
Exemplo n.º 26
0
 def cnt(self):
     calvinsys.read(self.schedule) # ack
     calvinsys.can_write(self.schedule)
     calvinsys.write(self.schedule, 0) #reset
     self.count += 1
     return (self.count, )
Exemplo n.º 27
0
 def read(self, _):
     attribute = calvinsys.read(self.registry)
     return (attribute,)
Exemplo n.º 28
0
 def trigger(self):
     calvinsys.read(self.timer) # Ack
     return (self.data, )
Exemplo n.º 29
0
 def handle_reply(self):
     self.response = calvinsys.read(self.cmd)
Exemplo n.º 30
0
 def receive(self):
     data = calvinsys.read(self.listener)
     return (data,)
Exemplo n.º 31
0
 def read_measurement(self):
     data = calvinsys.read(self.temperature)
     return (data, )
 def receive(self):
     message = calvinsys.read(self.listener)
     return (message["data"],)
Exemplo n.º 33
0
 def read_card(self):
     result = calvinsys.read(self.rfid)
     result['timestamp'] = self.time.timestamp()
     return (result, )
Exemplo n.º 34
0
 def read_measurement(self):
     value = calvinsys.read(self.temperature)
     # reset timer
     calvinsys.write(self.timer, self.period)
     return (value, )
Exemplo n.º 35
0
 def read_measurement(self):
     temperature = calvinsys.read(self._temperature)
     self._timer = self['timer'].once(1.0 / self.frequency)
     return (temperature, )
Exemplo n.º 36
0
 def read(self):
     line = calvinsys.read(self.file)
     return (line, )
Exemplo n.º 37
0
 def read(self, _):
     value = calvinsys.read(self.registry)
     return (value, )
Exemplo n.º 38
0
 def passthrough(self, token):
     calvinsys.read(self.timer)
     return (token, )
Exemplo n.º 39
0
 def report(self):
     image = calvinsys.read(self._object_counter)
     return (image, )
 def read(self, _):
     value = calvinsys.read(self.registry)
     return (value,)
Exemplo n.º 41
0
 def timeout(self):
     item = self.timers.pop(0)
     calvinsys.read(item['timer'])
     calvinsys.close(item['timer'])
     return (item['token'], )
Exemplo n.º 42
0
 def receive(self):
     data = calvinsys.read(self.server)
     return (data["handle"], data["data"])
Exemplo n.º 43
0
 def passthrough(self, token):
     calvinsys.read(self.timer)
     return (token, )
Exemplo n.º 44
0
 def receive(self):
     data = calvinsys.read(self.listener)
     return (data, )
Exemplo n.º 45
0
 def read_pin(self):
     state = calvinsys.read(self._pin)
     return (1 if state else 0,)
 def deliver(self):
     humidity = calvinsys.read(self.relhum)
     return (humidity,)
Exemplo n.º 47
0
 def read_message(self):
     message = calvinsys.read(self.mqtt)
     return (message, )
Exemplo n.º 48
0
 def action(self):
     state = calvinsys.read(self.switch)
     return (state, )
Exemplo n.º 49
0
 def read_measurement(self):
     distance = calvinsys.read(self._distance)
     return (distance,)
Exemplo n.º 50
0
 def handle_reply(self):
     self.response = calvinsys.read(self.cmd)
Exemplo n.º 51
0
 def start_measurement(self):
     calvinsys.read(self._timer)
     calvinsys.write(self._distance, True)
Exemplo n.º 52
0
 def report(self):
     objects = calvinsys.read(self._object_counter)
     return (objects, )
 def logger(self):
     calvinsys.read(self.timer)
     _log.info("{}: received: {}, sent: {}".format(self.buffer_id, self.received, self.sent))
     calvinsys.write(self.timer, self.interval)
Exemplo n.º 54
0
 def step_periodic(self):
     calvinsys.read(self.timer) # Ack
     self.count += 1
     return (self.count - 1, )
 def pop_data(self):
     data = calvinsys.read(self.fifo)
     self.sent += len(data)
     _log.info("popping")
     return (data, )
Exemplo n.º 56
0
 def state_change(self):
     value = calvinsys.read(self.sensor)
     return (True if value else False,)
Exemplo n.º 57
0
 def send_image(self):
     image = calvinsys.read(self._cam)
     return (image, )