2023-10-10 11:05:26 +08:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import "joylink.club/rtsssimulation/repository/model/proto"
|
|
|
|
|
|
|
|
type Button struct {
|
|
|
|
Identity
|
|
|
|
|
|
|
|
buttonType proto.Button_ButtonType
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewButton(id string, buttonType proto.Button_ButtonType) *Button {
|
|
|
|
return &Button{
|
|
|
|
Identity: identity{id, proto.DeviceType_DeviceType_Button},
|
|
|
|
buttonType: buttonType,
|
|
|
|
}
|
|
|
|
}
|
2023-10-12 13:47:57 +08:00
|
|
|
|
|
|
|
func (btn *Button) GetBtnType() proto.Button_ButtonType {
|
|
|
|
return btn.buttonType
|
|
|
|
}
|