Skip to content

o6.client.MonitoredItem

Represents a monitored item within a subscription.

o6.client.MonitoredItem

Represents a monitored item within a subscription.

Functions

__await__

__await__()

Allow await MonitoredItem(...) to work.

Creating a monitored item requires a server round-trip, but __init__ cannot be async. The round-trip is therefore started in __init__ and awaited here, so callers can write item = await MonitoredItem(...) and be sure the item is fully set up before proceeding.

__bool__

__bool__()

Check if this is a valid MonitoredItem.

A deleted monitored item evaluates to False. delete() cleans up the monitored item on the server and client side, but cannot interfere with garbage collection of the Python object itself. Garbage collecting a deleted monitored item is a noop in terms of state cleanup, but until then __bool__ indicates that the monitored item is invalid.

delete

delete()

Delete this monitored item from its subscription.

Returns:

Type Description
MaybeAwaitable[None]

The raw result of the delete operation.

modify

modify(
    sampling_interval=None,
    queue_size=None,
    discard_oldest=None,
    filter=None,
)

Modify monitored item parameters.

Parameters:

Name Type Description Default
sampling_interval float | None

Optional new sampling interval.

None
queue_size int | None

Optional new queue size.

None
discard_oldest bool | None

Optional discard-oldest flag.

None
filter DataChangeFilter | EventFilter | str | None

Optional data change or event filter.

None

Returns:

Type Description
MaybeAwaitable[None]

The raw result of the modify operation.

set_monitoring_mode

set_monitoring_mode(mode)

Change the monitoring mode for this monitored item.

Parameters:

Name Type Description Default
mode MonitoringMode

The new monitoring mode.

required

Returns:

Type Description
MaybeAwaitable[None]

The raw result of the operation.

set_triggering

set_triggering(links_to_add=None, links_to_remove=None)

Configure triggering links for this monitored item.

Parameters:

Name Type Description Default
links_to_add list[MonitoredItem] | None

Monitored items to add as triggered links.

None
links_to_remove list[MonitoredItem] | None

Monitored items to remove from triggered links.

None

Returns:

Type Description
MaybeAwaitable[None]

The raw result of the operation.