Overview

The StixCtlStatus enum records the state of each stack frame as you advance through the process with repeated calls to next(). This state is not relevant to end-user code unless you are trying to customize the behavior of the traversal at a very detailed level.

Each frame transitions over states as next() is called, sometimes pausing to return events as requested. The state moves through the enum values in increasing order. Not all values are used for each frame. Each type of frame may use different states and behavior. Several start/end state values are available for tracking nested conditions.

StixCtlStatus Definition

enum StixCtlStatus {
    STIXCTL_STATUS_UNSEEN = 0,
    STIXCTL_STATUS_START = 1,
    STIXCTL_STATUS_START_BODY = 2,
    STIXCTL_STATUS_START_STEP = 3,
    STIXCTL_STATUS_WORKING = 4,
    STIXCTL_STATUS_END_STEP = 5,
    STIXCTL_STATUS_END_BODY = 6,
    STIXCTL_STATUS_END = 7,
    STIXCTL_STATUS_ERROR = 8
};

Type Details

The value is stored in the f_status field of a frame. The values described below have the STIXCTL_STATUS prefix.

STIXCTL_STATUS_UNSEEN
The frame has just been pushed onto the stack. A frame in the state at the top of the stack will move to START when next() is called again.
STIXCTL_STATUS_START
Processing of the contents is about to begin. The "_START" event for the frame type, such as STIXCTL_TOOLPATH_START or STIXCTL_OPERATION_START, is returned when this state is assigned to the frame.
STIXCTL_STATUS_START_BODY
A nested condition is about to begin. For example, workplans may have a setup. The "_START" state indicates start of a setup has been and the STIXCTL_SETUP_START event issued. The "_START_BODY" status means workplan contents has begun and the STIXCTL_SETUP_START event issued. If the workplan does not have a setup, the frame skips the "_START" state.
STIXCTL_STATUS_START_STEP
A deeper nested condition is about to begin. This state is used to mark when the f_param value has been updated on the frame and any "next" event, like STIXCTL_WORKPLAN_NEXT, has been issued.
STIXCTL_STATUS_WORKING
Processing of the contents is in progress. This state is assigned to the frame before other contents are pushed onto the stack. For example, an operation is in the WORKING state, while its toolpaths are being pushed onto the stack. Frames in this state are usually not at the top of the stack.
STIXCTL_STATUS_END_STEP
Not used, but intended to mark the end of a deeper nested condition.
STIXCTL_STATUS_END_BODY
The nested condition matching START_BODY has finished and any appropriate "end" event has been issued.
STIXCTL_STATUS_END
Processing of the frame contents is finished. The "_END" event for the frame type (STIXCTL_TOOLPATH_END, STIXCTL_OPERATION_END) is returned when this state is assigned to the frame. A frame in the state at the top of the stack will be popped when next() is called again.
STIXCTL_STATUS_ERROR
This state indicates that something is wrong with the data and a message is available in errorMsg(). When the frame is given this state, the STIXCTL_ERROR event is returned. If next() is called again, the frame will be popped off with no further action.

Examples

TBD