Documentation ¶
Index ¶
- type Elevator
- type Elevators
- func (e *Elevators) Close(car int) error
- func (e *Elevators) Count() int
- func (e *Elevators) Done()
- func (e *Elevators) Down(car int) error
- func (e *Elevators) Enter(car int, users []int) error
- func (e *Elevators) Evaluate() (float64, float64, float64, int, error)
- func (e *Elevators) Exit(car int, users []int) error
- func (e *Elevators) GetOnCalls() (mydb.Calls, int)
- func (e *Elevators) IsEnd() bool
- func (e *Elevators) Logging(action string, car int)
- func (e *Elevators) Open(car int) error
- func (e *Elevators) Stop(car int) error
- func (e *Elevators) Tick()
- func (e *Elevators) Up(car int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elevator ¶
type Elevator struct { Id int `json:"id"` Floor int `json:"floor"` Passengers mydb.Calls `json:"passengers"` Status string `json:"status"` MaxFloor int `json:"-"` MaxPassengers int `json:"-"` }
func NewElevator ¶
type Elevators ¶
type Elevators struct { Token string `json:"token"` Timestamp int `json:"timestamp"` Cars []Elevator `json:"cars"` Problem int `json:"-"` Calls mydb.Calls `json:"-"` LastCallTs int `json:"-"` Inputs mydb.Calls `json:"-"` Outputs mydb.Outputs `json:"-"` Logs []string `json:"-"` // contains filtered or unexported fields }
func NewElevators ¶
Click to show internal directories.
Click to hide internal directories.