tac.extensions.shopk_access.monitor_ui

Provides interactive monitor-based UI for card purchases and renewals. Allows users without terminal access to make choices and see transaction progress.

Author: Twijn
View on GitHub →

Functions

monitor_ui.isInUse()

View source

Check if monitor is currently in use (showing interactive UI)

Returns: boolean - true if monitor is showing interactive screens

monitor_ui.lock()

View source

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()

View source

Unlock the monitor (clear isInUse flag) to allow shop_monitor updates Note: clearSession() also unlocks

monitor_ui.init(tac, monitorSide)

View source

Initialize monitor UI

Parameters:
Returns: boolean - success status

monitor_ui.showRenewalChoice(data, callback)

View source

Show renewal choice screen

Parameters:

monitor_ui.showPurchaseChoice(data, callback)

View source

Show new purchase choice screen

Parameters:

monitor_ui.showNFCWriting(data)

View source

Show NFC card writing progress screen

Parameters:

monitor_ui.showSuccess(message, details)

View source

Show success screen

Parameters:

monitor_ui.showError(message)

View source

Show error screen

Parameters:

monitor_ui.handleTouch(x, y)

View source

Handle touch events

Parameters:

monitor_ui.handleTimer(timerID)

View source

Handle timer events for clearing screens

Parameters:

monitor_ui.startTouchListener(tac)

View source

Start touch listener in background

Parameters:

monitor_ui.stopTouchListener()

View source

Stop touch listener

monitor_ui.clearSession()

View source

Clear active session and return to default screen

monitor_ui.isAvailable()

View source

Check if monitor UI is available

Returns: boolean

monitor_ui.getMonitor()

View source

Get active monitor

Returns: table - monitor peripheral or nil