Provides interactive monitor-based UI for card purchases and renewals. Allows users without terminal access to make choices and see transaction progress.
View on GitHub →monitor_ui.isInUse()Check if monitor is currently in use (showing interactive UI)
monitor_ui.lock()Lock the monitor (set isInUse flag) to prevent shop_monitor updates This should be called at the start of a transaction flow
monitor_ui.unlock()Unlock the monitor (clear isInUse flag) to allow shop_monitor updates Note: clearSession() also unlocks
monitor_ui.init(tac, monitorSide)Initialize monitor UI
tac (table): - TAC instancemonitorSide (string): - side where monitor is attached (optional, will auto-detect)monitor_ui.showRenewalChoice(data, callback)Show renewal choice screen
data (table): - transaction and card datacallback (function): - callback(choice) where choice is "data" or "nfc" or nil for cancelmonitor_ui.showPurchaseChoice(data, callback)Show new purchase choice screen
data (table): - transaction and purchase datacallback (function): - callback(choice) where choice is "write" or nil for cancelmonitor_ui.showNFCWriting(data)Show NFC card writing progress screen
data (table): - card writing datamonitor_ui.showSuccess(message, details)Show success screen
message (string): - success messagedetails (table): - optional details to displaymonitor_ui.showError(message)Show error screen
message (string): - error messagemonitor_ui.handleTouch(x, y)Handle touch events
x (number): - touch X coordinatey (number): - touch Y coordinatemonitor_ui.handleTimer(timerID)Handle timer events for clearing screens
timerID (number): - the timer ID that firedmonitor_ui.startTouchListener(tac)Start touch listener in background
tac (table): - TAC instance