Executing Controls

Arbitrary sequences of controls may be constructed using the Commands builder class. The commands may then be sent 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 returns a single CommandResult enum indicating the result. CommandResult.Success means that the outstation responded with Success for all of the controls in the message. Consult the language specific documentation for the meaning of each of the error codes that may be returned.