How martinawk/heislab2 works
This is a coursework repository of elevator-control implementations and process/networking experiments, rather than one integrated product. The principal workflow is elevator inputs → request/FSM decisions → motor, door, and lamp outputs; a separate variant adds master-listening behavior. Other branches demonstrate file-based process failover, UDP master-ID discovery, and a standalone TCP client. The README gives no capability detail, so component links below rely on sampled code; unsampled modules are included only where the tree identifies them, and are not given speculative connections.
Main entry points: driver-go-master/main.go Single-elevator loop · fsm.go Elevator FSM · Excer4_ProcessPair_correct_kill/main.go File failover loop · elevator_io.go Hardware I/O
Components 17
Elevator control
- Single-elevator loop
single_elevator/driver-go-master/main.go - Elevator config
single_elevator/driver-go-master/config/config.go - Elevator state
single_elevator/driver-go-master/elevator/elevator.go - Hardware I/O
single_elevator/driver-go-master/elevio/elevator_io.go - Elevator FSM
single_elevator/driver-go-master/fsm/fsm.go - Request policy
single_elevator/driver-go-master/requests/requests.go - Door timer
single_elevator/driver-go-master/timer/timer.go
Master coordination
- Clustered loop
InTheBeninging/gruppe21_mandag/driver-go-master/main.go - Master functions
InTheBeninging/gruppe21_mandag/driver-go-master/masterfunctions/masterfunctions.go
Process failover
- File failover loop
Excer4_ProcessPair_correct_kill/main.go - Progress file
Excer4_ProcessPair_correct_kill/data.txt - Process ID file
Excer4_ProcessPair_correct_kill/pid.txt
Network experiments
- UDP peer experiment
Excer4/Excer_4_Network/main.go - TCP client
TCP.go - TCP service
- UDP receiver helper
UDP_rec.go
Other components
- Elevator user
Connections 17
- Elevator user → Hardware I/O: presses controls
- Single-elevator loop → Hardware I/O: initializes and polls
single_elevator/driver-go-master/main.go - Single-elevator loop → Elevator state: initializes state
single_elevator/driver-go-master/main.go - Single-elevator loop → Elevator FSM: dispatches events
single_elevator/driver-go-master/main.go - Single-elevator loop → Door timer: reads timer channel
single_elevator/driver-go-master/main.go - Elevator FSM → Request policy: evaluates requests
single_elevator/driver-go-master/fsm/fsm.go - Elevator FSM → Hardware I/O: sets hardware outputs
single_elevator/driver-go-master/fsm/fsm.go - Elevator FSM → Door timer: starts timer
single_elevator/driver-go-master/fsm/fsm.go - Request policy → Elevator state: reads and clears
single_elevator/driver-go-master/requests/requests.go - Single-elevator loop → Elevator config: uses settings
single_elevator/driver-go-master/main.go - Clustered loop → Master functions: listens for master
InTheBeninging/gruppe21_mandag/driver-go-master/main.go - Clustered loop → Elevator FSM: dispatches events
InTheBeninging/gruppe21_mandag/driver-go-master/main.go - File failover loop → Progress file: reads and writes
Excer4_ProcessPair_correct_kill/main.go - File failover loop → Process ID file: reads and writes
Excer4_ProcessPair_correct_kill/main.go - File failover loop → File failover loop: restarts process
Excer4_ProcessPair_correct_kill/main.go - UDP peer experiment → UDP peer experiment: broadcasts and receives IDs
Excer4/Excer_4_Network/main.go - TCP client → TCP service: exchanges messages
TCP.go