Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder can handle FC1/FC2 request batching #14

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Builder can handle FC1/FC2 request batching #14

merged 1 commit into from
Oct 15, 2024

Conversation

aldas
Copy link
Owner

@aldas aldas commented Oct 14, 2024

NB: there are breaking changes to APIs. See changelog.

Builder should be able to split fc1/fc2 coil fields to batches.

We do this by instruducing new builder field type and for that b.Coil(coilAddress) method. For fc1/fc2 there are new methods like ReadCoilsTCP/ReadDiscreteInputsTCP. You can add other types at the same time but current implementation will just ignore register fields when dealing with coils.

	reqs, err := b.Add(b.Coil(19).Name("alarm_do_1").UnitID(0)).
		ReadCoilsTCP()

@aldas aldas merged commit 2cd4d3c into main Oct 15, 2024
2 checks passed
@aldas aldas deleted the builder_coils branch October 15, 2024 06:40
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.

1 participant