Documentation
¶
Index ¶
- Constants
- func GetFloor() int
- func Init(addr string, numFloors int)
- func PollButtons(receiver chan<- ButtonEvent)
- func PollFloorSensor(receiver chan<- int)
- func PollObstructionSwitch(receiver chan<- bool)
- func PollStopButton(receiver chan<- bool)
- func SetButtonLamp(button ButtonType, floor int, value bool)
- func SetDoorOpenLamp(value bool)
- func SetFloorIndicator(floor int)
- func SetMotorDirection(dir MotorDirection)
- func SetStopLamp(value bool)
- type ButtonEvent
- type ButtonType
- type MotorDirection
Constants ¶
View Source
const ( MD_Up MotorDirection = 1 MD_Down = -1 MD_Stop = 0 )
View Source
const ( BT_HallUp ButtonType = 0 BT_HallDown = 1 BT_Cab = 2 )
Variables ¶
This section is empty.
Functions ¶
func PollButtons ¶
func PollButtons(receiver chan<- ButtonEvent)
func PollFloorSensor ¶
func PollFloorSensor(receiver chan<- int)
func PollObstructionSwitch ¶
func PollObstructionSwitch(receiver chan<- bool)
func PollStopButton ¶
func PollStopButton(receiver chan<- bool)
func SetButtonLamp ¶
func SetButtonLamp(button ButtonType, floor int, value bool)
func SetDoorOpenLamp ¶
func SetDoorOpenLamp(value bool)
func SetFloorIndicator ¶
func SetFloorIndicator(floor int)
func SetMotorDirection ¶
func SetMotorDirection(dir MotorDirection)
func SetStopLamp ¶
func SetStopLamp(value bool)
Types ¶
type ButtonEvent ¶
type ButtonEvent struct {
Floor int
Button ButtonType
}
type ButtonType ¶
type ButtonType int
type MotorDirection ¶
type MotorDirection int
Click to show internal directories.
Click to hide internal directories.