Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
BindAddress string
DeviceList DeviceList
Directory string
RestAddress string
}
type DeviceList ¶
type DeviceList struct {
// contains filtered or unexported fields
}
func NewDeviceList ¶
func NewDeviceList(l []Simulator) DeviceList
func (*DeviceList) Apply ¶
func (l *DeviceList) Apply(f func(Simulator))
func (*DeviceList) Delete ¶
func (l *DeviceList) Delete(deviceID uint32) error
func (*DeviceList) Find ¶
func (l *DeviceList) Find(deviceID uint32) Simulator
func (*DeviceList) GetMessage ¶
func (l *DeviceList) GetMessage() entities.Message
type Simulator ¶
type Simulator interface {
DeviceID() uint32
DeviceType() string
FilePath() string
SetTxQ(chan entities.Message)
Handle(*net.UDPAddr, messages.Request)
RunTasks()
Save() error
Delete() error
Swipe(cardNumber uint32, door uint8) (bool, error)
Open(door uint8, duration *time.Duration) (bool, error)
Close(door uint8) (bool, error)
ButtonPressed(door uint8, duration time.Duration) (bool, error)
}
Click to show internal directories.
Click to hide internal directories.