Periodic Polling
You should typically add periodic polls before calling MasterChannel.enable(). However, you can also add or remove periodic polls at any time. You can specify the
association to poll, the type of request, and the polling interval.
- Rust
- C
- Java
- C#
let mut poll = association
.add_poll(
EventClasses::all().to_classes().to_request(),
Duration::from_secs(5),
)
.await?;
dnp3_request_t *poll_request = dnp3_request_new_class(false, true, true, true);
dnp3_poll_id_t poll_id;
err = dnp3_master_channel_add_poll(channel, association_id, poll_request, 5000, &poll_id);
dnp3_request_destroy(poll_request);
// check error
PollId poll =
channel.addPoll(
association, Request.classRequest(false, true, true, true), Duration.ofSeconds(5));
var poll = channel.AddPoll(association, Request.ClassRequest(false, true, true, true), TimeSpan.FromSeconds(5));
The Request class is a builder type that lets you construct arbitrary READ requests, including:
- Class reads (0,1,2,3)
- One- or two-byte range reads
- All objects (qualifier 0x06) reads for arbitrary variations