types

package
v0.0.0-...-71b31c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDLE     State = 0
	MOVING         = 1
	DOOROPEN       = 2
	IMMOBILE       = 3
)
View Source
const (
	NotActive      Status = 0
	WaitingForCost        = 1
	Unconfirmed           = 2
	Confirmed             = 3
	Mine                  = 4
	Done                  = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Elevator

type Elevator struct {
	UpQueue      [NUMBER_OF_FLOORS]int
	DownQueue    [NUMBER_OF_FLOORS]int
	CurrentFloor int
	Direction    elevio.MotorDirection
	Immobile     bool
}

type FsmChannels

type FsmChannels struct {
	FloorReached chan int
	NewOrder     chan Order
	Obstruction  chan bool

	ElevatorState chan Elevator

	DoorTimedOut      chan bool
	Immobile          chan int
	StopImmobileTimer chan bool
}

type Order

type Order struct {
	Floor         int
	DirectionUp   bool
	DirectionDown bool
	CabOrder      bool
	Cost          [NUMBER_OF_ELEVATORS]int
	Status        Status
	TimedOut      bool
	FromId        int
	Timestamp     int64
}

Structures

type OrderDistributorChannels

type OrderDistributorChannels struct {
	OrderUpdate      chan Order
	NewButtonEvent   chan elevio.ButtonEvent
	OrderTransmitter chan Order
	OrderReciever    chan Order
}

type State

type State int

type Status

type Status int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL