Anti-Sway Capstone 1.0
Loading...
Searching...
No Matches
system.c File Reference

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"
Include dependency graph for system.c:

Enumerations

enum  States {
  ANTI_SWAY , TRACKING , IDLE , MENU ,
  ERROR , START , END
}
 

Functions

static int AntiSwayState ()
 
static int TrackingState ()
 
static int IdleState ()
 
static int MenuState ()
 
static int ErrorState ()
 
static int StartState ()
 
static int EndState ()
 
int SystemExec ()
 

Variables

static int(* states [])()
 State Functions.
 
static States state = START
 Current State.
 
static int error
 Local Error Code.
 

Detailed Description

System (Turing Machine)

Author
Anti-Sway Team: Nguyen, Tri; Espinola, Malachi; Tevy, Vattanary; Hokenstad, Ethan; Neff, Callen)
Version
0.1
Date
2024-06-03

Enumeration Type Documentation

◆ States

enum States

The possible states

Function Documentation

◆ 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
Here is the call graph for this function:

◆ EndState()

static int EndState ( )
static

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
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ IdleState()

static int IdleState ( )
static

Executes the Idle State, which includes 1) Doing Nothing 2) Executing Transitions from this State

Returns
0 upon success, negative otherwise
Here is the call graph for this function:

◆ MenuState()

static int MenuState ( )
static

Executes the Menu State, which includes 1) Prompting for the next state 2) Executing the next state

Returns
0 upon success, negative otherwise
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ SystemExec()

int SystemExec ( )

Executes the entire System

Returns
0 upon success, negative otherwise
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

Variable Documentation

◆ states

int(* states[])() ( )
static
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.