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

Control plane: unpublishes the image and waits out the RT cycle already in flight. More...

#include <process_data.h>

Collaboration diagram for mm::node::ProcessData::PauseResult:
[legend]

Public Attributes

const ProcessImageprevious = nullptr
 The image that was published, or nullptr if none was.
 
bool drained = true
 

Detailed Description

Control plane: unpublishes the image and waits out the RT cycle already in flight.

The pause every mutation of shared state needs when it cannot take a lock the RT thread also takes — replacing a device's parameter map, rebuilding the device set, re-mapping the image. Unpublishing is what stops a new cycle starting (DeviceManager::CycleGuard and exchangeProcessData both back out on a null image); the wait covers the one already running. Together they mean no RT thread is inside the cycle body when this returns.

Bounded, so a stalled or absent RT loop can never hang a control-plane call; giving up is logged rather than silent.

Returns
What was published, to hand back to resumeCycle, and whether the drain succeeded.

Member Data Documentation

◆ drained

bool mm::node::ProcessData::PauseResult::drained = true

False when the wait expired with the RT thread still inside a cycle. A caller that sees false must free nothing: the RT thread may still be reading whatever it was about to release. Keep it alive instead, or refuse the operation.

◆ previous

const ProcessImage* mm::node::ProcessData::PauseResult::previous = nullptr

The image that was published, or nullptr if none was.


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