Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LightOffCommand ¶
type LightOffCommand struct {
// contains filtered or unexported fields
}
LightOffCommand 是具體命令,關閉燈
func NewLightOffCommand ¶
func NewLightOffCommand(light *Light) *LightOffCommand
func (*LightOffCommand) Execute ¶
func (c *LightOffCommand) Execute()
type LightOnCommand ¶
type LightOnCommand struct {
// contains filtered or unexported fields
}
LightOnCommand 是具體命令,打開燈
func NewLightOnCommand ¶
func NewLightOnCommand(light *Light) *LightOnCommand
func (*LightOnCommand) Execute ¶
func (c *LightOnCommand) Execute()
type RemoteControl ¶
type RemoteControl struct {
// contains filtered or unexported fields
}
RemoteControl 是調用者,調用命令
func (*RemoteControl) PressButton ¶
func (r *RemoteControl) PressButton()
func (*RemoteControl) SetCommand ¶
func (r *RemoteControl) SetCommand(command Command)
Click to show internal directories.
Click to hide internal directories.