Skip to main content

Executing Controls

You can construct arbitrary sequences of controls using the Commands builder class. You can then send these commands to a particular outstation using the association id.

if let Err(err) = association
.operate(
CommandMode::SelectBeforeOperate,
CommandBuilder::single_header_u16(
Group12Var1::from_op_type(OpType::LatchOn),
3u16,
),
)
.await
{
tracing::warn!("error: {}", err);
}
note

The Rust API calls the builder class 'CommandBuilder'.

The asynchronous operation will return a single CommandResult enum that indicates the result. CommandResult.Success means the outstation responded with Success for all controls in the message. Consult the language-specific documentation for the meaning of each error code.