change_detection#

Functions that classify config change keys. Typically used downstream of CfgChanged events

any_channel_property_changed(changed_keys: Tuple[str, ...], suffix: str) bool[source]#

Whether any channel had the given property suffix changed (e.g. ‘.path’, ‘.data_type’).

channel_data_type_changed(changed_keys: Tuple[str, ...]) bool[source]#

Whether any channel’s data_type was modified.

channel_path_changed(changed_keys: Tuple[str, ...]) bool[source]#

Whether any channel’s raw path was set or changed.

channels_added_or_removed(changed_keys: Tuple[str, ...]) bool[source]#

Whether the channels list itself changed (add/remove, not just property edit).

channels_with_changed_property(changed_keys: Tuple[str, ...], prop: str) set[str][source]#

Extract channel names where a specific property changed.

Parameters:
  • changed_keys (Tuple[str, ...]) – The tuple of changed config keys.

  • prop (str) – The property to extract channel names from. (e.g. ‘.data_type’, ‘.path’)

Returns

set[str]

The set of channel names that had the specified property changed.

extract_changed_channel_names(changed_keys: Tuple[str, ...]) set[str][source]#

Extract the set of channel names touched by the change.

whole_sample_changed(changed_keys: Tuple[str, ...]) bool[source]#

Whether the entire sample section was replaced.