internal

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildVersion string
	CommitHash   string
)

Functions

func AssembleBot

func AssembleBot(motion *MotionDetection) *gobot.Robot

func StartMetricsServer

func StartMetricsServer(listenAddr string)

Types

type MotionDetection

type MotionDetection struct {
	Driver      *gpio.PIRMotionDriver
	Adaptor     gobot.Connection
	MqttAdaptor *mqtt.Adaptor
	Stats       *SensorStats

	Config config.Config
	// contains filtered or unexported fields
}

func (*MotionDetection) Send added in v1.6.2

func (m *MotionDetection) Send()

type PirSensor

type PirSensor interface {
	gobot.Eventer
	Start() (err error)
	Halt() (err error)
	Name() string
	SetName(n string)
	Pin() string
	Connection() gobot.Connection
}

type SensorStats added in v1.5.0

type SensorStats struct {
	// contains filtered or unexported fields
}

func NewSensorStats added in v1.5.0

func NewSensorStats() *SensorStats

func (*SensorStats) GetEventCountNewerThan added in v1.5.0

func (s *SensorStats) GetEventCountNewerThan(window time.Duration) int

func (*SensorStats) GetStatsSliceSize added in v1.5.0

func (s *SensorStats) GetStatsSliceSize() int

func (*SensorStats) NewEvent added in v1.5.0

func (s *SensorStats) NewEvent()

func (*SensorStats) PurgeEventsBefore added in v1.5.0

func (s *SensorStats) PurgeEventsBefore(timestamp time.Time)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL