Documentation
¶
Index ¶
- Constants
- type AntiPassback
- func (a AntiPassback) Allow(card uint32, door uint8) bool
- func (a *AntiPassback) Allowed(card uint32, door uint8)
- func (a AntiPassback) Get() uint8
- func (a AntiPassback) MarshalJSON() ([]byte, error)
- func (a *AntiPassback) Set(antipassback uint8) bool
- func (a *AntiPassback) UnmarshalJSON(bytes []byte) error
- type Card
- type CardList
- type Delay
- type Direction
- type Door
- func (d *Door) Close(closed func()) bool
- func (d *Door) EnableButton(enabled bool) bool
- func (d *Door) EnableProfile(enabled bool) bool
- func (d *Door) IsButtonPressed() bool
- func (d *Door) IsNormallyClosed() bool
- func (d *Door) IsOpen() bool
- func (d *Door) IsProfileDisabled() bool
- func (d *Door) IsUnlocked() bool
- func (d *Door) Open(duration *time.Duration, opened func(uint8), closed func()) bool
- func (d *Door) OverrideState(state uint8) bool
- func (d *Door) PressButton(duration time.Duration) (pressed bool, reason uint8)
- func (d *Door) Unlock(duration time.Duration) bool
- func (d *Door) UnlockWithPasscode(passcode uint32, duration time.Duration) bool
- type Doors
- func (dd *Doors) Close(door uint8, closed func()) bool
- func (dd *Doors) ControlState(door uint8) uint8
- func (dd *Doors) Delay(door uint8) Delay
- func (dd *Doors) EnableButton(door uint8, enabled bool) bool
- func (dd *Doors) EnableProfile(door uint8, enabled bool) bool
- func (dd *Doors) IsButtonPressed(door uint8) bool
- func (dd *Doors) IsInterlocked(door uint8) bool
- func (dd *Doors) IsNormallyClosed(door uint8) bool
- func (dd *Doors) IsOpen(doors ...uint8) bool
- func (dd *Doors) IsProfileDisabled(door uint8) bool
- func (dd *Doors) IsUnlocked(door uint8) bool
- func (d Doors) MarshalJSON() ([]byte, error)
- func (dd *Doors) Open(door uint8, duration *time.Duration, opened func(uint8), closed func()) bool
- func (dd *Doors) OverrideState(door uint8, state uint8) bool
- func (dd *Doors) Passcodes(door uint8) []uint32
- func (dd *Doors) PressButton(door uint8, duration time.Duration) (pressed bool, reason uint8)
- func (dd *Doors) SetControlState(door uint8, state uint8)
- func (dd *Doors) SetDelay(door uint8, delay Delay)
- func (dd *Doors) SetPasscodes(door uint8, passcodes ...uint32)
- func (d Doors) String() string
- func (dd *Doors) Unlock(door uint8, duration time.Duration) bool
- func (dd *Doors) UnlockWithPasscode(door uint8, passcode uint32, duration time.Duration) bool
- func (d *Doors) UnmarshalJSON(bytes []byte) error
- type Event
- type EventList
- func (l *EventList) Add(event Event) uint32
- func (l *EventList) Clear() bool
- func (l *EventList) Get(index uint32) Event
- func (l *EventList) GetIndex() uint32
- func (l EventList) MarshalJSON() ([]byte, error)
- func (l *EventList) SetIndex(index uint32) bool
- func (l EventList) Size() int
- func (l *EventList) UnmarshalJSON(b []byte) error
- type Keypad
- type Keypads
- type Message
- type Offset
- type TaskList
- type TimeProfiles
Constants ¶
View Source
const ( NormallyOpen = uint8(1) NormallyClosed = uint8(2) Controlled = uint8(3) DirectionIn Direction = 1 DirectionOut Direction = 2 )
View Source
const ( ReasonOk uint8 = 0 ReasonSwipePass uint8 = 0x01 ReasonPCControl uint8 = 0x05 ReasonNoPrivilege uint8 = 0x06 ReasonInvalidPIN uint8 = 0x07 ReasonAntiPassback uint8 = 0x08 ReasonNormallyClosed uint8 = 0x0b ReasonInvalidTimezone uint8 = 0x0f ReasonNoPass uint8 = 0x12 ReasonSuperPasswordOpenDoor uint8 = 0x19 ReasonInterlock uint8 = 0x21 )
View Source
const DEFAULT_EVENTLIST_CHUNK = 8
View Source
const DEFAULT_EVENTLIST_SIZE = 256
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AntiPassback ¶ added in v0.8.11
type AntiPassback struct {
// contains filtered or unexported fields
}
func MakeAntiPassback ¶ added in v0.8.11
func MakeAntiPassback(antipassback types.AntiPassback) AntiPassback
func (AntiPassback) Allow ¶ added in v0.8.11
func (a AntiPassback) Allow(card uint32, door uint8) bool
func (*AntiPassback) Allowed ¶ added in v0.8.11
func (a *AntiPassback) Allowed(card uint32, door uint8)
func (AntiPassback) Get ¶ added in v0.8.11
func (a AntiPassback) Get() uint8
func (AntiPassback) MarshalJSON ¶ added in v0.8.11
func (a AntiPassback) MarshalJSON() ([]byte, error)
func (*AntiPassback) Set ¶ added in v0.8.11
func (a *AntiPassback) Set(antipassback uint8) bool
func (*AntiPassback) UnmarshalJSON ¶ added in v0.8.11
func (a *AntiPassback) UnmarshalJSON(bytes []byte) error
type Door ¶
type Door struct {
ControlState uint8 `json:"control"`
Delay Delay `json:"delay"`
Passcodes []uint32 `json:"passcodes,omitempty"`
// contains filtered or unexported fields
}
func (*Door) EnableButton ¶ added in v0.7.1
func (*Door) EnableProfile ¶ added in v0.7.1
func (*Door) IsButtonPressed ¶
func (*Door) IsNormallyClosed ¶ added in v0.7.1
func (*Door) IsProfileDisabled ¶ added in v0.7.1
func (*Door) IsUnlocked ¶ added in v0.6.7
func (*Door) OverrideState ¶ added in v0.7.1
func (*Door) PressButton ¶ added in v0.6.7
type Doors ¶ added in v0.8.5
type Doors struct {
Interlock uint8
// contains filtered or unexported fields
}
func (*Doors) ControlState ¶ added in v0.8.5
func (*Doors) EnableButton ¶ added in v0.8.5
func (*Doors) EnableProfile ¶ added in v0.8.5
func (*Doors) IsButtonPressed ¶ added in v0.8.5
func (*Doors) IsInterlocked ¶ added in v0.8.5
func (*Doors) IsNormallyClosed ¶ added in v0.8.5
func (*Doors) IsProfileDisabled ¶ added in v0.8.5
func (*Doors) IsUnlocked ¶ added in v0.8.5
func (Doors) MarshalJSON ¶ added in v0.8.5
func (*Doors) OverrideState ¶ added in v0.8.5
func (*Doors) PressButton ¶ added in v0.8.5
func (*Doors) SetControlState ¶ added in v0.8.5
func (*Doors) SetPasscodes ¶ added in v0.8.7
func (*Doors) UnlockWithPasscode ¶ added in v0.8.7
func (*Doors) UnmarshalJSON ¶ added in v0.8.5
type Event ¶
type Event struct {
Index uint32 `json:"index"`
Type uint8 `json:"type"`
Granted bool `json:"granted"`
Door uint8 `json:"door"`
Direction uint8 `json:"direction"`
Card uint32 `json:"card"`
Timestamp types.DateTime `json:"timestamp,omitempty"`
Reason uint8 `json:"reason"`
}
func (Event) MarshalJSON ¶ added in v0.7.2
func (*Event) UnmarshalJSON ¶ added in v0.7.2
type EventList ¶
type EventList struct {
// contains filtered or unexported fields
}
func MakeEventList ¶ added in v0.7.2
NOTE: no validation - for unit tests only
func NewEventList ¶ added in v0.8.3
func NewEventList() EventList
func (EventList) MarshalJSON ¶ added in v0.7.2
func (*EventList) UnmarshalJSON ¶ added in v0.7.2
type Keypads ¶ added in v0.8.6
func MakeKeypads ¶ added in v0.8.6
func MakeKeypads() Keypads
func (*Keypads) UnmarshalJSON ¶ added in v0.8.6
type TaskList ¶ added in v0.7.1
type TimeProfiles ¶ added in v0.7.0
type TimeProfiles map[uint8]types.TimeProfile
func (TimeProfiles) Clear ¶ added in v0.7.0
func (t TimeProfiles) Clear() bool
func (TimeProfiles) Set ¶ added in v0.7.0
func (t TimeProfiles) Set(profile types.TimeProfile) bool
Click to show internal directories.
Click to hide internal directories.