Create System State Controller #16

Merged
sebgab merged 15 commits from system-state-controler_datastructures into main 2026-02-11 17:29:50 +00:00
Owner

Related to #4

Closes #10

Related to #4 Closes #10
Start creating state controller datastructures
All checks were successful
/ build_and_test (push) Successful in 24s
1e7a04dd91
See #10
Added more datastruct types after talking with group
All checks were successful
/ build_and_test (push) Successful in 24s
d7622df5c1
More comments for datastructures
All checks were successful
/ build_and_test (push) Successful in 25s
848453fe3e
Add SystemState datatype and impl ElevatorCall
Some checks failed
/ build_and_test (push) Failing after 18s
37b455278c
Add usage example and add ElevatorCallInterface
Some checks failed
/ build_and_test (push) Failing after 22s
dfa0ee9a52
Create test checking if state is smaller than max packet size
All checks were successful
/ build_and_test (push) Successful in 30s
122110751b
Create ElevatorInterface
All checks were successful
/ build_and_test (push) Successful in 31s
8a89516922
Add sample information for three elevators to size test
Some checks failed
/ build_and_test (push) Failing after 23s
0aa4dbf1ac
Repalce UUID with small_uid
All checks were successful
/ build_and_test (push) Successful in 30s
cc85b3e4c4
Add a couple more serialization related tests
All checks were successful
/ build_and_test (push) Successful in 31s
aa0c7c075c
Update doccomment
All checks were successful
/ build_and_test (push) Successful in 31s
7de4d8d8db
Author
Owner

Requesting review @Athamantis @Hemmily

Requesting review @Athamantis @Hemmily
Athamantis requested changes 2026-02-11 15:58:44 +00:00
Dismissed
@ -8,0 +16,4 @@
use crate::system_state_controller::Destination;
async fn test_reader(state: Arc<RwLock<SystemState>>) {
Owner

add commet, will it stay? or will it be removed

add commet, will it stay? or will it be removed
Author
Owner

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.

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.
sebgab marked this conversation as resolved
@ -8,0 +23,4 @@
}
}
async fn test_writer(state: Arc<RwLock<SystemState>>, cabber: bool) {
Owner

same here

same here
Author
Owner

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.

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.
sebgab marked this conversation as resolved
@ -2,0 +138,4 @@
/// Get the elevator's current direction
pub fn get_direction(&self) -> Option<Direction> {
todo!("Implement")
}
Owner

add function obstruction, and is_door_open? and close/open door?

get current floor?? and get_destination -> returns a floor?

add function obstruction, and is_door_open? and close/open door? get current floor?? and get_destination -> returns a floor?
Author
Owner

add function obstruction, and is_door_open? and close/open door?

Added and implemented in fd7bcb3.
These functions are abstracted through ElevatorInterface and ElevatorInfo

> add function obstruction, and is_door_open? and close/open door? Added and implemented in fd7bcb3. These functions are abstracted through ElevatorInterface and ElevatorInfo
Author
Owner

get current floor?? and get_destination -> returns a floor?

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.

> get current floor?? and get_destination -> returns a floor? 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.
Hemmily approved these changes 2026-02-11 16:27:20 +00:00
Dismissed
Move functions into ElevatorInfo and ElevatorInterface
All checks were successful
/ build_and_test (push) Successful in 35s
fd7bcb39a2
Update function definitions
All checks were successful
/ build_and_test (push) Successful in 32s
6888666474
Add get destinatioon function and expose the elevator interface
All checks were successful
/ build_and_test (push) Successful in 32s
e21af15f84
Athamantis approved these changes 2026-02-11 17:28:44 +00:00
Athamantis left a comment
Owner

lgtm

lgtm
Hemmily approved these changes 2026-02-11 17:29:08 +00:00
Dismissed
Hemmily approved these changes 2026-02-11 17:29:30 +00:00
sebgab merged commit ed2434e4b0 into main 2026-02-11 17:29:50 +00:00
sebgab deleted branch system-state-controler_datastructures 2026-02-11 17:29:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TTK4145/elevator!16
No description provided.