Add selfserve_lane_log_action enum for lane action definitions and outline logging mechanism.

This commit is contained in:
Jeppe Bundgaard
2026-01-06 11:04:50 +01:00
parent 14aaf68d69
commit 0b08d8dbe6
2 changed files with 26 additions and 0 deletions
@@ -0,0 +1,25 @@
<?php
namespace modules\selfserve\helpers;
enum selfserve_lane_log_action
{
case START_WASH; // start a wash cycle
case STOP_WASH; // stop a wash cycle
case SET_MAINTENANCE; // set lane to maintenance mode
case CLEAR_MAINTENANCE; // clear maintenance mode
case SET_FAULT; // set lane to fault state
case CLEAR_FAULT; // clear fault state
case OPEN_PORT; // open a lane port
case CLOSE_PORT; // close a lane port
case RESERVE_LANE; // reserve the lane
case RELEASE_LANE; // release the lane from reservation
case CLOSE_LANE; // close the lane
case OPEN_LANE; // open the lane
public function equals(selfserve_lane_log_action $status): bool
{
return $this === $status;
}
}
@@ -53,6 +53,7 @@ trait selfserve_lane_command_t
$this->open(selfserve_lane_port::ENTRANCE);
// Start the wash timer
$this->setWashStartTime(time());
// Log the lane start event TODO: Implement logging mechanism
break;
case selfserve_lane_command::STOP:
// Require lane to be occupied before stopping