Elevator v2.0
Elevator Documenation
Loading...
Searching...
No Matches
elevator.h File Reference
#include "stdint.h"
Include dependency graph for elevator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Elevator
 Elevator elevator.h. More...
 

Typedefs

typedef enum cartState_t cartState_t
 cartState_t elevator.h More...
 
typedef enum direction_t direction_t
 direction_t elevator.h More...
 
typedef enum door_t door_t
 door_t elevator.h More...
 
typedef struct Elevator Elevator
 Elevator elevator.h. More...
 

Enumerations

enum  cartState_t { IDLE = 0 , MOVE = 1 , STOP = 2 , EMERGENCY = -1 }
 cartState_t elevator.h More...
 
enum  direction_t { DOWN = 0 , UP = 1 , NONE = -1 }
 direction_t elevator.h More...
 
enum  door_t { OPEN = 0 , CLOSE = 1 }
 door_t elevator.h More...
 

Typedef Documentation

◆ cartState_t

typedef enum cartState_t cartState_t

cartState_t elevator.h

This is a custom enumeration for the cart state cartState_t

Example

typedef enum cartState_t{
IDLE = 0,
MOVE = 1,
STOP = 2
EMERGENCY = -1
cartState_t
cartState_t elevator.h
Definition: elevator.h:33
@ EMERGENCY
Definition: elevator.h:37
@ STOP
Definition: elevator.h:36
@ MOVE
Definition: elevator.h:35
@ IDLE
Definition: elevator.h:34

◆ direction_t

typedef enum direction_t direction_t

direction_t elevator.h

This is a custom enumeration for the direction state direction_t

Example

typedef enum direction_t{
DOWN = 0,
UP = 1,
NONE = -1,
direction_t
direction_t elevator.h
Definition: elevator.h:58
@ DOWN
Definition: elevator.h:59
@ UP
Definition: elevator.h:60
@ NONE
Definition: elevator.h:61

◆ door_t

typedef enum door_t door_t

door_t elevator.h

This is a custom enumeration for the door state door_t

Example

typedef enum door_t{
OPEN = 0,
CLOSE = 1,
door_t
door_t elevator.h
Definition: elevator.h:80
@ OPEN
Definition: elevator.h:81
@ CLOSE
Definition: elevator.h:82

◆ Elevator

typedef struct Elevator Elevator

Elevator elevator.h.

This is a custom structure for the Elevator

Example

typedef struct Elevator{
uint8_t currFloor;
uint8_t destination;
Elevator elevator.h.
Definition: elevator.h:103
uint8_t destination
Definition: elevator.h:105
cartState_t prevState
Definition: elevator.h:108
direction_t dir
Definition: elevator.h:109
uint8_t currFloor
Definition: elevator.h:104
cartState_t state
Definition: elevator.h:107
door_t door
Definition: elevator.h:106

Enumeration Type Documentation

◆ cartState_t

cartState_t elevator.h

This is a custom enumeration for the cart state cartState_t

Example

typedef enum cartState_t{
IDLE = 0,
MOVE = 1,
STOP = 2
EMERGENCY = -1
Enumerator
IDLE 
MOVE 
STOP 
EMERGENCY 

◆ direction_t

direction_t elevator.h

This is a custom enumeration for the direction state direction_t

Example

typedef enum direction_t{
DOWN = 0,
UP = 1,
NONE = -1,
Enumerator
DOWN 
UP 
NONE 

◆ door_t

enum door_t

door_t elevator.h

This is a custom enumeration for the door state door_t

Example

typedef enum door_t{
OPEN = 0,
CLOSE = 1,
Enumerator
OPEN 
CLOSE