triggerconfig

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source string
const (
	MOTION   Source = "Motion"
	PLC      Source = "PLC"
	INTERVAL Source = "Interval"
	DISABLED Source = "disabled"
)

type SourceInterval

type SourceInterval struct {
	Delay int // second
}

type SourceMotion

type SourceMotion struct {
	TimeSpan  int    // millisecond
	Threshold uint32 // px
	TimeOut   int    // millisecond
	AutoTune  bool
	TuneStep  uint32 // px
	TuneTime  int    // millisecond
}

func (*SourceMotion) GetTimeSpan

func (hc *SourceMotion) GetTimeSpan() time.Duration

type SourcePLC

type SourcePLC struct {
	Address  string
	Rack     int
	Slot     int
	Variable string
}

type TriggerConfig

type TriggerConfig struct {
	TriggerAfterEvent bool
	CheckIntvl        int // millisecond
	Source            Source
	Motion            SourceMotion
	PLC               SourcePLC
	Interval          SourceInterval
}

func (*TriggerConfig) GetCheckIntvl

func (hc *TriggerConfig) GetCheckIntvl() time.Duration

func (*TriggerConfig) GetIntervalConfig

func (hc *TriggerConfig) GetIntervalConfig() SourceInterval

func (*TriggerConfig) GetMotionConfig

func (hc *TriggerConfig) GetMotionConfig() SourceMotion

func (*TriggerConfig) GetPLCConfig

func (hc *TriggerConfig) GetPLCConfig() SourcePLC

func (*TriggerConfig) GetSource

func (hc *TriggerConfig) GetSource() Source

func (*TriggerConfig) GetTimeOut

func (hc *TriggerConfig) GetTimeOut() time.Duration

func (*TriggerConfig) GetTriggerAfterEvent

func (hc *TriggerConfig) GetTriggerAfterEvent() bool

func (*TriggerConfig) LoadDefaults

func (hc *TriggerConfig) LoadDefaults()

func (*TriggerConfig) Lock

func (hc *TriggerConfig) Lock()

func (*TriggerConfig) SetIntervalConfig

func (hc *TriggerConfig) SetIntervalConfig(interval SourceInterval) error

func (*TriggerConfig) SetMotionConfig

func (hc *TriggerConfig) SetMotionConfig(motion SourceMotion)

func (*TriggerConfig) SetPLCConfig

func (hc *TriggerConfig) SetPLCConfig(plc SourcePLC) error

func (*TriggerConfig) SetSource

func (hc *TriggerConfig) SetSource(source Source) error

func (*TriggerConfig) SetTrigger

func (hc *TriggerConfig) SetTrigger(afterevent bool)

func (*TriggerConfig) Unlock

func (hc *TriggerConfig) Unlock()

Jump to

Keyboard shortcuts

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