Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmClient ¶
type AlarmClient interface { GetPartialStatus(ctx context.Context) (response *StatusResponse, err error) GetZones(ctx context.Context, all bool) ([]ZoneModel, error) }
AlarmClient is the client interface
func NewClient ¶
func NewClient(host, port, password string) (client AlarmClient)
NewClient returns client for communicating with the server through a tcp connection
type Central ¶
type Central struct { Model string Firmware string Battery Battery Activated bool Alerting bool IssueWarn bool // central has some issue ExternalPowerFault bool // central loss external power source ExternalAuxOverload bool // external auxiliary exit overload PhoneLineCut bool EventCommunicationFailure bool Siren Siren }
Central is all the information relative to the central collected from the partial status command
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client for communicating with the alarm central
func (*Client) GetPartialStatus ¶
func (c *Client) GetPartialStatus(ctx context.Context) (response *StatusResponse, err error)
GetPartialStatus get the partial status from the Central
type Partition ¶
type Partition struct {
Enabled bool
}
Partition indicates the status of given partition
type StatusResponse ¶
type StatusResponse struct { Date time.Time Zones []Zone Keyboards []Keyboard Central Central PGMs []PGM Partitions []Partition PartitionEnabled bool }
StatusResponse is all the information collected from the partial status command
type Zone ¶
type Zone struct { Violated bool Anulated bool Open bool LowBattery bool // not implemented ShortCircuit bool // not implemented Tamper bool // not implemented }
Zone is the raw zone status collected from the alarm central
type ZoneDescription ¶
type ZoneDescription struct { Id int `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description"` }
ZoneDescription a configuration to add contextual metadata to Zones
Directories ¶
Path | Synopsis |
---|---|
Package mock_alarm is a generated GoMock package.
|
Package mock_alarm is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.