Skip to main content

AssociationInformation

AssociationInformation tells you what the master does with an outstation: every task it runs, whether yours or automatic, and every unsolicited response it receives. Use it for alarms and metrics. A failing automatic task, such as a rejected enable-unsolicited, shows up here before anywhere else.

CallbackCalled when
taskStartThe master starts a task. It receives the task type, function code and sequence number
taskSuccessA task completes successfully
taskFailA task fails. It receives the reason
unsolicitedResponseThe master processes an unsolicited response, or receives a repeat of the last one

Keep-alives and link status checks aren't reported, and neither is a request that fails before it starts, for example because the channel isn't connected: only its caller sees that error.

A successful file read task doesn't mean that the transfer succeeded. The FileReader is the source of truth for the transfer.

#[derive(Copy, Clone)]
struct ExampleAssociationInformation;

impl AssociationInformation for ExampleAssociationInformation {}
note

In Rust, every AssociationInformation callback does nothing by default, so you implement only the ones you need.