Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
mm::node::OsCommandConfig Struct Reference

Timing and cancellation for SomanetDrive::runOsCommand. More...

#include <somanet_drive.h>

Public Attributes

std::chrono::milliseconds timeout {1000}
 Ceiling on the whole command.
 
std::chrono::milliseconds pollInterval {10}
 Delay between response polls.
 
std::chrono::milliseconds abortTimeout {10000}
 Time allowed to confirm a forced abort.
 
std::stop_token stop {}
 Requesting a stop aborts the command; default never stops.
 

Detailed Description

Timing and cancellation for SomanetDrive::runOsCommand.

timeout is a ceiling on the whole command, not a liveness check — the drive fails a command no downstream service acknowledges on its own, after about 20 s (see OsCommandError::kTimeout) — so size it for the command being run (milliseconds for a register read, tens of seconds for a measurement). Hitting it, or a stop request on stop, makes the master abort the running command; abortTimeout then bounds how long the drive is given to report that abort.

A ceiling below the drive's own is a decision, not a safety margin: it replaces whatever the drive was going to say with "this master gave up". For a command whose failure mode is a service that will never answer, waiting past 20 s is what turns a bare timeout into the drive's own verdict.

Member Data Documentation

◆ abortTimeout

std::chrono::milliseconds mm::node::OsCommandConfig::abortTimeout {10000}

Time allowed to confirm a forced abort.

◆ pollInterval

std::chrono::milliseconds mm::node::OsCommandConfig::pollInterval {10}

Delay between response polls.

◆ stop

std::stop_token mm::node::OsCommandConfig::stop {}

Requesting a stop aborts the command; default never stops.

◆ timeout

std::chrono::milliseconds mm::node::OsCommandConfig::timeout {1000}

Ceiling on the whole command.


The documentation for this struct was generated from the following file: