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_SETUP = 2,
    STIXCTL_STATUS_START_BCAST = 3,
    STIXCTL_STATUS_START_BODY = 4,
    STIXCTL_STATUS_WORKING = 5,
    STIXCTL_STATUS_END_BODY = 6,
    STIXCTL_STATUS_END_BCAST = 7,
    STIXCTL_STATUS_END_SETUP = 8,
    STIXCTL_STATUS_END = 9,
    STIXCTL_STATUS_ERROR = 10
};

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 generally returned when this state is assigned to the frame.
STIXCTL_STATUS_START_SETUP
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.
STIXCTL_STATUS_START_BCAST
A nested condition is about to begin. For example, executables may have a broadcast usage. The "_START" state indicates that the STIXCTL_BROADCAST event has been issued.
STIXCTL_STATUS_START_BODY
A nested condition is about to begin. For example, the "_START_BODY" status means the contents of a workplan has begun.
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_BODY
The nested condition matching START_BODY has finished and any appropriate "end" event has been issued.
STIXCTL_STATUS_END_BCAST
The nested condition matching START_BCAST has finished and any appropriate "end" event has been issued.
STIXCTL_STATUS_END_SETUP
The nested condition matching START_SETUP 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 generally 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