Skip to content

Move generic client TimestampMode/SamplingInterval to device defaults - #41

Merged
viacheslauK merged 4 commits into
improvements-for-generic-clientfrom
generic-client-config-rebuild
Oct 1, 2026
Merged

viacheslauK merged 4 commits into
improvements-for-generic-clientfrom
generic-client-config-rebuild

Conversation

@viacheslauK

@viacheslauK viacheslauK commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The device now holds only defaults for new blocks: DefaultTimestampMode and DefaultSamplingInterval. Each MonitoredItem has its own TimestampMode and SamplingInterval properties, which start from those defaults. None of these properties is part of a config. They exist only as properties after the object is created.

Changes

  • Device: TimestampMode is replaced by DefaultTimestampMode and DefaultSamplingInterval is added. An invalid interval falls back to 100 ms. The config parameter and createDefaultConfig() are removed.

  • Module: the add-device default config no longer contains device properties.

  • MonitoredItem FB:

    • SamplingInterval is removed from the type's default config.
    • TimestampMode and SamplingInterval are added as FB properties, initialized from the device defaults.
    • setDomainSource() is removed.
  • Tests / USAGE.md: updated for the new model. New tests cover inheriting the defaults and ignoring these properties when they are passed in a config.

    Notes

    • Breaking: these properties are silently ignored in the add-device and add-FB configs. Set them after creation.
    • Behaviour change: changing the device default no longer reconfigures existing blocks. It only affects blocks added afterwards.

@viacheslauK viacheslauK self-assigned this Sep 28, 2026
@viacheslauK viacheslauK changed the title Generic client config rebuild Move generic client TimestampMode/SamplingInterval to device defaults Sep 28, 2026
status and reconfigures the signals if the data type changed:
| Property | Type | Default | In config | Applied |
|---|---|---|---|---|
| `LocalId` | String | `""` | yes | at creation only |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't quite tell from this PR, but is the LocalID required here? It should be optional and generated for the monitored item FB if left empty.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can leave it empty, it is not required

@viacheslauK
viacheslauK merged commit e92e7f7 into improvements-for-generic-client Oct 1, 2026
19 checks passed
@viacheslauK
viacheslauK deleted the generic-client-config-rebuild branch October 1, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants