Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezade authored and alirezade committed Jan 10, 2024
1 parent 962a683 commit d251ff3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/ics_sim/Device.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def add_sensor(self, tag, fault):
def read(self, tag):
if tag in self._sensors.keys():
value = self._get(tag)
print(f"readed value {tag} is {value}")
value += random.uniform(value, -1 * value) * self._sensors[tag]


return value
else:
raise LookupError()
Expand Down
2 changes: 2 additions & 0 deletions src/ics_sim/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def get(self, key):
cursor = conn.cursor()
cursor.execute(get_query, [key])
record = cursor.fetchone()

print(f"read {key} with value {record[0]}")
return record[0]

except sqlite3.Error as e:
Expand Down

0 comments on commit d251ff3

Please sign in to comment.