System (Turing Machine)
More...
#include <stdlib.h>
#include <stdbool.h>
#include "MyRio.h"
#include "T1.h"
#include "thread-lib.h"
#include "setup.h"
#include "anti-sway.h"
#include "tracking.h"
#include "idle.h"
#include "io.h"
#include "error.h"
#include "system.h"
|
enum | States {
ANTI_SWAY
, TRACKING
, IDLE
, MENU
,
ERROR
, START
, END
} |
|
|
static int(* | states [])() |
| State Functions.
|
|
static States | state = START |
| Current State.
|
|
static int | error |
| Local Error Code.
|
|
System (Turing Machine)
- Author
- Anti-Sway Team: Nguyen, Tri; Espinola, Malachi; Tevy, Vattanary; Hokenstad, Ethan; Neff, Callen)
- Version
- 0.1
- Date
- 2024-06-03
- Copyright
- Copyright (c) 2024
◆ States
◆ AntiSwayState()
static int AntiSwayState |
( |
| ) |
|
|
static |
Executes the Anti-Sway State, which includes 1) Running Anti-Sway Mode 2) Executing Transitions from this State
- Returns
- 0 upon success, negative otherwise
◆ EndState()
Executes the End State, which includes 1) Stopping the System 2) Stopping all Concurrent Processes 3) Deallocating all Resources
- Returns
- 0 upon success, negative otherwise
◆ ErrorState()
static int ErrorState |
( |
| ) |
|
|
static |
Executes the Error State, which includes 1) Stopping the System 2) Stopping any Concurrent Processes 3) Deallocating all Resources 4) Outputting the error
- Returns
- The error code from the failure
◆ IdleState()
Executes the Idle State, which includes 1) Doing Nothing 2) Executing Transitions from this State
- Returns
- 0 upon success, negative otherwise
◆ MenuState()
Executes the Menu State, which includes 1) Prompting for the next state 2) Executing the next state
- Returns
- 0 upon success, negative otherwise
◆ StartState()
static int StartState |
( |
| ) |
|
|
static |
Executes the Start State, which includes 1) Setting up the System 2) Executing the next state Note: This is a once-only state
- Returns
- 0 upon success, negative otherwise
◆ SystemExec()
Executes the entire System
- Returns
- 0 upon success, negative otherwise
◆ TrackingState()
static int TrackingState |
( |
| ) |
|
|
static |
Executes the Tracking Mode State, which includes 1) Running Tracking Mode 2) Executing Transitions from this State
- Returns
- 0 upon success, negative otherwise
◆ states
Initial value:
static int EndState()
Definition system.c:263
static int ErrorState()
Definition system.c:218
static int AntiSwayState()
Definition system.c:150
static int TrackingState()
Definition system.c:161
static int StartState()
Definition system.c:257
static int MenuState()
Definition system.c:183
static int IdleState()
Definition system.c:172
State Functions.