bluesky_queueserver_api.console_monitor.ConsoleMonitor_ZMQ_Threads.text_uid

property ConsoleMonitor_ZMQ_Threads.text_uid

Returns UID of the current text buffer. UID is changed whenever the contents of the buffer is changed. Monitor UID to minimize the number of data reloads (if necessary).

Examples

Synchronous API

RM.console_monitor.enable()

uid = RM.console_monitor.text_uid
while True:
    uid_new = RM.console_monitor.text_uid
    if uid_new != uid:
        uid = uid_new
        text = RM.console_monitor.text()
        # Use 'text'
    ttime.sleep(0.1)

Asynchronous API

RM.console_monitor.enable()

uid = RM.console_monitor.text_uid
while True:
    uid_new = RM.console_monitor.text_uid
    if uid_new != uid:
        uid = uid_new
        text = await RM.console_monitor.text()
        # Use 'text'
    asyncio.sleep(0.1)