Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMON Driver #34

Merged
merged 92 commits into from
Dec 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
b4ee371
PMON driver starting point
mslaffin Dec 3, 2024
334a0ce
added the crc function from the manual
mark11778 Dec 3, 2024
0e99255
pull redundant crc method
mslaffin Dec 3, 2024
0682de4
add connection checker
mslaffin Dec 3, 2024
d2de18f
Read configuration method
mslaffin Dec 4, 2024
4ed5a68
return the temp units
mslaffin Dec 4, 2024
47de2a0
call connection method after initializing
mslaffin Dec 4, 2024
b489e76
check/restore connection prior to read
mslaffin Dec 4, 2024
4ee5780
add disconnection method
mslaffin Dec 4, 2024
7df9534
name adjustment
mslaffin Dec 4, 2024
e265226
put the gauges into a grid now so they can horoizontially reposition …
mark11778 Dec 6, 2024
7dddfa5
renamed enviormental to process monitor
mark11778 Dec 7, 2024
b79e4c7
adjusted bottom row frame widths, not show all tempature gauges
mark11778 Dec 7, 2024
ab28ae6
README.md file in progress
arundhatisingh17 Dec 7, 2024
a2d0fc9
small format change
arundhatisingh17 Dec 7, 2024
87b0263
dependencies added
arundhatisingh17 Dec 7, 2024
5102fea
Update README.md
arundhatisingh17 Dec 7, 2024
c0057e8
added descriptions for both the subclasses
arundhatisingh17 Dec 7, 2024
34b19c6
Update README.md
arundhatisingh17 Dec 7, 2024
5954a5b
Update README.md
arundhatisingh17 Dec 7, 2024
ac0753f
Update README.md
arundhatisingh17 Dec 7, 2024
5eea608
Readme updates
arundhatisingh17 Dec 7, 2024
63076f3
small update
arundhatisingh17 Dec 7, 2024
fd7730f
few changes made
arundhatisingh17 Dec 7, 2024
4660806
reorder monitor mapping
mslaffin Dec 7, 2024
2a7c482
remove unused imports
mslaffin Dec 7, 2024
5183ade
Added to the Pmon readme, from findings today
mark11778 Dec 7, 2024
b43f4e7
update register addressing, float handling, per Mark's tests
mslaffin Dec 8, 2024
c799efa
add basic usage to README
mslaffin Dec 8, 2024
53ebda5
minor typo fixes, and added another unit to read from 6th sensor
Dec 8, 2024
1ffad21
added setter method to set to correct decimal config
mark11778 Dec 8, 2024
479e330
removed commited print msg
mark11778 Dec 8, 2024
d38c91f
Switched warm colour on temperature bar to yellow
Dec 8, 2024
0d7bf3f
Merge branch 'feature/PMON_driver' of https://github.com/uw-loci/EBEA…
Dec 8, 2024
b93bab6
added comments
mark11778 Dec 8, 2024
5ac9a21
fixed tiny issue with initializing self.logger
Dec 8, 2024
2a3d71e
Ensured temperature bars display the orange colour upon an error from…
Dec 8, 2024
8f4d177
resolving bar height issues on error
Dec 9, 2024
b62ada8
fix logic in set decimal config
mslaffin Dec 9, 2024
5c42a6b
rearranging register reads
mark11778 Dec 9, 2024
602929b
currently am thinking that each process will need to be on its own th…
mark11778 Dec 9, 2024
b3a8ea5
added threading, not gui is running significantly faster
mark11778 Dec 9, 2024
ecd7c3b
this works a lot more consistanly, but the communication is still inc…
mark11778 Dec 9, 2024
087d962
return False on failure instead of None
mslaffin Dec 9, 2024
44885d5
fix spelling
mslaffin Dec 9, 2024
48225c4
_set_config: add individual write checks and exit early for invalid unit
mslaffin Dec 9, 2024
c86f034
tweak response name and sleep cleanly
mslaffin Dec 9, 2024
9c4b99a
safe accessing the last response dict
mslaffin Dec 9, 2024
5fb0cb6
updated and fixed typos in readme
mark11778 Dec 9, 2024
4eb24e1
actually adding the readme edits and removing accidential changes
mark11778 Dec 9, 2024
3709064
lol how many more typos still hind in the readme
mark11778 Dec 9, 2024
727d7a4
added more logging
mslaffin Dec 9, 2024
72b5db1
resolve merge conflict and add logging
mslaffin Dec 9, 2024
b0f9bfd
updated readme file again?
mark11778 Dec 9, 2024
100acc7
Modified bar colours to handle temperature ranges for different sensors
Dec 9, 2024
9244c1f
Ensured GUI scales are now adjusted for each intended sensor
Dec 9, 2024
7757c27
minor fix for previous commit of adjusting GUI scales
Dec 9, 2024
d74c440
changed how threading works, now back to the for loop
mark11778 Dec 9, 2024
4e8767f
updates made to key components on readme
arundhatisingh17 Dec 9, 2024
25c20c1
updated key components
arundhatisingh17 Dec 9, 2024
3972951
updates made to key components - README.md
arundhatisingh17 Dec 9, 2024
4d433f1
small change in README.md
arundhatisingh17 Dec 9, 2024
19d5771
added workflow
arundhatisingh17 Dec 9, 2024
2422c45
this workds but it is without threading
mark11778 Dec 9, 2024
2674099
added threading but i am also certian it is wrong, would you be able …
mark11778 Dec 9, 2024
4cad2c0
simplify threading with poll_all_units. unified shutdown logic
mslaffin Dec 10, 2024
2297f05
update monitor call syntax, remove unused import
mslaffin Dec 10, 2024
7cf8409
more specific exception handling
mslaffin Dec 10, 2024
5e52b7d
pull in G9's exponential backoff scheme and make logging consistent
mslaffin Dec 11, 2024
ce2254c
Move error handling and backoff logic to subsystem. Making logging co…
mslaffin Dec 11, 2024
b311e9c
Update README.md
mslaffin Dec 11, 2024
2d4a8a5
Updated flowcharts in README.md
mslaffin Dec 11, 2024
4b35694
thread-safe access readings, reliability improvements, initialization…
mslaffin Dec 12, 2024
efb1a92
distinct visual states for sensor errors vs disconnection.
mslaffin Dec 12, 2024
1113bd3
set lower scale limits to 20C instead of zero
mslaffin Dec 12, 2024
0068bb4
readability improvement
mslaffin Dec 12, 2024
a7c41aa
fix dictionary key type in poll_single_unit
mslaffin Dec 13, 2024
a7ceaf2
initialize readings to None instead of -1 which felt ambiguous
mslaffin Dec 13, 2024
e9f1dec
account for temp_min in temp bar scaling calculation
mslaffin Dec 13, 2024
87d5d4e
resolve logical error for identifying error states
mslaffin Dec 13, 2024
5cd2399
avoid potential race condition where we might call set_all_temps_erro…
mslaffin Dec 13, 2024
1620906
remove unused import
mslaffin Dec 13, 2024
fb88a13
replace magic numbers with class constants
mslaffin Dec 13, 2024
0a4a4c3
thread safe getter method for temp readings
mslaffin Dec 13, 2024
859feb5
use thread-safe access method
mslaffin Dec 13, 2024
03caeff
replace hard-coded values with class constants
mslaffin Dec 13, 2024
47aa276
remove unused flowchart
mslaffin Dec 14, 2024
a75034a
Update README.md
mslaffin Dec 14, 2024
a173e9e
remove redundant connection upon instantiation. Track working unit st…
mslaffin Dec 14, 2024
45f73d5
build response dictionary in atomic step to prevent thread access
mslaffin Dec 15, 2024
dc84b7d
add ProcessMonitors to COM port configuration
mslaffin Dec 15, 2024
573688e
remove explicit subsystem import and readability improvements
mslaffin Dec 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added descriptions for both the subclasses
arundhatisingh17 committed Dec 7, 2024
commit c0057e82fd0e7ca06112e0a5bcf4c2ba1d4ff165
6 changes: 4 additions & 2 deletions subsystem/process_monitor/README.md
Original file line number Diff line number Diff line change
@@ -30,15 +30,17 @@



## Key Components
## Key Components - Main Code Structure

This application mainly consists of the following key components -

- **TemperatureBar Class**: The `TemperatureBar Class` is responsible for creating and updating the visual representation of temperature data for each sensor. It instantiates a constructor that inherits from tk.canvas and sets the attributes - name, height, width, bar_width, and value. The update_value method within this class is called with the updated temperatures of all the units. It is mainly called on the bar corresponding to the sensor whose temperature is to be updated. Upon being called, the bar for that particular sensor is deleted and a new bar is recreated which is scaled and colored based on the updated temperatures returned by the temp_bars disctionary.



- **ProcessMonitorSusbsystem Class**:
- **ProcessMonitorSusbsystem Class**: The `ProcessMonitorSubsystem Class` is responsible for calling the parent tkinter frame. It instantiates a DP16ProcessMonitor object. If the DP16Monitor object fails to connect via the RS-485 port, i.e., if the connect method in the `DP16_process_monitor` class fails to execute, the logger throws a warning message mentioning the same.

The setup_gui method within this class is responsible for the initial setup of the GUI. It instantiates and places the TemperatureBar objects within the parent frame for readily displaying the real-time temperature status of the monitored units, when the class is instantiated.