Create System State Controller #16
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
priority
high
priority
low
priority
medium
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
TTK4145/elevator!16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "system-state-controler_datastructures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related to #4
Closes #10
Requesting review @Athamantis @Hemmily
@ -8,0 +16,4 @@use crate::system_state_controller::Destination;async fn test_reader(state: Arc<RwLock<SystemState>>) {add commet, will it stay? or will it be removed
This will be removed. It is just a test so that I could make a realistic sharing scenario for the System state when implementing the sharing mechanism.
@ -8,0 +23,4 @@}}async fn test_writer(state: Arc<RwLock<SystemState>>, cabber: bool) {same here
This will be removed. It is just a test so that I could make a realistic sharing scenario for the System state when implementing the sharing mechanism.
@ -2,0 +138,4 @@/// Get the elevator's current directionpub fn get_direction(&self) -> Option<Direction> {todo!("Implement")}add function obstruction, and is_door_open? and close/open door?
get current floor?? and get_destination -> returns a floor?
Added and implemented in
fd7bcb3.These functions are abstracted through ElevatorInterface and ElevatorInfo
Yes, you are requesting which floor you are on, and then you get that floor.
Same goes for the destination, you get the floor we have as the destination.
lgtm